web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
Defining the Connection Pool Properties for a JDBC Datasource 6 Stop and restart the partition for the deployment to take effect. To deploy the library to a single partition: 1 Right-click on the partition's name in the navigation pane in the BES Console and select Deploy Modules from the context menu. The Deployment Wizard will open. 2 Click on the Add button and navigate to the library file in the resulting window and click OK. The library name should now appear in the selection box in the Deployment Wizard. 3 Click on the Next button. The partition name will appear in the Deployment Wizard window. 4 Select the partition to which you want to deploy the library and click on the Finish button. The deployment status will appear in a separate window. 5 Click the Close button to close this window. You can verify that the libraries are deployed correctly by checking the partition's Deployed Modules node in the BES Console navigation pane. The name of the library should appear under the Deployed Modules node. 6 Stop and restart the partition for the deployment to take effect. Defining the Connection Pool Properties for a JDBC Datasource At runtime each JDBC datasource corresponds to an instance of a connection pool. Connection pools provide for the reuse of connections and optimization of database connectivity. Some datasources may require different treatment as connection pools than others. A number of configuration options exist for these connection pools. Control of pool sizes, statement execution behavior, and transaction parameters are specified as properties in the element in the DAR descriptor file. You specify properties using the element, which includes the , , and elements. The complete list of properties, allowed values, defaults, and descriptions appear in the following table: Table 22.1 Connection Pool Properties for a JDBC Datasource Name Allowed Values Description Default Value connectionType Enumerated: ■ ■ Direct XA Indicates type transaction association of all connections retrieved from the connection pool, whether “Direct” or “XA” optimizeXA Boolean By default, XAResource calls are limited to optimize JDBC 2 connection pool performance. Setting optimizeXA to false disables this optimization. Under certain conditions the optimization must be disabled. For instance, when conflicts arise with resource manager optimizations during twophase commit protocol. When setting optimizeXA to false applications using a JDBC connection in the scope of a distributed transaction, must issue a connection close() before completion of the transaction, otherwise unexpected transaction completion conditions will arise. Not Applicable. Property specification is mandatory True Chapter 22: Using JDBC 199
Defining the Connection Pool Properties for a JDBC Datasource Table 22.1 maxPoolSize Integer Specifies the maximum number of database connections that can be obtained from this datasource connection pool. waitTimeout Integer The number of seconds to wait for a free connection when maxPoolSize connections are already opened. When using the maxPoolSize property and the pool is at its max and can't serve any more connections, the threads looking for JDBC connections end up waiting for the connection(s) to become available for a long time if the wait time is unbounded (set to 0 seconds). You can set the waitTimeout period to suit your needs. busyTimeout Integer The number of seconds to wait before a busy connection is released idleTimeout Integer A pooled connection remaining in an idle state for a period of time longer than this timeout value should be closed. All idle connections are checked for idleTimeout expiration every 60 seconds. The value of the idleTimeout is given in seconds. queryTimeout Integer Specifies in seconds the time limit for executing database queries by this datasource. dialect isolationLevel Connection Pool Properties for a JDBC Datasource (continued) Name Allowed Values Description Default Value Enumerated: ■ ■ ■ ■ oracle sybase interbase jdatastore Enumerated: ■ ■ ■ ■ ■ TRANSACTION_NONE TRANSACTION_READ_C OMMITTED TRANSACTION_READ_U NCOMMITTED TRANSACTION_REPREA TABLE_READ TRANSACTION_SERIAL IZEABLE Specifies the database vendor as a hint for automatic table creation performed during Container Managed Persistence Indicates database isolation level associated with all connections opened by this datasource's connection pool. See the J2EE 1.3 specification for details on these isolation levels. reuseStatements Boolean Optimization directive requesting prepared SQL statements to be cached for reuse. Applies to all connections obtained from the connection pool. initSQL String Specifies a list of “;” separated SQL statements to be executed each time a connection is obtained for a fresh transaction. The SQL is performed before any application work is performed on the connection. 0 (zero), implying unbounded size 30 600 (ten minutes) 600 (ten minutes) 0 (zero), implying indefinite period This property is optional. There is no default value. Defaults to whatever level is provided by the JDBC driver vendor. True This property is optional. There is no default value. 200 BES Developer’s Guide
- Page 159 and 160: Setting Properties Table 16.1 ejb.m
- Page 161 and 162: Setting Properties Table 16.3 Table
- Page 163 and 164: Setting Properties Security Propert
- Page 165 and 166: Aggregate Functions in EJB-QL Selec
- Page 167 and 168: Support for ORDER BY Support for OR
- Page 169 and 170: Overriding SQL generated from EJB-Q
- Page 171 and 172: Container-managed data access suppo
- Page 173 and 174: 162 BES Developer’s Guide
- Page 175 and 176: Generating primary keys from a cust
- Page 177 and 178: Implementing primary key generation
- Page 179 and 180: Transaction manager services Consis
- Page 181 and 182: Transaction manager services When t
- Page 183 and 184: Transaction manager services Follow
- Page 185 and 186: Declarative transaction management
- Page 187 and 188: Declarative transaction management
- Page 189 and 190: JDBC API Modifications JDBC API Mod
- Page 191 and 192: Handling of EJB exceptions Applicat
- Page 193 and 194: 182 BES Developer’s Guide
- Page 195 and 196: Client View of an MDB Client View o
- Page 197 and 198: Clustering of MDBs This is yet anot
- Page 199 and 200: Error Recovery Redelivered messages
- Page 201 and 202: 190 BES Developer’s Guide
- Page 203 and 204: JNDI Definitions Module Important s
- Page 205 and 206: Disabling and Enabling a Deployed D
- Page 207 and 208: Configuring JDBC Datasources In the
- Page 209: Configuring JDBC Datasources To add
- Page 213 and 214: Defining the Connection Pool Proper
- Page 215 and 216: Descriptions of Borland Enterprise
- Page 217 and 218: Advanced Topics for Defining JDBC D
- Page 219 and 220: Connecting to JDBC Resources from J
- Page 221 and 222: Configuring JMS Connection Factorie
- Page 223 and 224: Defining Connection Pool Properties
- Page 225 and 226: Obtaining JMS Connection Factories
- Page 227 and 228: JMS and Transactions and its accomp
- Page 229 and 230: JMS and Transactions For instance:
- Page 231 and 232: 220 BES Developer’s Guide
- Page 233 and 234: Configuring JMS administered object
- Page 235 and 236: Tibco Creating Clustered JMS Servic
- Page 237 and 238: Sonic serverUrl String localhost:72
- Page 239 and 240: Sonic Creating Clustered JMS Servic
- Page 241 and 242: OpenJMS Even though OpenJMS can be
- Page 243 and 244: OpenJMS Important If you use OpenJM
- Page 245 and 246: OpenJMS openjms.clean_messages_on_s
- Page 247 and 248: OpenJMS Table 24.1 Property Name De
- Page 249 and 250: Other JMS providers The following a
- Page 251 and 252: 240 BES Developer’s Guide
- Page 253 and 254: Creating the Interceptor Class For
- Page 255 and 256: Creating the JAR file Creating the
- Page 257 and 258: Components Components The Connector
- Page 259 and 260: System Contracts Connection Managem
Defining the Connection Pool Properties for a JDBC Datasource<br />
6 Stop and restart the partition for the deployment to take effect.<br />
To deploy the library to a single partition:<br />
1 Right-click on the partition's name in the navigation pane in the BES Console and<br />
select Deploy Modules from the context menu. The Deployment Wizard will open.<br />
2 Click on the Add button and navigate to the library file in the resulting window and<br />
click OK. The library name should now appear in the selection box in the<br />
Deployment Wizard.<br />
3 Click on the Next button. The partition name will appear in the Deployment Wizard<br />
window.<br />
4 Select the partition to which you want to deploy the library and click on the Finish<br />
button. The deployment status will appear in a separate window.<br />
5 Click the Close button to close this window. You can verify that the libraries are<br />
deployed correctly by checking the partition's Deployed Modules node in the BES<br />
Console navigation pane. The name of the library should appear under the<br />
Deployed Modules node.<br />
6 Stop and restart the partition for the deployment to take effect.<br />
Defining the Connection Pool Properties for a JDBC Datasource<br />
At runtime each JDBC datasource corresponds to an instance of a connection pool.<br />
Connection pools provide for the reuse of connections and optimization of database<br />
connectivity. Some datasources may require different treatment as connection pools<br />
than others. A number of configuration options exist for these connection pools. Control<br />
of pool sizes, statement execution behavior, and transaction parameters are specified<br />
as properties in the element in the DAR descriptor file. You<br />
specify properties using the element, which includes the , ,<br />
and elements. The complete list of properties, allowed values,<br />
defaults, and descriptions appear in the following table:<br />
Table 22.1<br />
Connection Pool Properties for a JDBC Datasource<br />
Name Allowed Values Description Default Value<br />
connectionType<br />
Enumerated:<br />
■<br />
■<br />
Direct<br />
XA<br />
Indicates type transaction<br />
association of all connections<br />
retrieved from the connection<br />
pool, whether “Direct” or “XA”<br />
optimizeXA Boolean By default, XAResource calls are<br />
limited to optimize JDBC 2<br />
connection pool performance.<br />
Setting optimizeXA to false disables<br />
this optimization. Under certain<br />
conditions the optimization must<br />
be disabled. For instance, when<br />
conflicts arise with resource<br />
manager optimizations during twophase<br />
commit protocol. When<br />
setting optimizeXA to false<br />
applications using a JDBC<br />
connection in the scope of a<br />
distributed transaction, must issue<br />
a connection close() before<br />
completion of the transaction,<br />
otherwise unexpected transaction<br />
completion conditions will arise.<br />
Not<br />
Applicable.<br />
Property<br />
specification<br />
is mandatory<br />
True<br />
Chapter 22: Using JDBC 199