Configuring a data source using the administrative console
Application components use a data source to access connection instances to a relational database.
Before you begin
The application server supports two different versions
of data source. Determine the data source for your environment according
to the enterprise bean and servlet specification levels that are the
basis of your applications:
- Data sources (WebSphere® Application Server Version 4) are for use with the Enterprise JavaBeans (EJB) 1.0 specification and the Java™ Servlet 2.2 specification.
- Data sources of the latest standard version are for use with applications that implement the more advanced releases of these specifications.
About this task
Remember: The server has to be restarted for the
newly-created datasource to be available for a Java Naming
and Directory Interface (JNDI) from the application.
Procedure
What to do next
- You can override the default values for some data source properties.
- You can configure additional properties that your database vendor might require or offers as options. Consult your database documentation about these settings.
If you use the DB2 Universal JDBC Driver provider or DB2 Using IBM JCC Driver, learn about optional data source properties in the Application Programming Guide and Reference for Java for your version of DB2 for z/OS.
- You can add the commitOrRollbackOnCleanup custom property to the
settings of a JDBC data source if you want a specific action taken
with any uncommitted work if your JDBC data source unexpectedly closes.
The values that can be specified for this property are commit or rollback.
If your JDBC data source supports Unit of Work (UOW) detection, this property only applies when you are working within a discrete unit of work. If your JDBC data source does not support UOW detection, this property always applies.
If you do not add this property to your JDBC data source settings, any detected implicit transaction is rolled back, and your application must deal with any undetected implicit transactions.
To add this custom property to your JDBC data source configuration settings:- In the administrative console, click .
- Enter commitOrRollbackOnCleanup in the Name field, and either commit or rollback in the Value field.
- Save your changes.
The following topics in this information center inform you of how to use the administrative console to assign the property values: