1. Data Source Commands
The following is a list of data source commands that manage data sources and change data source configurations.
Command | Description |
---|---|
Dynamically adds a cluster data source to the domain. |
|
Dynamically adds a data source to the domain. |
|
Displays a list of all cluster data sources in the domain. If a data source ID is specified, its configuration is displayed in detail. |
|
Displays a list of all data sources in the domain. If a data source ID is specified, its configuration is displayed in detail. |
|
Changes the configuration of a cluster data source. Most configurations can be changed dynamically. |
|
Changes the configuration of a data source. Some configurations can be changed dynamically. |
|
Deletes a cluster data source from the domain. |
|
Deletes a data source from the domain. |
|
Checks if a data source configuration is correct. |
1.1. add-cluster-data-source
Dynamically adds a cluster data source to the domain.
-
Alias
addcds
-
Usage
add-cluster-data-source [-id,--dataSourceID <data-source-id>] [-en,--exportName <export-name>] [-dss,--dataSourceSelector <data-source-selector>] [-lb,--loadBalance <true | false>] [-ipc,--isPreConn <is-pre-conn>] [-ufb,--useFailback <use-failback>] [-cds,--componentDataSources <component-data-sources>] [-oc,--onsConfig <ons-config>] [-dsa,--dataSourceAffinity <data-source-affinity>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Cluster data source ID. The cluster data source ID must be unique within a domain.
[-en,--exportName <export-name>]
JNDI name of the cluster data source.
If two data sources are guaranteed to be bound to different JNDIs on different servers, they can have the same JNDI name. Different data sources with the same JNDI names are not allowed on the same server.
If not specified, the cluster data source ID is used as the JNDI name.
Multiple JNDI names can be specified by using comma (,) delimiter, and JNDI lookup can be used for any of these specified JNDI names.
[-dss,--dataSourceSelector <data-source-selector>]
When obtaining connections from cluster data sources, users or developers can customize policies for a specific component data source selection by inheriting and implementing the jeus.jdbc.helper.DataSourceSelector abstract class. Next, the class name to include the implementation class package name must be set. After it is set, the Load Balance configuration is ignored, and failover and failback are performed unconditionally.
-
Failover is performed for one round, starting from the next index of the component data source that was initially selected.
-
Failback is performed in the same fashion as when Use Failback is set. The implementor must consider synchronization when defining the policy.
[-lb,--loadBalance <true | false>]
Option to use load balancing.
-
true : the configuration --useFailback is ignored.
[-ipc,--isPreConn <is-pre-conn>]
Option to create connection pools of component data sources that belong to the cluster data source, in advance. Although creating connection pools in advance can improve performance, it is not a good use of resources.
[-ufb,--useFailback <use-failback>]
This option provides compatibility with earlier versions of JEUS that only support failover.
Option to perform failback using the main data source after performing failover using the assistant data source. By default, failback is performed.
To perform failback, --checkQuery and --checkQueryPeriod must be set for the main data source.
[-cds,--componentDataSources <component-data-sources>]
Data source ID of the component data sources that belong to the cluster data source.
[-oc,--onsConfig <ons-config>]
Set to use a cluster data source associated with ONS. Specify an IP address and a port number used for each ONS RAC node to perform ONS communication. The cluster data source uses the information to make a socket connection and operates as an ONS client.
Use the following format.
nodes=host1:6200,host2:6200
[-dsa,--dataSourceAffinity <data-source-affinity>]
Option for data source affinity configuration for transactions. If this option is turned on, a transaction process is executed only for a single member data source instance. Therefore, global transaction performance is improved, and the performance is ensured even for local transactions with XA emulation configuration when using cluster data sources.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
-
Example
[MASTER]domain1.adminServer>add-cluster-data-source -id cds1 -cds ds1,ds2 Successfully performed the ADD operation for cluster data source [cds1] to domain. Check the results using "add-cluster-data-source"
1.2. add-data-source
Dynamically adds a data source to the domain.
-
Alias
addds
-
Usage
add-data-source [-id,--dataSourceID <data-source-id>] [-user,--user <user>] [-pw,--password <password>] [-algorithm,--algorithm <algorithm>] [-ac,--autoCommit <auto-commit-value>] [-sqt,--stmtQueryTimeout <statement-query-timeout>] [-aocl,--actionOnConnectionLeak <action-on-connection-leak>] [-min,--min <minimum-size>] [-max,--max <maximum-size>] [-step,--step <resizing-step>] [-period,--period <resizing-period>] [-ew,--enableWait <true | false>] [-wt,--waitTime <wait-time>] [-dds,--delegationDataSource <delegation-data-source>] [-muc,--maxUseCount <max-use-count>] [-cq,--checkQuery <check-query>] [-cqt,--checkQueryTimeout <check-query-timeout>] [-nvi,--nonValidationInterval <non-validation-interval>] [-cqp,--checkQueryPeriod <check-query-period>] [-cqrc,--checkQueryRetrialCount <check-query-retrial-count>] [-dpocq,--destroyPolicyOnCheckQuery <destroy-policy-on-check-query>] [-scs,--stmtCachingSize <stmt-caching-size>] [-sfs,--stmtFetchSize <stmt-fetch-size>] [-ct,--connectionTrace <true | false>] [-gct,--getConnectionTrace <get-connection-trace>] [-act,--autoCommitTrace <auto-commit-trace>] [-ust,--useSqlTrace <use-sql-trace>] [-kcho,--keepConnectionHandleOpen <keep-connection-handle-open>] [-en,--exportName <export-name>] [-dscn,--dataSourceClassName <data-source-class-name>] [-dst,--dataSourceType <data-source-type>] [-vendor,--vendor <vendor>] [-desc,--description <description>] [-sn,--serverName <server-name>] [-pn,--portNumber <port-number>] [-dn,--databaseName <database-name>] [-lt,--loginTimeout <login-timeout>] [-il,--isolationLevel <isolation-level>] [-pdt,--poolDestroyTimeout <pool-destroy-timeout>] [-prop,--property <property>] [-sxe,--supportXaEmulation <support-xa-emulation>] [-ddba,--delegationDba <delegation-dba>] [-dbat,--dbaTimeout <dba-timeout>] [-cqc,--checkQueryClass <check-query-class>] [-is,--initSql <init-sql>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Data source ID. The data source ID must be unique within the domain.
[-user,--user <user>]
Database user ID. The user must have the proper permissions to handle transactions.
[-pw,--password <password>]
Database user password. To encrypt the password before storing, use the '{algorithm:keysize}ciphertext' format.
[-algorithm,--algorithm <algorithm>]
[Dynamic] Encryption algorithm for the database user password. This option must be used with the -password option.
The following algorithm can be used:
-
base64
-
DES
-
DESede
-
AES
-
SEED
-
Blowfish
[-ac,--autoCommit <TRUE | FALSE | DRIVER> ]
Option to use the auto-commit configuration of the data source.
-
TRUE
-
FALSE
-
DRIVER: If DRIVER is selected, the auto-commit configuration of the JDBC driver is used. The configuration value can only be set when the transaction is not linked to the connection pool data sources that use the XA emulation function or linked to XA data sources.
[-sqt,--stmtQueryTimeout <statement-query-timeout> ]
Query timeout used for java.sql.Statement objects created through the data source connection.
JEUS calls the query timeout configuration method (java.sql.Statement#setQueryTimeout) defined in the JDBC API and implemented by the JDBC driver vendor. The query timeout differs depending on the JDBC driver vendors. (Unit: ms)
[-aocl,--actionOnConnectionLeak <action-on-connection-leak>]
Determines the action JEUS takes when it detects JDBC connections used by applications (stateless component - servlet/JSP, stateless session bean, MDB), but not yet returned.
Input options: (If not specified, the configuration of the server is used.)
-
NO_ACTION: Take no actions.
-
WARNING: Log the information of the JDBC connections that are not returned.
-
AUTO_CLOSE: Log the information of the unreturned JDBC connections and collect them.
[-min,--min <minimum-size>]
Minimum number of connections in the connection pool.
[-max,--max <maximum-size>]
Maximum number of connections in the connection pool.
[-step,--step <resizing-step>]
Number of DB connections obtained if the number of connections is insufficient and the number of connections in the connection pool is less than the maximum value.
[-period,--period <resizing-period>]
Period in which to adjust the connection pool size based on the minimum value. If the connection pool size is greater than the minimum value, unused connections are closed. If the size is less than the minimum value, new DB connections are obtained. (Unit: ms)
[-ew,--enableWait <true | false>]
Determines how to handle connection requests when no connections are available in the pool and additional connections cannot be added.
-
true: Wait until a connection is available.
-
false: Create a new (disposable) connection that does not enter the pool and is discarded after use.
[-wt,--waitTime <wait-time>]
Period in which to wait for a connection if --enable-wait is true. If a connection cannot be obtained within the period, JEUS generates a timeout exception. (Unit: ms)
[-dds,--delegationDataSource <delegation-data-source>]
If a request does not involve a transaction, it is better to get a connection from the connection pool data source instead of from the XA data source.
In this situation, a connection from the connection pool data source provides the same functionality as a connection from the XA data source, but with a smaller impact on system performance. Therefore, when using the XA data source, delegate connection requests unrelated to transactions to the connection pool data source.
When Oracle and DB2 use XA connections for both cases, with or without transactions, unexplained errors can occur; using this configuration can help avoid such situation.
[-muc,--maxUseCount <max-use-count>]
Maximum number of times a connection can be used. If the number of times a connection is used exceeds the specified number, the connection is replaced with a new connection.
The default value is 0: a connection is not replaced.
[-cq,--checkQuery <check-query>]
Query (query-check) that checks the connection status.
Simple selection queries are recommended when validating the connection to the DB.
[-cqt,--checkQueryTimeout <check-query-timeout>]
When a check-query is executed to check the connection status, a driver can be in the wait state indefinitely if the DB does not respond. Apply a timeout to the check-query to avoid this situation.
This can be set by using the java.sql.Statement#setQueryTimeout method defined in the JDBC API.
If the value is less than 1000ms, the value is set to 0. (Unit: ms)
[-nvi,--nonValidationInterval <non-validation-interval>]
Option to skip connection checks if the interval between the last check and the recent check is within the specified interval.
This option is useful for when overhead is created by frequent connection checks. (Unit: ms)
For example, if the option is set to 5000 ms, and 5 seconds has not passed since the last connection check, connections are sent to the applications without being checked.
[-cqp,--checkQueryPeriod <check-query-period>]
Checks the connections in the connection pool at the specified interval to delete faulty connections. (Unit: ms)
For data sources that belong to cluster data sources, this option must be set to be used for checking its own state.
[-cqrc,--checkQueryRetrialCount <check-query-retrial-count>]
If --destroyPolicyOnCheckQuery is set to FAILED_CONNECTION_ONLY, a connection check is performed only once.
If --destroyPolicyOnCheckQuery is set to ALL_CONNECTIONS and a problem is detected during the first connection check, all other connections are also checked, resulting in the connection check being performed twice.
The total connection check count is determined by adding this option value to the default connection check value.
[-dpocq,--destroyPolicyOnCheckQuery <destroy-policy-on-check-query>]
Policy for connections in the connection pool when invalid connections are found.
-
FAILED_CONNECTION_ONLY: Delete only invalid connections.
-
ALL_CONNECTIONS: Delete invalid connections and validate other connections in the connection pool. If another invalid connection is detected in the pool, delete all the connections from the connection pool.
[-scs,--stmtCachingSize <stmt-caching-size>]
JDBC driver parses SQL statements sent as parameters whenever applications request prepared statements. Parsing SQL statements can affect system performance, so JEUS offers a function that internally caches the prepared statements. This option sets the number of prepared statements that can be cached. If this option is used, connections are always open, so the clear job performed by the driver is not executed.
For example, when the Oracle JDBC driver sets auto-commit to false and closes the connection without executing commit or rollback, commit is executed unconditionally.
The use of the statement caching function is recommended if provided by the JDBC driver.
[-sfs,--stmtFetchSize <stmt-fetch-size>]
Fetch size of the JDBC driver statement.
[-ct,--connectionTrace <true | false>]
Option to offer additional information for connections.
-
false: --getConnectionTrace and --autoCommitTrace cannot be used.
[-gct,--getConnectionTrace <get-connection-trace>]
Displays the stack trace when the application calls java.sql.DataSource#getConnection.
[-act,--autoCommitTrace <auto-commit-trace>]
Records logs and the stack trace to server logs when java.sql.Connection#setAutoCommit is called. The log level of jeus.jdbc.connection-trace logger must be set to FINE.
[-ust,--useSqlTrace <use-sql-trace>]
Displays SQL queries used by connections.
If the jeus.jdbc.sql logger level is set to FINE, the SQL query history can be checked in server logs. If this function is used, the statement implementation class of the JDBC driver is wrapped by a JEUS class. Therefore, applications that cast and use statement objects of the JDBC driver cannot use this function.
[-kcho,--keepConnectionHandleOpen <keep-connection-handle-open>]
If this option is set to true and an XA connection is used and returned to the pool, the handle (or the logical connection) is kept open.
This function is required when using DB2 universal drivers. If this option is used, connections are always open, so the clear job performed by the driver is not executed.
For example, when the Oracle JDBC driver sets auto-commit to false and closes the connection without executing commit or rollback, commit is executed unconditionally.
[-en,--exportName <export-name>]
JNDI name of the data source.
If two data sources are guaranteed to be bound to different JNDIs on different servers, they can have the same JNDI name. Different data sources with the same JNDI names are not allowed on the same server.
If not specified, the data source ID is used as the JNDI name.
Multiple JNDI names can be specified by using comma (,) delimiter, and JNDI lookup can be used for any of these specified JNDI names.
[-dscn,--dataSourceClassName <data-source-class-name>]
JDBC driver data source class name. Enter the full name, including the package name.
[-dst,--dataSourceType <data-source-type>]
Data source type.
-
DATA_SOURCE: Connection pooling service is not provided.
-
CONNECTION_POOL_DATA_SOURCE: Connection pooling service is provided.
-
XA_DATA_SOURCE: XA interface and the connection pooling service are provided.
[-vendor,--vendor <vendor>]
JDBC driver vendor name.
[-desc,--description <description>]
Displays data source descriptions.
[-sn,--serverName <server-name>]
Host name or IP at which the database runs.
[-pn,--portNumber <port-number>]
Listener port number of the database.
[-dn,--databaseName <database-name>]
Database name.
Sets the database SID (for Oracle).
[-lt,--loginTimeout <login-timeout>]
Maximum time to wait for the login screen to connect to the database. (Unit: seconds)
[-il,--isolationLevel <isolation-level>]
Transaction isolation level defined in java.sql.Connection.
[-pdt,--poolDestroyTimeout <pool-destroy-timeout>]
Amount of time in wait for the connection pool destroy command to complete. (Unit: ms)
The connection pool is destroyed when applications that defined the data sources are undeployed or when the server goes down. During this process, if the connection is used for network communication with a DB, the destroy process can be blocked and left hanging indefinitely. This option is used to avoid this situation. If this option is set, connection pool destruction waits the specified time period and then performs undeployment or terminates the server.
[-prop,--property <property>]
This option provides a unified configuration method to accommodate all property configurations that can differ by JDBC driver.
For a single property, use the 'name:type=value' format.
To specify multiple properties, separate each property with a comma (,).
[-sxe,--supportXaEmulation <support-xa-emulation>]
This option only applies to the connection pool data source type. This option emulates the connection pool data source connection to participate in a global transaction (XA).
For JEUS 6 and earlier versions, this option is an alternative to LocalXADataSource. It is used in the ConnectionPoolDataSource type connection pools.
Note that only one connection pool data source can participate per transaction.
[-ddba,--delegationDba <delegation-dba>]
JNDI name of the data source (hereafter DBA delegation data source), which has permission to forcibly terminate database sessions (DBA permission). If there is a delay in handling a query through the connection received from the data source, a query that forcibly terminates the DB session is sent to the DB using the DBA delegation data source. After the application handles exceptions that occurred due to the disabled connection, it closes the connection. JEUS then deletes the connection and gets a new connection from the DB and assigns it to the connection pool.
Currently, this function is supported for Tibero, Oracle, and Sybase. It was created to suspend queries that take too long to perform for JDBC driver version 2.0 and earlier. For JDBC driver version 3.0 and later, it is recommended to use java.sql.Statement#setQueryTimeout instead of forcibly terminating DB sessions.
Especially for XA data sources, if DB sessions are terminated while XA operates normally, the XA operation can generate an error. Therefore, use the statement query timeout and the transaction timeout properties.
[-dbat,--dbaTimeout <dba-timeout>]
The delegation DBA data source waits the specified time period for queries on a connection to finish. If timeout occurs, a query is sent to the DB that forcibly terminates the DB session.
This option only applies when --delegationDba is set. (Unit: ms)
[-cqc,--checkQueryClass <check-query-class>]
Class name, which includes the package name, that implements the function for users or developers who want to customize the connection check function.
The class must implement the jeus.jdbc.connectionpool.JEUSConnectionChecker interface.
[-is,--initSql <init-sql>]
SQL query that is initially handled after a connection has been created.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
-
Example
[MASTER]domain1.adminServer>add-data-source -id ds1 -dst ConnectionPoolDataSource -dscn oracle.jdbc.pool.OracleConnectionPoolDataSource -sn 61.77.153.4 -pn 1521 -dn orcl -user scott -password tiger -property driverType;java.lang.String;thin Successfully performed the ADD operation for data source [ds1] to domain. Check the results using "add-data-source"
1.3. list-cluster-data-sources
Displays a list of all cluster data sources in the domain. If a data source ID is specified, its configuration is displayed in detail.
-
Alias
listcds, lscds
-
Usage
list-cluster-data-sources [-id,--dataSourceID <data-source-id>]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Cluster data source ID.
-
Example
[MASTER]domain1.adminServer>list-cluster-data-sources The list of cluster data sources ================================================================================ +--------------------+-----------------------+---------------------------------+ | Data source ID | JNDI export name | Component data sources | +--------------------+-----------------------+---------------------------------+ | cds1 | cds1 | [ds1, ds2] | | cds2 | cds2 | [ds3, ds4] | +--------------------+-----------------------+---------------------------------+ ================================================================================ [MASTER]domain1.adminServer>list-cluster-data-sources -id cds1 The configuration of cluster data source [cds1] ================================================================================ +------------------------------------------+-----------------------------------+ | Configuration name | Configuration value | +------------------------------------------+-----------------------------------+ | id | cds1 | | export-name | cds1 | | load-balance | false | | is-pre-conn | false | | use-failback | true | | component-data-sources | [ds1, ds2] | +------------------------------------------+-----------------------------------+ ================================================================================
1.4. list-data-sources
Displays a list of all data sources in the domain. If a data source ID is specified, its configuration is displayed in detail.
-
Alias
listds, lsds
-
Usage
list-data-sources [-id,--dataSourceID <data-source-id>]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Data source ID.
-
Example
[MASTER]domain1.adminServer>list-data-sources The list of data sources ================================================================================ +----------------+----------------------+--------------------------------------+ | Data source ID | JNDI export name | Data source type | +----------------+----------------------+--------------------------------------+ | ds1 | ds1 | ConnectionPoolDataSource | | ds2 | ds2 | ConnectionPoolDataSource | | ds3 | ds3 | ConnectionPoolDataSource | +----------------+----------------------+--------------------------------------+ ================================================================================ [MASTER]domain1.adminServer>list-data-sources -id ds1 The configuration of the data source [ds1] ================================================================================ +----------------------------+-------------------------------------------------+ | Configuration name | Configuration value | +----------------------------+-------------------------------------------------+ | id | ds1 | | export-name | ds1 | | data-source-class-name | oracle.jdbc.pool.OracleConnectionPoolDataSource | | data-source-type | ConnectionPoolDataSource | | vendor | oracle | | server-name | 61.77.153.4 | | port-number | 1521 | | database-name | orcl | | user | scott | | password | tiger | | login-timeout | 0 | | auto-commit | DRIVER | | stmt-query-timeout | 0 | | pool-destroy-timeout | 10000 | | property | [driverType;java.lang.String;thin] | | action-on-connection-leak | Warning | | support-xa-emulation | false | | min | 10 | | max | 50 | | step | 1 | | period | 3600000 | | enable-wait | false | | wait-time | 10000 | | max-use-count | 0 | | dbaTimeout | -1 | | stmt-caching-size | -1 | | stmt-fetch-size | -1 | | connection-trace | false | | get-connection-trace | true | | auto-commit-trace | false | | use-sql-trace | false | | keep-connection-handle-open| false | +----------------------------+-------------------------------------------------+ ================================================================================
1.5. modify-cluster-data-source
Changes the configuration of a cluster data source. Most configurations can be changed dynamically.
-
Alias
modifycds
-
Usage
modify-cluster-data-source -id,--dataSourceID <data-source-id> [-en,--exportName <export-name>] [-dss,--dataSourceSelector <data-source-selector>] [-lb,--loadBalance <true | false>] [-ipc,--isPreConn <is-pre-conn>] [-ufb,--useFailback <use-failback>] [-cds,--componentDataSources <component-data-sources>] [-oc,--onsConfig <ons-config>] [-dsa,--dataSourceAffinity <data-source-affinity>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description -id,--dataSourceID <data-source-id>]
Cluster data source ID.
The cluster data source ID must be unique within a domain.
[-en,--exportName <export-name>]
JNDI name of the cluster data source.
If two data sources are guaranteed to be bound to different JNDIs on different servers, they can have the same JNDI name. Different data sources with the same JNDI names are not allowed on the same server.
If not specified, the cluster data source ID is used as the JNDI name. In order to undo this setting, enter "unset" as the option value.
Multiple JNDI names can be specified by using comma (,) delimiter, and JNDI lookup can be used for any of these specified JNDI names.
[-dss,--dataSourceSelector <data-source-selector>]
[Dynamic] When obtaining connections from cluster data sources, users or developers can customize policies for a specific component data source selection by inheriting and implementing the jeus.jdbc.helper.DataSourceSelector abstract class.
Next, the class name to include the implementation class package name must be set. After it is set, the Load Balance configuration is ignored, and failover and failback are performed unconditionally.
-
Failover is performed for one round, starting from the next index of the component data source that was initially selected.
-
Failback is performed in the same fashion as when Use Failback is set. The implementor must consider synchronization when defining the policy.
To undo this setting, enter 'unset' as the option value.
[-lb,--loadBalance <true | false>]
[Dynamic] Option to use load balancing.
-
true : the configuration --useFailback is ignored.
[-ipc,--isPreConn <is-pre-conn>]
[Dynamic] Option to create connection pools of component data sources that belong to the cluster data source, in advance. Although creating connection pools in advance can improve performance, it is not a good use of resources.
[-ufb,--useFailback <use-failback>]
[Dynamic] Option to perform failback using the main data source after performing failover using the assistant data source. By default, failback is performed.
This option provides compatibility with earlier versions of JEUS that only support failover.
To perform failback, --checkQuery and --checkQueryPeriod must be set for the main data source.
[-cds,--componentDataSources <component-data-sources>]
[Dynamic] Data source ID of the component data sources that belong to the cluster data source.
[-oc,--onsConfig <ons-config>]
Set to use a cluster data source associated with ONS. Specify an IP address and a port number used for each ONS RAC node to perform ONS communication. The cluster data source uses the information to make a socket connection and operates as an ONS client.
Use the following format.
nodes=host1:6200,host2:6200
[-dsa,--dataSourceAffinity <data-source-affinity>]
Option for data source affinity configuration for transactions. If this option is turned on, a transaction process is executed only for a single member data source instance. Therefore, global transaction performance is improved, and the performance is ensured even for local transactions with XA emulation configuration when using cluster data sources.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
-
Example
[MASTER]domain1.adminServer>modify-cluster-data-source -id cds1 -cds ds1 Successfully performed the MODIFY operation for configuration of the cluster data source [cds1]. Check the results using "modify-cluster-data-source -id cds1"
1.6. modify-data-source
Changes the configuration of a data source. Some configurations can be changed dynamically.
-
Alias
modifyds
-
Usage
modify-data-source -id,--dataSourceID <data-source-id> [-user,--user <user>] [-pw,--password <password>] [-algorithm,--algorithm <algorithm>] [-ac,--autoCommit <TRUE | FALSE | DRIVER> ] [-sqt,--stmtQueryTimeout <statement-query-timeout>] [-aocl,--actionOnConnectionLeak <action-on-connection-leak>] [-min,--min <minimum-size>] [-max,--max <maximum-size>] [-step,--step <resizing-step>] [-period,--period <resizing-period>] [-ew,--enableWait <true | false>] [-wt,--waitTime <wait-time>] [-dds,--delegationDataSource <delegation-data-source>] [-muc,--maxUseCount <max-use-count>] [-cq,--checkQuery <check-query>] [-cqt,--checkQueryTimeout <check-query-timeout>] [-nvi,--nonValidationInterval <non-validation-interval>] [-cqp,--checkQueryPeriod <check-query-period>] [-cqrc,--checkQueryRetrialCount <check-query-retrial-count>] [-dpocq,--destroyPolicyOnCheckQuery <destroy-policy-on-check-query>] [-scs,--stmtCachingSize <stmt-caching-size>] [-sfs,--stmtFetchSize <stmt-fetch-size>] [-ct,--connectionTrace <true | false>] [-gct,--getConnectionTrace <get-connection-trace>] [-act,--autoCommitTrace <auto-commit-trace>] [-ust,--useSqlTrace <use-sql-trace>] [-kcho,--keepConnectionHandleOpen <keep-connection-handle-open>] [-en,--exportName <export-name>] [-dscn,--dataSourceClassName <data-source-class-name>] [-dst,--dataSourceType <data-source-type>] [-vendor,--vendor <vendor>] [-desc,--description <description>] [-sn,--serverName <server-name>] [-pn,--portNumber <port-number>] [-dn,--databaseName <database-name>] [-lt,--loginTimeout <login-timeout>] [-il,--isolationLevel <isolation-level>] [-pdt,--poolDestroyTimeout <pool-destroy-timeout>] [-prop,--property <property>] [-sxe,--supportXaEmulation <support-xa-emulation>] [-ddba,--delegationDba <delegation-dba>] [-dbat,--dbaTimeout <dba-timeout>] [-cqc,--checkQueryClass <check-query-class>] [-is,--initSql <init-sql>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Data source ID. The data source ID must be unique within the domain.
[-user,--user <user>]
[Dynamic] Database user ID. The user must have the proper permissions to handle transactions.
In order to undo this setting, enter "unset" as the option value.
[-pw,--password <password>]
[Dynamic] Database user password.
To encrypt the password before storing, use the '{algorithm:keysize}ciphertext' format.
In order to undo this setting, enter "unset" as the option value.
[-algorithm,--algorithm <algorithm>]
[Dynamic] Encryption algorithm for the database user password. This option must be used with the -password option.
The following algorithm can be used:
-
base64
-
DES
-
DESede
-
AES
-
SEED
-
Blowfish
[-ac,--autoCommit <TRUE | FALSE | DRIVER>]
[Dynamic] Option to use the auto-commit configuration of the data source.
-
TRUE
-
FALSE
-
DRIVER: If DRIVER is selected, the auto-commit configuration of the JDBC driver is used.
The configuration value can only be set when the transaction is not linked to the connection pool data sources that use the XA emulation function or linked to XA data sources.
[-sqt,--stmtQueryTimeout <statement-query-timeout>]
[Dynamic] Query timeout used for java.sql.Statement objects created through the data source connection.
JEUS calls the query timeout configuration method (java.sql.Statement#setQueryTimeout) defined in the JDBC API and implemented by the JDBC driver vendor. The query timeout differs depending on the JDBC driver vendors. (Unit: ms)
[-aocl,--actionOnConnectionLeak <action-on-connection-leak>]
[Dynamic] Determines the action JEUS takes when it detects JDBC connections used by applications (stateless component - servlet/JSP, stateless session bean, MDB), but not yet returned.
Input options:
-
NO_ACTION: Take no actions.
-
WARNING: Log the information of the JDBC connections that are not returned.
-
AUTO_CLOSE: Log the information of the unreturned JDBC connections and collect them.
If not specified, the configuration of the server is used. To undo this setting, enter "unset" as the option value.
[-min,--min <minimum-size>]
[Dynamic] Minimum number of connections in the connection pool.
[-max,--max <maximum-size>]
[Dynamic] Maximum number of connections in the connection pool.
[-step,--step <resizing-step>]
[Dynamic] Number of DB connections to be obtained if the number of connections is insufficient and the number of connections in the connection pool is less than the maximum value.
[-period,--period <resizing-period>]
[Dynamic] Period in which to adjust the connection pool size based on the minimum value. If the connection pool size is greater than the minimum value, unused connections are closed. If the size is less than the minimum value, new DB connections are obtained. (Unit: ms)
[-ew,--enableWait <true | false>]
[Dynamic] Determines how to handle connection requests when no connections are available in the pool and additional connections cannot be added.
-
true: Wait until a connection is available.
-
false: Create a new (disposable) connection that does not enter the pool and is discarded after use.
[-wt,--waitTime <wait-time>]
[Dynamic] Period in which to wait for a connection if --enable-wait is true. If a connection cannot be obtained within the period, JEUS generates a timeout exception. (Unit: ms)
[-dds,--delegationDataSource <delegation-data-source>]
[Dynamic] If a request does not involve a transaction, it is better to get a connection from the connection pool data source instead of from the XA data source.
In this situation, a connection from the connection pool data source provides the same functionality as a connection from the XA data source, but with a smaller impact on system performance. Therefore, when using the XA data source, delegate connection requests unrelated to transactions to the connection pool data source.
When Oracle and DB2 use XA connections for both cases, with or without transactions, unexplained errors can occur; using this configuration can help avoid such situation.
In order to undo this setting, enter "unset" as the option value.
[-muc,--maxUseCount <max-use-count>]
[Dynamic] Maximum number of times a connection can be used. If the number of times a connection is used exceeds the specified number, the connection is replaced with a new connection. The default value is 0: a connection is not replaced.
[-cq,--checkQuery <check-query>]
[Dynamic] Query (query-check) that checks the connection status. Simple selection queries are recommended when validating the connection to the DB.
In order to undo this setting, enter "unset" as the option value.
[-cqt,--checkQueryTimeout <check-query-timeout>]
[Dynamic] When a check-query is executed to check the connection status, a driver can be in the wait state indefinitely if the DB does not respond. Apply a timeout to the check-query to avoid this situation. This can be set by using the java.sql.Statement#setQueryTimeout method defined in the JDBC API.
If the value is less than 1000ms, the value is set to 0. (Unit: ms)
[-nvi,--nonValidationInterval <non-validation-interval>]
[Dynamic] Option to skip connection checks if the interval between the last check and the recent check is within the specified time period. This option is useful for when overhead is created by frequent connection checks. (Unit: ms)
For example, if the option is set to 5000 ms, and 5 seconds has not passed since the last connection check, connections are sent to the applications without being checked.
[-cqp,--checkQueryPeriod <check-query-period>]
[Dynamic] Checks the connections in the connection pool at the specified interval to delete faulty connections. (Unit: ms)
For data sources that belong to cluster data sources, this option must be set to be used for checking its own state.
[-cqrc,--checkQueryRetrialCount <check-query-retrial-count>]
[Dynamic] If --destroyPolicyOnCheckQuery is set to FAILED_CONNECTION_ONLY, a connection check is performed only once.
If --destroyPolicyOnCheckQuery is set to ALL_CONNECTIONS and a problem is detected during the first connection check, all other connections are also checked, resulting in the connection check being performed twice.
The total connection check count is determined by adding this option value to the default connection check value.
[-dpocq,--destroyPolicyOnCheckQuery <destroy-policy-on-check-query>]
[Dynamic] Policy for connections in the connection pool when invalid connections are found.
-
FAILED_CONNECTION_ONLY: Delete only invalid connections.
-
ALL_CONNECTIONS: Delete invalid connections and validate other connections in the connection pool. If another invalid connection is detected in the pool, delete all the connections from the connection pool.
[-scs,--stmtCachingSize <stmt-caching-size>]
[Dynamic] JDBC driver parses SQL statements sent as parameters whenever applications request prepared statements. Parsing SQL statements can affect system performance, so JEUS offers a function that internally caches the prepared statements. This option sets the number of prepared statements that can be cached. If this option is used, connections are always open, so the clear job performed by the driver is not executed.
For example, when the Oracle JDBC driver sets auto-commit to false and closes the connection without executing commit or rollback, commit is executed unconditionally.
The use of the statement caching function is recommended if provided by the JDBC driver.
[-sfs,--stmtFetchSize <stmt-fetch-size>]
[Dynamic] Fetch size of JDBC driver statement.
[-ct,--connectionTrace <true | false>]
[Dynamic] Option to offer additional information for connections.
-
false: --getConnectionTrace and --autoCommitTrace cannot be used.
[-gct,--getConnectionTrace <get-connection-trace>]
[Dynamic] Displays the stack trace when the application calls java.sql.DataSource#getConnection.
[-act,--autoCommitTrace <auto-commit-trace>]
[Dynamic] Records logs and the stack trace to server logs when java.sql.Connection#setAutoCommit is called. The log level of jeus.jdbc.connection-trace logger must be set to FINE.
[-ust,--useSqlTrace <use-sql-trace>]
[Dynamic] Displays SQL queries used by connections. If the jeus.jdbc.sql logger level is set to FINE, the SQL query history can be checked in server logs. If this function is used, the statement implementation class of the JDBC driver is wrapped by a JEUS class. Therefore, applications that cast and use statement objects of the JDBC driver cannot use this function.
[-kcho,--keepConnectionHandleOpen <keep-connection-handle-open>]
[Dynamic] If this option is set to true and an XA connection is used and returned to the pool, the handle (or the logical connection) is kept open.
This function is required when using DB2 universal drivers. If this option is used, connections are always open, so the clear job performed by the driver is not executed.
For example, when the Oracle JDBC driver sets auto-commit to false and closes the connection without executing commit or rollback, commit is executed unconditionally.
[-en,--exportName <export-name>]
JNDI name of the data source. If two data sources are guaranteed to be bound to different JNDIs on different servers, they can have the same JNDI name. Different data sources with the same JNDI names are not allowed on the same server.
If not specified, the data source ID is used as the JNDI name. To undo this setting, enter "unset" as the option value.
Multiple JNDI names can be specified by using comma (,) delimiter, and JNDI lookup can be used for any of these specified JNDI names.
[-dscn,--dataSourceClassName <data-source-class-name>]
JDBC driver data source class name. Enter the full name, including the package name.
[-dst,--dataSourceType <data-source-type>]
Data source type.
-
DATA_SOURCE: Connection pooling service is not provided.
-
CONNECTION_POOL_DATA_SOURCE: Connection pooling service is provided.
-
XA_DATA_SOURCE: XA interface and the connection pooling service are provided.
[-vendor,--vendor <vendor>]
JDBC driver vendor name.
In order to undo this setting, enter "unset" as the option value.
[-desc,--description <description>]
Displays data source descriptions.
In order to undo this setting, enter "unset" as the option value.
[-sn,--serverName <server-name>]
Host name or IP at which the database runs.
In order to undo this setting, enter "unset" as the option value.
[-pn,--portNumber <port-number>]
Listener port number of the database. To undo this setting, enter "unset" as the option value.
[-dn,--databaseName <database-name>]
Database name. Sets the database SID (for Oracle). To undo this setting, enter "unset" as the option value.
[-lt,--loginTimeout <login-timeout>]
Maximum time to wait for the login screen to connect to the database. (Unit: seconds)
[-il,--isolationLevel <isolation-level>]
Transaction isolation level defined in java.sql.Connection. If not specified, the default configuration of the JDBC driver is used.
In order to undo this setting, enter "unset" as the option value.
[-pdt,--poolDestroyTimeout <pool-destroy-timeout>]
Amount of time in wait for the connection pool destroy command to complete. (Unit: ms)
The connection pool is destroyed when applications that defined the data sources are undeployed or when the server goes down. During this process, if the connection is used for network communication with the DB, the destroy process can be blocked and left hanging indefinitely. This option is used to avoid this situation. If this option is set, connection pool destruction waits the specified time period and then performs undeployment or server termination.
If this option is set, connection pool destruction waits the specified time period and then performs undeployment or server termination.
[-prop,--property <property>]
This option provides a unified configuration method to accommodate all property configurations that can differ by JDBC driver.
-
For a single property, use the 'name:type=value' format.
-
To specify multiple properties, separate each property with a comma (,).
[-sxe,--supportXaEmulation <support-xa-emulation>]
This option only applies to the connection pool data source type. This option emulates the connection pool data source connection to participate in a global transaction (XA).
For JEUS 6 and earlier versions, this option is an alternative to LocalXADataSource. It is used in the ConnectionPoolDataSource type of connection pools.
Note that only one connection pool data source can participate per transaction.
[-ddba,--delegationDba <delegation-dba>]
JNDI name of the data source (hereafter DBA delegation data source), which has permission to forcibly terminate database sessions (DBA permission). If there is a delay in handling a query through the connection received from the data source, a query that forcibly terminates the DB session is sent to the DB using the DBA delegation data source. After the application handles exceptions that occurred due to the disabled connection, it closes the connection. JEUS then deletes the connection and gets a new connection from the DB and assigns it to the connection pool.
Currently, this function is supported for Tibero, Oracle, and Sybase. It was created to suspend queries that take too long to perform for JDBC driver version 2.0 and earlier. For JDBC driver version 3.0 and later, it is recommended to use java.sql.Statement#setQueryTimeout instead of forcibly terminating DB sessions.
Especially for XA data sources, if DB sessions are terminated while XA operates normally, the XA operation can generate an error. Therefore, use the statement query timeout and the transaction timeout properties.
In order to undo this setting, enter "unset" as the option value.
[-dbat,--dbaTimeout <dba-timeout>]
The delegation DBA data source waits the specified time period for queries on a connection to finish. If timeout occurs, a query is sent to the DB that forcibly terminates the DB session.
This option only applies when --delegationDba is set. (Unit: ms)
[-cqc,--checkQueryClass <check-query-class>]
Class name, which includes the package name, that implements the function for users or developers who want to customize the connection check function.
The class must implement the jeus.jdbc.connectionpool.JEUSConnectionChecker interface.
In order to undo this setting, enter "unset" as the option value.
[-is,--initSql <init-sql>]
SQL query that is initially handled after a connection has been created.
In order to undo this setting, enter "unset" as the option value.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
-
Example
[MASTER]domain1.adminServer>modify-data-source -id ds1 -min 10 -max 50 Successfully performed the MODIFY operation for configuration of the data source [ds1]. Check the results using "modify-data-source -id ds1"
1.7. remove-cluster-data-source
Deletes a cluster data source from the domain.
-
Alias
rmcds
-
Usage
remove-cluster-data-source [-id,--dataSourceID <data-source-id>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Cluster data source ID.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
Example
[MASTER]domain1.adminServer>remove-cluster-data-source -id cds1 Successfully performed the REMOVE operation for cluster data source [cds1] from domain. Check the results using "remove-cluster-data-source"
1.8. remove-data-source
Deletes a data source from the domain.
-
Alias
rmds
-
Usage
remove-data-source [-id,--dataSourceID <data-source-id>] [-f,--forceLock] [-detail]
-
Parameters
Parameter Description [-id,--dataSourceID <data-source-id>]
Data source ID.
[-f,--forceLock]
Forcibly applies the configuration changes.
[-detail]
Displays the detailed results of the configuration changes.
-
Example
[MASTER]domain1.adminServer>remove-data-source -id ds1 Successfully performed the REMOVE operation for data source [ds1] from the domain. Check the results using "remove-data-source"
1.9. test-data-source-config
Checks if a data source configuration is correct.
-
Alias
testdsconf, testdsconfig, testdscfg
-
Usage
test-data-source-config -id <data-source-id> [-all]
-
Parameters
Parameter Description -id <data-source-id>
Data source ID.
[-all]
Only available in jeusadmin of JEUS Master Server. Sends the command to running domain servers that set the data source as a target and displays the results.
-
Example
[MASTER]domain1.adminServer>test-data-source-config -id ds1 The data source [ds1] is properly configured and can be used.