Class: com.sybase.djc.sql.DataSource (Data Source) EAServer 6.3 Help
Description Defines a JDBC data source and its connection pool.
Configuration See Set Properties Task.
Properties aliasFor, authenticatedSQL, codeSet, commitProtocol, dataSourceClass, databaseCommandEcho, databaseCreateCommand, databaseFile, databaseName, databaseStartCommand, databaseStopCommand, databaseType, databaseURL, disableAutoCommit, disablePrefetch, disableTriggers, driverClass, highAvailability, initialPoolSize, isDownloadZipped, jdbcDriverDownloadURL, language, maxIdleTime, maxPoolSize, maxStatements, maxWaitTime, minPoolSize, networkProtocol, ownerPrefix, password, pingAndSetSessionAuth, pingConnections, pingSQL, portNumber, proxyFor, roleName, serverName, serviceName, setSessionAuth, setSessionAuthSystemID, startWait, useTransactionalPing, user, xaDataSourceClass
Files Repository/Instance/com/sybase/djc/sql/DataSource/*.properties

Property: aliasFor (Alias For)
Description Specifies the name of another data source that this data source is an alias for. An alias is just an alternate name for another data source. A data source and its alias(es) share the same connection pool.

Property: authenticatedSQL (Authenticated Statement)
Description Authenticated Statement for accessing the Database
Only Used If Property aliasFor is not specified.

Property: codeSet (Locale/Codeset)
Description Name of the CS_SYB_CHARSET for this data source. This value is currently only applied to OpenClient connections from the database type JCM_Sybase. A value of "[server]" indicates that the value should be taken from the current application server's defaultCodeSet property.
Only Used If Property aliasFor is not specified.
Default Value [server]

Property: commitProtocol (Commit Protocol)
Description Determines how connections for this data source should be handled at commit time.

The value "optimistic" enables connections to be committed without regard for other connections enlisted in the transaction, assuming that the transaction is not marked for rollback and will successfully commit on all resources. Note: if a transaction accesses multiple data sources with commit protocol of "optimistic", atomicity is not guaranteed.

The value "pessimistic" specifies that you do not expect any multi-resource transactions. An exception will be thrown (and transaction rolled back) if any attempt is made to use more than one "pessimistic" data source in the same transaction.

The value "XA_2PC" specifies use of the XA two phase commit protocol. If you are using two phase commit, then the recovery log is stored in the "tx_manager" data source, and that data source (or the one it is aliased to) must have the commit protocol of "optimistic" or "pessimistic". All other data sources for which atomicity must be ensured should have the "XA_2PC" commit protocol.

Only Used If Property aliasFor is not specified.
Default Value pessimistic
Legal Values optimistic, pessimistic, XA_2PC

Property: dataSourceClass (JDBC Data Source Class)
Description Specifies the JDBC data source class. If the commitProtocol is "XA_2PC", then you should also specify xaDataSourceClass. Otherwise you can alternately specify driverClass.

Note: these properties can also be specified at the level of the databaseType.

When using container-managed persistence with Sybase or Oracle databases, you can enable a JIT driver wrapper to optimize the interaction between the persistence manager and the database server. To configure this:

  • For Sybase, set "dataSourceClass" to "com.sybase.djc.sql.jit.SybaseDataSource3" and "xaDataSourceClass" to "com.sybase.djc.sql.jit.SybaseXADataSource3".
  • For Sybase, set "dataSourceClass" to "com.sybase.djc.sql.jit.OracleDataSource3" and "xaDataSourceClass" to "com.sybase.djc.sql.jit.OracleXADataSource3".

See also: JIT Driver Wrapper Properties.

Property: databaseCommandEcho (Database Command Echo)
Description Determines whether database commands (databaseCreateCommand, databaseStartCommand, databaseStopCommand) are echoed to the server console and log when the commands are run.
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: databaseCreateCommand (Database Create Command)
Description An operating system command to create the database for this data source. If this command is defined, and the file referenced by the databaseFile property does not exist, the command will be run to create the database when the data source is activated.
Only Used If Property aliasFor is not specified.

Property: databaseFile (Database File)
Description Name of the database file for this data source. This may be referenced as ${databaseFile} in other property definitions for this data source.
Only Used If Property aliasFor is not specified.

Property: databaseName (Database Name)
Description Name of the database for this data source. This may be referenced as ${databaseName} in other property definitions for this data source (e.g. the databaseURL property). A value of "[default]" indicates that the value should be taken from the databaseName property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: databaseStartCommand (Database Start Command)
Description An operating system command to start the database for this data source. If this command is defined, and the database is not running, the command will be run to start the database when the data source is activated.
Only Used If Property aliasFor is not specified.

Property: databaseStopCommand (Database Stop Command)
Description An operating system command to stop the database for this data source. If this command is defined, and the database is running, the command will be run to stop the database during application server shutdown.
Only Used If Property aliasFor is not specified.

Property: databaseType (Database Type)
Description The type of database for this data source. This must be the name of a configured Database Type.
Only Used If Property aliasFor is not specified.
Default Value Unknown

Property: databaseURL (Database URL)
Description JDBC URL for connecting to the database. Other data source properties can be referenced in the URL, e.g. "jdbc:sybase:Tds:${serverName}:${portNumber}". A value of "[default]" indicates that the value should be taken from the databaseURL property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: disableAutoCommit (Disable Auto Commit)
Description Don't allow to call auto commit.
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: disablePrefetch (Disable Prefetch)
Description Disables query batching and transactional fetch prediction.

See prefetch (Transaction Property).

Default Value false
Legal Values false, true

Property: disableTriggers (Disable Triggers)
Description Enable this if all database triggers should be deactivated (on a per-connection basis) when the application server is accessing the database. If this option is selected, the database needs to support the "set triggers off" and "set triggers on" commands. For Sybase ASE, this requires the dataSource user to have the "replication_role" database role.

This property is useful particularly when using container managed persistence with version columns for optimistic concurrency control. Database triggers permit external updates to the database (made by non-application-server clients) to update the necessary version columns. Disabling of triggers when the application server accesses the database avoids both the application server and database server issuing updates to version columns. If version volumns are doubly updated, it can result in unnecessary optimistic concurrency failures which require transaction retry. This is particularly relevant if using an isolation level of ReadCommittedWithCache, RepeatableReadWithCache, or SerializableWithCache.

Default Value false
Legal Values false, true

Property: driverClass (JDBC Driver Class)
Description The JDBC driver class name.

Property: highAvailability (High Availability)
Description Initialize the CTLIB connection with the CS_HAFAILOVER attribute.
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: initialPoolSize (Initial Pool Size)
Description The number of initial connections which should be opened and saved in the connection pool when the data source is activated.
Only Used If Property aliasFor is not specified.
Default Value 0
Minimum Value 0
Maximum Value 2147483647

Property: isDownloadZipped (DownloadFile Zipped)
Description Specifies if the downloaded file is a zip file. If the flag is set then EAServer will try to unzip the downloaded file before putting it into $DJC_HOME/lib/jdbc directory
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: jdbc:* (Provider Specific Connection Properties)
Description Any data source property with a name starting with "jdbc:" will be treated as a JDBC provider specific connection property. It will be passed through to the underlying JDBC driver, with the "jdbc:" prefix removed.

Property: jdbcDriverDownloadURL (Jdbc Driver Download URL)
Description URL to specify location of the client side driver. URL is used to download drivers if it does not exist. If no driver is specified then the download process will not happen. The downloaded files will be put into directory $DJC_HOME/lib/jdbc
Only Used If Property aliasFor is not specified.

Property: jit:* (JIT Driver Wrapper Properties)
Description Properties to configure the JIT driver wrapper. The JIT driver wrapper optimizes the performance of container-managed persistence (e.g. EJB entity beans) by a combination of prepared statement caching and batching of deferred statements (delete, insert, update and verify). For Sybase databases, rather than using "prepared statement caching" as such, the JIT driver wrapper creates optimized "just-in-time" stored procedures. The available properties are:
jit:batchCommit (true or false, default value: true)
For Sybase databases only, enables batching of commit / begin tran with generated stored procedures. This reduces round trips between the application server and database server.
jit:cachePreparedStatements (true or false, default value: true)
Enables caching of prepared statements used for contained-managed persistence. Other prepared statements (e.g. used by explicit JDBC calls) will not be cached by this property.
jit:clonePreparedStatements (true or false, default value: true)
Enables cloning of prepared statements used for contained-managed persistence. Cloning prepared statements is only applicable to Sybase ASE databases accessed via jConnect. This option is beneficial to reduce overheads when jit:maximumStatementsInCache is lower than the number of active statements per connection.
jit:maximumParametersInBatch (integer, default value: 99)
The maximum number of statement parameters that can be accomodated by a "batch stored procedure". The JIT driver wrapper creates a distinct stored procedure for each distinct batch of statements it sees.
jit:maximumStatementsInBatch (integer, default value: 4)
The maximum number of statements that can be accomodated by a "batch stored procedure". Warning: setting this value larger than the default value may result in thousands of stored procedures being created, which isn't necessarily bad but may require you to configure your database server with more procedure cache. To check the number of stored procedures that are created when testing your application, check your database for stored procedures with names starting with "jit_sp". Or, you can check the server log for messages starting with "Using stored procedure ...".
jit:maximumStatementsInCache (integer, default value: 100)
The maximum number of prepared statements that will be cached per connection. This applies only to prepared statements used for contained-managed persistence. Other prepared statements (e.g. used by explicit JDBC calls) will not be cached by this property.
jit:printWarnings (true or false, default value: true)
Enables printing of SQL warnings captured by the JIT driver wrapper to the server log.
jit:traceConnect (true or false, default value: false)
Enables trace messages to the server log when the JIT driver wrapper opens new database connections. This can be useful if you wish to confirm that new connections are not opened too frequently.

Recommendation: conduct your own performance tests to determine the best values for these properties in your environment. Check both your system throughput and JVM memory utilization. For the latter, you may find that enabling the "Dump60SecondMemoryUsage" scheduled task to be helpful.

See also: dataSourceClass.

Property: language (Locale/Language)
Description Name of the CS_SYB_LANG for this data source. This value is currently only applied to OpenClient connections from the database type JCM_Sybase.
Only Used If Property aliasFor is not specified.

Property: maxIdleTime (Maximum Idle Time)
Description The maximum number of seconds a connection may remain idle in the data source's connection pool before the connection will be automatically closed. A value of zero implies no timeout.
Only Used If Property aliasFor is not specified.
Default Value 60
Minimum Value 0
Maximum Value 2147483647

Property: maxPoolSize (Maximum Pool Size)
Description The maximum number of connections that will be allocated to the connection pool for this data source. A value of zero implies no limit to the connection pool size.

If you enable the useTransactionLocalPools server property, then this property will be ignored. Instead, you should use the maximumActiveThreads thread monitor property to limit the number of threads that may be simultaneously active (and thereby possibly using pooled connections).

Only Used If Property aliasFor is not specified.
Default Value 10
Minimum Value 0
Maximum Value 2147483647

Property: maxStatements (Maximum Cached Statements)
Description The maximum number of JDBC prepared statements that will be cached (per connection) by the JDBC driver. Whether or not this property is used is JDBC driver specific.
Only Used If Property aliasFor is not specified.
Default Value 0
Minimum Value 0
Maximum Value 2147483647

Property: maxWaitTime (Maximum Wait Time)
Description The maximum number of seconds a connection a thread will wait to obtain a connection from the pool before giving up (which results in a ResourceMonitorTimeoutException).
Only Used If Property aliasFor is not specified.
Default Value 60
Minimum Value 0
Maximum Value 2147483647

Property: minPoolSize (Minimum Pool Size)
Description The minimum size to which the connection pool should be pruned when connections remain are idle for more than maxIdleTime seconds.
Only Used If Property aliasFor is not specified.
Default Value 0
Minimum Value 0
Maximum Value 2147483647

Property: networkProtocol (Network Protocol)
Description Name of the network protocol that the database server uses for network communication. Whether or not this property is used is JDBC driver specific. A value of "[default]" indicates that the value should be taken from the networkProtocol property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: ownerPrefix (Owner Prefix)
Description Owner prefix for stored procedure and table names in this data source. This prefix (if specified) is used by the EJB persistence manager and JIT driver wrappers to qualify database identifiers for stored procedures and tables. If specified, the prefix may need to include a trailing dot character (e.g. "dbo.").
Only Used If Property aliasFor is not specified.

Property: password (Password)
Description Password for connecting to the database. To avoid having plain-text passwords stored in the data source properties file, you should specify "*" (if defining the data source using an XML configuration script) and use the Web Console to set a password that will be stored in encrypted form. A value of "[default]" indicates that the value should be taken from the password property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: pingAndSetSessionAuth (Ping with set session auth)
Description When pinging a connection, include set session authorization?
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: pingConnections (Ping Pooled Connections)
Description Specifies whether to 'ping' connections before using them when they are re-used from the data source's connection pool. This will cause some degradation in performance. If you have enabled transaction retry for your EJB transactions, then dead database connections will be discarded automatically (usually after a rollback). So for improved performance, consider setting pingConnections to false and relying on transaction retry.
Only Used If Property aliasFor is not specified.
Default Value true
Legal Values false, true

Property: pingSQL (Ping Statement)
Description SQL statement used to ping a database connection.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: portNumber (Port Number)
Description Number of the server port that the database server listens to for connection requests. Although this is JDBC driver specific, it is usually a TCP/IP port number [1..65535]. A value of "[default]" indicates that the value should be taken from the portNumber property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: proxyFor (Proxy For)
Description Sets up this data source to be a proxy (alias) for another data source. The value for the proxyFor property is the JNDI name of the other data source. When proxyFor is specified, all other data source properties are ignored.

Property: roleName (Role Name)
Description Database role name. A value of "[default]" indicates that the value should be taken from the roleName property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: serverName (Server Name)
Description Name of the host where the database server resides. Although this is JDBC driver specific, it is usually a TCP/IP host name. A value of "[default]" indicates that the value should be taken from the serverName property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: serviceName (Service Name)
Description Name of the service for this data source. A value of "[default]" indicates that the value should be taken from the serviceName property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: setSessionAuth (Set Session Authorization)
Description Specifies that the ANSI SQL "set session authorization" command should be used at the start of each database transaction to establish an effective database identity that matches the current application server user.
Only Used If Property aliasFor is not specified.
Default Value false
Legal Values false, true

Property: setSessionAuthSystemID (Set Session Authorization System ID)
Description When the setSessionAuth property is true, and the application server accesses the database from a transaction that runs with 'system' identity, setSessionAuthSystemID specifies the corresponding database identity that should be used.
Only Used If Property aliasFor is not specified.

Property: startWait (Start Wait Time)
Description If databaseStartCommand is specified, then startWait specifies the number of seconds to wait for the start command to run before reporting a connection problem. If the start command completes successfuly within this time period, no exceptions should be reported in the server log.
Only Used If Property aliasFor is not specified.
Default Value 60
Minimum Value 0
Maximum Value 2147483647

Property: useTransactionalPing (Ping with Transaction)
Description Flag for specifying type of ping to be done from webconsole, jagtool and jagant. This will allow users to ping database that do not support transaction. Default value is to use transactional ping.
Only Used If Property aliasFor is not specified.
Default Value true
Legal Values false, true

Property: user (User)
Description Username for connecting to the database. A value of "[default]" indicates that the value should be taken from the user property of the database type referenced by the databaseType property.
Only Used If Property aliasFor is not specified.
Default Value [default]

Property: xaDataSourceClass (JDBC/XA Data Source Class)
Description The class or library name used to support two-phase commit transactions, and the name of the XA resource library.