All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en.help.task-jdbcconnectionpooledit.html Maven / Gradle / Ivy

There is a newer version: 8.0.0-JDK17-M7
Show newest version


To Edit JDBC Connection Pool General Settings

  1. In the navigation tree, expand the Resources node.

  2. Under the Resources node, expand the JDBC node.

  3. Under the JDBC node, select the Connection Pools node.

    The Connection Pools page opens.

  4. Click the name of the connection pool that you are editing.

    The Edit Connection Pool page opens.

  5. From the Resource Type drop-down list, select a resource type.

    Choices include javax.sql.DataSource (local transactions only), javax.sql.XADataSource (global transactions), and java.sql.ConnectionPoolDataSource (local transactions, possible performance improvements).

  6. In the Datasource Classname field, type the name of the vendor-specific class that implements the DataSource, ConnectionPoolDataSource, or XADataSource API.

    If you selected one of the datasource resource types, this field is usually filled in automatically with the class name associated with the resource type and database vendor you chose. If you selected the java.sql.Driver resource type, this field is disabled.

  7. In the Driver Classname field, type the name of the vendor-specific class that implements the java.sql.Driver API.

    If you selected the java.sql.Driver resource type, this field is usually filled in automatically with the class name associated with the driver and database vendor you chose. If you selected one of the datasource resource types, this field is disabled.

  8. Select the Ping Enabled checkbox to automatically ping the pool during pool creation or reconfiguration to identify and warn of any erroneous attribute values.

    This option is disabled by default.

  9. In the Deployment Order field, type a number to specify the deployment order of the connection pool.

    Resources with a lower number are loaded first at server startup. The default value is 100.

  10. In the Description field, type a short description for the connection pool.

  11. In the Initial and Minimum Pool Size field, type the minimum number of connections in this pool.

    This value also determines the number of connections placed in the pool when the pool is first created or when GlassFish Server starts. The default value is 8.

  12. In the Maximum Pool Size field, type the maximum number of connections in this pool.

    The default value is 32.

  13. In the Pool Resize Quantity field, type the number of connections per pool resizing batch.

    When the pool scales up and scales down toward the maximum and minimum pool size respectively, it is resized in batches. This value determines the number of connections in the batch. Making this value too large delays connection creation and recycling; making it too small will be less efficient. The default value is 2.

  14. In the Idle Timeout field, type the maximum time, in seconds, that a connection can remain idle in the pool.

    After this time expires, the connection is removed from the pool. The default value is 300.

  15. In the Max Wait Time field, type the maximum time, in milliseconds, that an application requesting a connection will wait before getting a connection timeout.

    The default value is 60,000.

  16. Select the Non Transactional Connections Enabled checkbox to return non-transactional connections.

    This option is disabled by default.

  17. Select a Transaction Isolation level for the connection pool from the drop-down list.

    If not specified, the connections operate with default isolation levels provided by the JDBC driver. By default, this option is not specified.

  18. Select the Isolation Level Guaranteed checkbox so that all connections taken from the pool have the same isolation level.

    For example, if the isolation level for the connection is changed programmatically (with con.setTransactionIsolation) when last used, this mechanism changes the status back to the specified isolation level.

    This setting is only applicable if a transaction isolation level has been specified.

  19. Click the Ping button to verify the database connection.

    The Administration Console attempts to connect to the database. If an error message appears, check to see if the database server has been started.

  20. Click the Flush button to reset the connection pool 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.

  21. Click Save.


    Tip:

    To return to the default settings, click the Load Defaults button, then click Save.


See Also
Copyright © 2005, 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices




© 2015 - 2024 Weber Informatics LLC | Privacy Policy