This chapter provides procedures for performing database connectivity tasks in the Oracle GlassFish Server 3.0.1 environment by using the asadmin command-line utility.
The following topics are addressed here:
Instructions for accomplishing these tasks by using the Administration Console are contained in the Administration Console online help.
A database management system (DBMS) provides facilities for storing, organizing, and retrieving data. The information in databases is often described as persistent data because it is saved on disk and exists after the application process ends. Most business applications store data in relational databases. Applications can access database information by using the Java Database Connectivity (JDBC) API.
The key elements of database connectivity are the following:
Database. The repository where data is stored for an enterprise. Java EE applications access relational databases through the JDBC API. For administration procedures, see Setting Up the Database.
JDBC Connection Pool. A JDBC connection pool is a group of reusable connections for a particular database. For administration procedures, see Administering JDBC Connection Pools.
JDBC Resource. A JDBC resource (data source) provides applications with a means of connecting to a database. To create a JDBC resource, specify the connection pool with which it is associated. Multiple JDBC resources can specify a single connection pool. A JDBC resource is identified by its Java Naming and Directory Interface (JNDI) name. For administration procedures, see Administering JDBC Resources.
JDBC Driver. A database driver is a software component that enables a Java application to interact with a database connectivity API . Each database requires its own driver. For administration procedures, see Integrating the JDBC Driver.
At runtime, the following sequence occurs when an application connects to a database:
The application gets the JDBC resource associated with the database by making a call through the JNDI API.
Using the JNDI name of the resource, the naming and directory service locates the JDBC resource. Each JDBC resource specifies a connection pool.
Using the JDBC resource, the application gets a database connection.
GlassFish Server retrieves a physical connection from the connection pool that corresponds to the database. The pool defines connection attributes such as the database name (URL), user name, and password.
After the database connection is established, the application can read, modify, and add data to the database.
The application accesses the database by making calls to the JDBC API. The JDBC driver translates the application’s JDBC calls into the protocol of the database server.
When the application is finished accessing the database, the application closes the connection and returns the connection to the connection pool.
Most applications use relational databases to store, organize, and retrieve data. Applications access relational databases through the Java Database Connectivity (JDBC) API.
The following topics are addressed here:
Install a supported database product.
To see the current list of database products supported by GlassFish Server, refer to the Oracle GlassFish Server 3.0.1 Release Notes.
Install a supported JDBC driver for the database product.
For a list of drivers supported by GlassFish Server, see Configuration Specifics for JDBC Drivers.
Make the JDBC driver JAR file accessible to the domain administration server (DAS).
Create the database.
The application provider usually delivers scripts for creating and populating the database.
You are now ready to create a connection pool for the database, and a JDBC resource that points to the connection pool. See To Create a JDBC Connection Pool and To Create a JDBC Resource. The final step is to integrate the JDBC driver into an administrative domain as described in Integrating the JDBC Driver.
GlassFish Server includes an implementation of Java DB (formerly known as Derby), however, you can use any JDBC-compliant database. The database is not started automatically when you start GlassFish Server, so if you have applications that require a database, you need to start Java DB manually by using the local start-database subcommand.
Start the database by using the start-database(1) subcommand.
When the database server starts, or a client connects to it successfully, the following files are created at the location that is specified by the --dbhome option:
The derby.log file contains the database server process log along with its standard output and standard error information.
The database files contain your schema (for example, database tables).
This example starts Derby on the host host1 and port 5001.
asadmin> start-database --dbhost host1 --dbport 5001 --terse=true Starting database in the background. Log redirected to /opt/SUNWappserver/databases/javadb.log. Command start-database executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help start-database at the command line.
Use the local stop-database subcommand to stop Java DB on a specified port. A single host can have multiple database server processes running on different ports.
If necessary, notify users that the database is being stopped.
Stop the database by using the stop-database(1) subcommand.
This example stops Java DB on port 5001 of localhost.
asadmin> stop-database --dbhost=localhost --dbport=5001 onnection obtained for host: localhost, port number 5001. Apache Derby Network Server - 10.2.2.1 - (538595) shutdown at 2008-10-17 23:34:2 7.218 GMT Command stop-database executed successfully. |
For a laptop that roams between networks, you might have trouble shutting down the database. If you start Java DB and then change your IP address, you will not be able to stop Java DB unless you add a specific --dbhost argument. For example, if you run asadmin start-database --dbhost = 0.0.0.0, and then disconnect Ethernet and switch to wifi, you should run a command similar to the following to stop the database:
asadmin stop-database --dbhost localhost
You can also view the full syntax and options of the subcommand by typing asadmin help stop-database at the command line.
The Java DB configuration that is available for use with GlassFish Server includes scripts that can help you use Java DB. The following scripts are available in the as-install/javadb/frameworks/NetworkServer/bin directory:
Script to start the network server
Script to stop the network server
Interactive JDBC scripting tool
Script to view all or part of the DDL for a database
Script to display versioning information about the Java DB environment
Script to execute commands on the NetworkServerControl API
Ensure that the JAVA_HOME environment variable specifies the directory where the JDK is installed.
Set the JAVADB_HOME environment variable to point to the as-install/derby directory.
For more information about these utilities, see the following documentation:
After establishing the database, you are ready to set up access for GlassFish Server applications. The high-level steps include creating a JDBC connection pool, creating a JDBC resource for the connection pool, and integrating a JDBC driver into an administrative domain.
Instructions for performing these steps are contained in the following sections:
A JDBC connection pool is a group of reusable connections for a particular database. Because creating each new physical connection is time consuming, GlassFish Server maintains a pool of available connections. When an application requests a connection, it obtains one from the pool. When an application closes a connection, the connection is returned to the pool.
A JDBC resource is created by specifying the connection pool with which the resource is associated. Multiple JDBC resources can specify a single connection pool. The properties of connection pools can vary with different database vendors. Some common properties are the database name (URL), the user name, and the password.
The following tasks and information are used to administer JDBC connection pools:
Use the create-jdbc-connection-pool subcommand in remote mode to register a new JDBC connection pool with the specified JDBC connection pool name. A JDBC connection pool or a connector connection pool can be created with authentication. You can either use a subcommand option to specify user, password, or other connection information using the asadmin utility, or specify the connection information in the XML descriptor file.
One connection pool is needed for each database, possibly more depending on the application. When you are building the connection pool, certain data specific to the JDBC driver and the database vendor is required. You can find some of the following specifics inConfiguration Specifics for JDBC Drivers:
Database vendor name
Resource type, such as javax.sql.DataSource (local transactions only) javax.sql.XADataSource (global transactions)
Data source class name
Required properties, such as the database name (URL), user name, and password
Creating a JDBC connection pool is a dynamic event and does not require server restart. However, there are some parameters that do require server restart. See Configuration Changes That Require Server Restart.
Before creating the connection pool, you must first install and integrate the database and its associated JDBC driver. For instructions, see Setting Up the Database.
Ensure that the server is running.
Remote subcommands require a running server.
Create the JDBC connection pool by using the create-jdbc-connection-pool(1) subcommand.
(Optional) If needed, restart the server.
Some parameters require server restart. See Configuration Changes That Require Server Restart.
This example creates a JDBC connection pool named sample_derby_pool on localhost.
asadmin> create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.XADataSource --property portNumber=1527:password=APP:user=APP:serverName= localhost:databaseName=sun-appserv-samples:connectionAttribut es=\;create\\=true sample_derby_pool Command create-jdbc-connection-pool executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help create-jdbc-connection-pool at the command line.
Use the list-jdbc-connection-pools subcommand in remote mode to list all existing JDBC connection pools.
Ensure that the server is running.
Remote subcommands require a running server.
List the JDBC connection pools by using the list-jdbc-connection-pools(1) subcommand.
This example lists the JDBC connection pools that are on localhost.
asadmin> list-jdbc-connection-pools sample_derby_pool2 poolA __TimerPool DerbyPool sample_derby_pool Command list-jdbc-connection-pools executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help list-jdbc-connection-pools at the command line.
Use the ping-connection-pool subcommand in remote mode to test if a connection pool is usable. For example, if you create a new JDBC connection pool for an application that is expected to be deployed later, you can test the JDBC pool with this subcommand before the application is deployed. Running a ping will force the creation of the pool if it hasn't already been created.
Before you can contact a connection pool, the connection pool must be created with authentication, and the server or database must be running.
Ensure that the server is running.
Remote subcommands require a running server.
Ping a connection pool by using the ping-connection-pool(1) subcommand.
This example tests to see if the DerbyPool connection pool is usable.
asadmin> ping-connection-pool DerbyPool Command ping-connection-pool executed successfully |
You can also view the full syntax and options of the subcommand by typing asadmin help ping-connection-pool at the command line.
Use the flush-connection-pool in remote mode to reinitialize all connections established in the specified connection pool. The JDBC connection pool or connector connection pool is reset to its initial state. Any existing live connections are destroyed, which means that the transactions associated with these connections are lost. The subcommand then recreates the initial connections for the pool, and restores the pool to its steady pool size.
Ensure that the server is running.
Remote subcommands require a running server.
Reset a connection pool by using theflush-connection-pool(1) subcommand.
This example resets the JDBC connection pool named __TimerPool to its steady pool size.
asadmin> flush-connection-pool __TimerPool Command flush-connection-pool executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help flush-connection-pool at the command line.
You can change all of the settings for an existing pool except its name. Use the get and set subcommands to view and change the values of the JDBC connection pool properties.
List the JDBC connection pools by using the list-jdbc-connection-pools(1) subcommand.
View the attributes of the JDBC connection pool by using the get subcommand.
For example:
asadmin get resources.jdbc-connection-pool.DerbyPool.property |
Set the attribute of the JDBC connection pool by using the set subcommand.
For example:
asadmin set resources.jdbc-connection-pool.DerbyPool.steady-pool-size=9 |
(Optional) If needed, restart the server.
Some parameters require server restart. See Configuration Changes That Require Server Restart.
Use the delete-jdbc-connection-pool subcommand in remote mode to delete an existing JDBC connection pool. Deleting a JDBC connection pool is a dynamic event and does not require server restart.
Before deleting a JDBC connection pool, all associations to the resource must be removed.
Ensure that the server is running.
Remote subcommands require a running server.
List the JDBC connection pools by using the list-jdbc-connection-pools(1) subcommand.
If necessary, notify users that the JDBC connection pool is being deleted.
Delete the connection pool by using the delete-jdbc-connection-pool(1) subcommand.
This example deletes the JDBC connection pool named DerbyPool.
asadmin> delete-jdbc-connection-pool jdbc/DerbyPool Command delete-jdbc-connection-pool executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help delete-jdbc-connection-pool at the command line.
A JDBC resource, also known as a data source, provides an application with a means of connecting to a database. Typically, you create a JDBC resource for each database that is accessed by the applications deployed in a domain. Multiple JDBC resources can be specified for a database.
A JDBC resource is created by specifying the connection pool with which the resource will be associated . Use a unique Java Naming and Directory Interface (JNDI) name to identify the resource. For example, the JNDI name for the resource of a payroll database might be java:comp/env/jdbc/payrolldb.
The following tasks and information are used to administer JDBC resources:
Use the create-jdbc-resource subcommand in remote mode to create a JDBC resource. Creating a JDBC resource is a dynamic event and does not require server restart.
Because all JNDI names are in the java:comp/env subcontext, when specifying the JNDI name of a JDBC resource in the Administration Console, use only the jdbc/name format. For example, a payroll database might be specified as jdbc/payrolldb.
Before creating a JDBC resource, you must first create a JDBC connection pool. For instructions, see To Create a JDBC Connection Pool.
Ensure that the server is running.
Remote subcommands require a running server.
Create a JDBC resource by using the create-jdbc-resource(1) subcommand.
Information about properties for the subcommand is included in this help page.
If necessary, notify users that the new resource has been created.
This example creates a JDBC resource named DerbyPool.
asadmin> create-jdbc-resource --connectionpoolid DerbyPool jdbc/DerbyPool Command create-jdbc-resource executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help create-jdbc-resource at the command line.
Use the list-jdbc-resources subcommand in remote mode to list the existing JDBC resources.
Ensure that the server is running.
Remote subcommands require a running server.
List JDBC resources by using the list-jdbc-resources(1) subcommand.
This example lists JDBC resources for localhost.
asadmin> list-jdbc-resources jdbc/__TimerPool jdbc/DerbyPool jdbc/__default jdbc1 Command list-jdbc-resources executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help list-jdbc-resources at the command line.
You can enable or disable a JDBC resource by using the set subcommand. The JDBC resource is identified by its dotted name.
List JDBC resources by using the list-jdbc-resources(1) subcommand.
Modify the values for the specified JDBC resource by using the set(1) subcommand.
For example:
This example changes the res1 enabled setting to false.
asadmin>set resources.jdbc-resource.res1.enabled=false |
Use the delete-jdbc-resource subcommand in remote mode to delete an existing JDBC resource. Deleting a JDBC resource is a dynamic event and does not require server restart.
Before deleting a JDBC resource, all associations with this resource must be removed.
Ensure that the server is running.
Remote subcommands require a running server.
List JDBC resources by using the list-jdbc-resources(1) subcommand.
If necessary, notify users that the JDBC resource is being deleted.
Delete a JDBC resource by using the delete-jdbc-resource(1) subcommand.
This example deletes a JDBC resource named DerbyPool.
asadmin> delete-jdbc-resource jdbc/DerbyPool Command delete-jdbc-resource executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help delete-jdbc-resource at the command line.
After setting up the connection pool and resources, integrate the JDBC driver in either of the following ways:
Make the driver accessible to the common class loader, and restart the domain.
Copy the driver’s JAR and ZIP files into the domain-dir/lib directory or the as-install/lib directory, or copy the driver's class files into the domain-dir/lib/ext directory. Identify the fully-qualified path name for the driver's JAR file.
GlassFish Server is designed to support connectivity to any database management system by using a corresponding JDBC driver.
The following JDBC driver and database combinations have been tested and are supported for container-managed persistence:
To see the most current list of supported JDBC drivers, refer to the Oracle GlassFish Server 3.0.1 Release Notes.
The JAR file for DataDirect driver is db2.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: DB2
DataSource Classname: com.ddtek.jdbcx.db2.DB2DataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate.
user – Set as appropriate.
password – Set as appropriate.
The JAR files for the DB2 driver are db2jcc.jar, db2jcc_license_cu.jar, and db2java.zip. Set your environment variables . For example:
LD_LIBRARY_PATH=/usr/db2user/sqllib/lib:${Java EE.home}/lib DB2DIR=/opt/IBM/db2/V8.2 DB2INSTANCE=db2user INSTHOME=/usr/db2user VWSPATH=/usr/db2user/sqllib THREADS_FLAG=native
Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: DB2
DataSource Classname: com.ibm.db2.jcc.DB2SimpleDataSource
DataDirect DataSource Classname: com.ddtek.jdbcx.db2.DB2DataSource
Properties:
databaseName - Set as appropriate.
user – Set as appropriate.
password – Set as appropriate.
driverType – Set to 2.
deferPrepares – Set to false.
The JAR file for the Java DB driver is derbyclient.jar. (Java DB is based upon Apache Derby.) Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Java DB
DataSource Classname: Specify one of the following:
org.apache.derby.jdbc.ClientDataSource org.apache.derby.jdbc.ClientXADataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server if it is different from the default.
databaseName – Specify the name of the database.
user - Specify the database user.
This is only necessary if Java DB is configured to use authentication. Java DB does not use authentication by default. When the user is provided, it is the name of the schema where the tables reside.
password – Specify the database password.
This is only necessary if Java DB is configured to use authentication.
The JAR file for the DataDirect driver is sqlserver.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Microsoft SQL Server
DataSource Classname: com.ddtek.jdbcx.sqlserver.SQLServerDataSource
Properties:
serverName – Specify the host name or IP address and the port of the database server.
portNumber – Specify the port number of the database server.
user – Set as appropriate.
password – Set as appropriate.
selectMethod – Set to cursor.
The JAR file for the DataDirect driver is mysql.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: MySQL Server
DataSource: com.ddtek.jdbcx.mysql.MySQLDataSource
Properties:
serverName – Specify the host name or IP address and the port of the database server.
portNumber – Specify the port number of the database server.
user – Set as appropriate.
password – Set as appropriate.
selectMethod – Set to cursor.
The JAR file for the MySQL driver is mysql-connector-java-5.1.7-bin.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Microsoft SQL Server
DataSource Classname:
com.mysql.jdbc.jdbc2.optional.MysqlDataSource com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate.
user – Set as appropriate.
password – Set as appropriate.
The JAR file for the DataDirect driver is oracle.jar.
To make the Oracle driver behave in a Java EE-compliant manner, you must set this system property as true: oracle.jdbc.J2EE13Compliant=true.
Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Oracle
DataSource Classname: com.ddtek.jdbcx.oracle.OracleDataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
user – Set as appropriate.
password – Set as appropriate.
The JAR file for the OCI Oracle driver is ojdbc14.jar. Make sure that the shared library is available through LD_LIBRARY_PATH and that the ORACLE_HOME property is set. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Oracle
DataSource Classname: Specify one of the following:
oracle.jdbc.pool.OracleDataSource oracle.jdbc.xa.client.OracleXADataSource
Properties:
user – Set as appropriate.
password – Set as appropriate.
xa-driver-does-not-support-non-tx-operations - Set to the value true. Only needed if both non-XA and XA connections are retrieved from the same connection pool. Might degrade performance.
As an alternative to setting this property, you can create two connection pools, one for non-XA connections and one for XA connections.
The JAR file for the Oracle driver is ojdbc6.jar.
When using this driver, keep in mind that you cannot insert more than 2000 bytes of data into a column. To circumvent this problem, use the OCI driver (JDBC type 2).
To make the Oracle driver behave in a Java EE-compliant manner, you must set this system property as true: oracle.jdbc.J2EE13Compliant=true.
Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Oracle
DataSource Classname: Specify one of the following:
oracle.jdbc.pool.OracleDataSource oracle.jdbc.xa.client.OracleXADataSource
DataDirect DataSource Classname: com.ddtek.jdbcx.oracle.OracleDataSource
Properties:
user – Set as appropriate.
password – Set as appropriate.
xa-driver-does-not-support-non-tx-operations - Set to the value true. Optional: only needed if both non-XA and XA connections are retrieved from the same connection pool. Might degrade performance.
As an alternative to setting this property, you can create two connection pools, one for non-XA connections and one for XA connections.
For the Oracle thin driver, the XAResource.recover method repeatedly returns the same set of in-doubt Xids regardless of the input flag. According to the XA specifications, the Transaction Manager initially calls this method with TMSTARTSCAN and then with TMNOFLAGS repeatedly until no Xids are returned. The XAResource.commit method also has some issues.
To disable this GlassFish Server workaround, the oracle-xa-recovery-workaround property value must be set to false.
The JAR file for the PostgreSQL driver is postgresql-8.4-701.jdbc4.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: PostgreSQL Server
DataSource Classname: org.postgresql.ds.PGSimpleDataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate.
user – Set as appropriate.
password – Set as appropriate.
The JAR file for the DataDirect driver is sybase.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Sybase
DataSource Classname: com.ddtek.jdbcx.sybase.SybaseDataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate. This is optional.
user – Set as appropriate.
password – Set as appropriate.
The following JDBC drivers can also be used with GlassFish Server, but have not been fully tested. Although Oracle offers no product support for these drivers, Oracle does offer limited support for the use of these drivers with GlassFish Server:
Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Informix
DataSource Classname: Specify one of the following:
com.informix.jdbcx.IfxDataSource com.informix.jdbcx.IfxXADataSource
DataDirect DataSource Classname: com.ddtek.jdbcx.informix.InformixDataSourcee
Properties:
serverName – Specify the Informix database server name.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate. This is optional.
user – Set as appropriate.
password – Set as appropriate.
IfxIFXHost – Specify the host name or IP address of the database server.
The JAR file for the Inet Oracle driver is Oranxo.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Oracle
DataSource Classname: com.inet.ora.OraDataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
user – Specify the database user.
password – Specify the database password.
serviceName – Specify the URL of the database. The syntax is as follows:
jdbc:inetora:server:port:dbname
For example:
jdbc:inetora:localhost:1521:payrolldb
In this example,localhost is the name of the host running the Oracle server, 1521 is the Oracle server’s port number, and payrolldb is the SID of the database. For more information about the syntax of the database URL, see the Oracle documentation.
streamstolob - If the size of BLOB or CLOB data types exceeds 4 KB and this driver is used for CMP, this property must be set to true.
xa-driver-does-not-support-non-tx-operations - Set to the value true. Only needed if both non-XA and XA connections are retrieved from the same connection pool. Might degrade performance.
As an alternative to setting this property, you can create two connection pools, one for non-XA connections and one for XA connections.
The JAR file for the Inet Microsoft SQL Server driver is Merlia.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Microsoft SQL Server
DataSource Classname: com.inet.tds.TdsDataSource
Properties:
serverName – Specify the host name or IP address and the port of the database server.
portNumber – Specify the port number of the database server.
user – Set as appropriate.
password – Set as appropriate.
The JAR file for the Inet Sybase driver is Sybelux.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Sybase
DataSource Classname: com.inet.syb.SybDataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate. Do not specify the complete URL, only the database name.
user – Set as appropriate.
password – Set as appropriate.
The JAR file for the Sybase driver is jconn4.jar. Configure the connection pool using the following settings:
Name: Use this name when you configure the JDBC resource later.
Resource Type: Specify the appropriate value.
Database Vendor: Sybase
DataSource Classname: Specify one of the following:
com.sybase.jdbc4.jdbc.SybDataSource com.sybase.jdbc4.jdbc.SybXADataSource
Properties:
serverName – Specify the host name or IP address of the database server.
portNumber – Specify the port number of the database server.
databaseName – Set as appropriate. Do not specify the complete URL, only the database name.
user – Set as appropriate.
password – Set as appropriate.
BE_AS_JDBC_COMPLIANT_AS_POSSIBLE – Set to true.
FAKE_METADATA – Set to true.