Part I Development Tasks and Tools
1. Setting Up a Development Environment
3. Using Ant with Enterprise Server
Part II Developing Applications and Application Components
7. Using the Java Persistence API
8. Developing Web Applications
9. Using Enterprise JavaBeans Technology
10. Using Container-Managed Persistence
13. Developing Lifecycle Listeners
Part III Using Services and APIs
General Steps for Creating a JDBC Resource
Making the JDBC Driver JAR Files Accessible
Automatic Detection of Installed Drivers
Creating a JDBC Connection Pool
Modifying a JDBC Connection Pool
Testing a JDBC Connection Pool
Flushing a JDBC Connection Pool
Creating Applications That Use the JDBC API
Using an Initialization Statement
Associating Connections with Threads
Obtaining a Physical Connection From a Wrapped Connection
Using the Connection.unwrap() Method
Using Non-Transactional Connections
Using JDBC Transaction Isolation Levels
Allowing Non-Component Callers
Restrictions and Optimizations
Disabling Stored Procedure Creation on Sybase
15. Using the Transaction Service
16. Using the Java Naming and Directory Interface
This chapter describes how to use the Java Database Connectivity (JDBC) API for database access with the Sun GlassFish Enterprise Server. This chapter also provides high level JDBC implementation instructions for servlets and EJB components using the Enterprise Server. If the JDK version 1.6 is used, the Enterprise Server supports the JDBC 4.0 API.
The JDBC specifications are available at http://java.sun.com/products/jdbc/download.html.
A useful JDBC tutorial is located at http://java.sun.com/docs/books/tutorial/jdbc/index.html.
Note - The Enterprise Server does not support connection pooling or transactions for an application’s database access if it does not use standard Java EE DataSource objects.
This chapter discusses the following topics: