Previous Topic: DriverManager MethodNext Topic: Cross-Context Flows


DataSource Method

This method requires an Application Server-specific setup. It allows for two-phase commits, Application Server connection pooling, and participating in Java Transaction Architecture (JTA) () transactions.

To support DataSources in Java applications, the JDBC driver location (directory or jar file) must be loadable by the Application Server's Class Loader. This can be through an Application Server setting, copying the drivers to a specific location, or modifying the Classpath. See your Application Server documentation for details.

To use the JDBC DataSource method to create connections, the Application Server uses the JNDI service provider. Therefore, the JDBC connection information must be specified to the Application Server as a resource.

Note: For specific information about how to set up resource adapters, see the Distributed Processing – Enterprise JavaBeans User Guide