2.20.2 create-connector-connection-pool
Adds a connection pool with the specified connection pool name.
Synopsis
asadmin [asadmin-options] create-connector-connection-pool [--help] --raname raname --connectiondefinition connectiondefinitionname [--steadypoolsize steadypoolsize] [--maxpoolsize maxpoolsize] [--maxwait maxwait] [--poolresize poolresize] [--idletimeout idletimeout] [--isconnectvalidatereq={false|true}] [--leaktimeout=timeout] [--leakreclaim={false|true}] [--creationretryattempts=attempts] [--creationretryinterval=interval] [--lazyconnectionenlistment={false|true}] [--lazyconnectionassociation={false|true}] [--matchconnections={true|false}] [--maxconnectionusagecount=count] [--validateatmostonceperiod=interval] [--transactionsupport transactionsupport] [--description description] [--ping {false|true}] [--pooling {true|false}] [--property name=value[:name=value]...] poolname
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The create-connector-connection-pool subcommand of asadmin, defines a pool of connections to an Enterprise Information System (EIS). The named pool can be referred by multiple connector resources. Each defined pool is initiated at server startup and is populated when accessed for the first time. If two or more connector resources point to the same connector connection pool, they use the same pool of connections at run time. There can be more than one pool for a connection definition in a single resource adapter. A connector connection pool with authentication can be created either by specifying, the connection information in the XML descriptor file or by using the --property option to specify user, password or other connection information.
This subcommand is supported in remote mode only.
Precondition
Domain Administration Server (DAS) is running.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --connectiondefinition connectiondefinitionname
-
Specifies the name of the connection definition.
Type: String
The following values can be specified:
-
Name of connection definition
Default value: N/A
-
- --creationretryattempts=attempts
-
Specifies the maximum number of times that the server retries to create a connection if the initial attempt fails.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 0
-
- --creationretryinterval=interval
-
Specifies the interval, in seconds, between successive attempts to create a connection.
If the value for the --creationretryattempts option is 0, the --creationretryinterval option is ignored.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 10
-
- --description description
-
Displays the text providing descriptive details about the connector connection pool.
Type: String
The following values can be specified:
-
Description in text
Default value: N/A
-
- --idletimeout idletimeout
-
Specifies the maximum time (in seconds) that a connection can remain idle in the pool.
Type: Integer
The following values can be specified:
-
1 to 2147483647
Default value: 300
-
- --isconnectvalidatereq={false|true}
-
Confirms whether the connections are usable, if the value is set to true.
The connection failure detection at a regular interval is always enabled, regardless of the specified value.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --lazyconnectionenlistment={false|true}
-
Specifies whether a resource to a transaction is enlisted only when a method actually uses the resource.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --lazyconnectionassociation={false|true}
-
Specifies whether a physical connection should be associated with the logical connection only when the physical connection is used.
Type: Boolean
The following values can be specified:
-
true
A physical connection is associated with the logical connection only when the physical connection is used, and disassociated when the transaction is completed. The --lazyconnectionenlistment option must also be set to true.
-
false
A physical connection is associated with the logical connection even before the physical connection is used, and is not disassociated when the transaction is completed. This is the default value.
Default value: false
-
- --leakreclaim={false|true}
-
Specifies whether leaked connections are restored to the connection pool after leak connection tracing is complete.
Type: Boolean
The following values can be specified:
-
true
Leaked connections are restored to the connection pool.
-
false
Leaked connections are not restored to the connection pool. This is the default value.
Default value: false
-
- --leaktimeout=timeout
-
Specifies the amount of time, in seconds, for which connection leaks in a connection pool are to be traced.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 0
-
- --matchconnections={false|true}
-
Specifies whether a connection that is selected from the pool should be matched with the resource adaptor.
If all connections in the pool are identical, matching between connections and resource adapters is not required.
Type: Boolean
The following values can be specified:
-
true
A connection should be matched with the resource adaptor. This is the default value.
-
false
A connection should not be matched with the resource adaptor.
Default value: true
-
- --maxconnectionusagecount=count
-
Specifies the maximum number of times that a connection can be reused.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 0
-
- --maxpoolsize maxpoolsize
-
Specifies the maximum number of connections that can be created to satisfy client requests.
Type: Integer
The following values can be specified:
-
1 to 2147483647
Default value: 24
-
- --maxwait maxwait
-
Specifies the time, in milliseconds, that a caller must wait before a connection is created, if a connection is not available.
If 0 is specified, a caller waits indefinitely.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 60000
-
- --ping {false|true}
-
Contacts a pool with this attribute (set to true), during creation.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --pooling {true|false}
-
Disables connection pooling, when set to false.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: true
-
- --poolresize poolresize
-
Specifies the quantity by which, the pool will scale up or scale down the number of connections.
Type: Integer
The following values can be specified:
-
1 to 2147483647
Default value: 2
-
- --property name=value[:name=value]...
-
Optional attribute name/value pairs for configuring the pool. The specification format is name=value. Use a colon (:) to separate property names. If you specify the same property name more than once, the property value specified last is valid.
This option can be used to overwrite the setting value retained by the ManagedConnectionFactory class based on the JavaBeans specifications. Specify a property name according to the JavaBeans specifications that corresponds to setter of the ManagedConnectionFactory class specified for the managedconnectionfactory-class element of the ra.xml file. If the same property is set to this option and the config-property element of the ra.xml file, this option takes priority.
Type: String
- --raname raname
-
Specifies the name of the resource adapter.
Type: String
The following values can be specified:
-
resource adapter name
Default value: N/A
-
- --steadypoolsize steadypoolsize
-
Specifies the minimum and initial number of connections maintained in the pool.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 24
-
- --transactionsupport transactionsupport
-
Confirms the level of transaction support that this pool will have.
Type: String
The following values can be specified:
-
XATransaction
-
LocalTransaction
-
NoTransaction
Default value: N/A
-
- --validateatmostonceperiod=interval
-
Specifies the time interval, in seconds, between successive requests to validate a connection at most once.
If 0 is specified, the connection is always validated.
Type: Integer
The following values can be specified:
-
0 to 2147483647
Default value: 0
-
- poolname
-
Specifies the name of the connection pool to be created.
Type: String
The following values can be specified:
-
Name of pool
Default value: N/A
-
Examples
The following example creates a connector connection pool.
asadmin create-connector-connection-pool --raname jmsra --connectiondefinition javax.jms.QueueConnectionFactory --steadypoolsize 20 --maxpoolsize 100 --poolresize 2 --maxwait 60000 jms/qConnPool
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |