Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Integrating portlets with dat... > Spring’s JDBC module for database in...

9.3. Spring’s JDBC module for database interaction

In this section, we’ll look at how the Spring JDBC (Java Database Connectivity) module simplifies interaction with the database and use it to implement the data access layer of the Book Catalog portlet. In the context of the Book Catalog portlet, we’ll look at how to configure the data source in a properties file or JNDI, how to access JNDI-bound data sources in Spring’s application context XML, and how to create data access objects (DAOs) that use Spring JDBC classes for executing SQL statements. We’ll wrap up this section by creating a Spring-based BookService service that uses DAOs to access the data source containing book catalog data.

Note

In section 9.4 we’ll look at how non-Spring classes, like BookCatalogPortlet, can access the Spring-based BookService to interact with the database.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial