Disable Connection Pooling

Connection pooling allows you to reuse connections from a pool
instead of creating a new connection object everytime. If you desire to
turn off the connection pooling in GlassFish V3, there is a new
attribute that could be used.

By default, connection pooling is enabled in both jdbc as well as
connector connection pools. To disable this, set the "pooling" attribute to false.

In the earlier releases of GlassFish, there was a system property called "com.sun.enterprise.Connectors.SwitchoffACCConnectionPooling"
that could be set to true to turn off connection pooling in application
clients. This property is still supported in the new GlassFish V3.

How to set the flag

In administration CLI, use the following :

asadmin set server.resources.jdbc-connection-pool.
           ‹CONNECTION_POOL_NAME›.pooling=false

In admin GUI http://localhost:4848, see the Pooling checkbox.


Pooling in Admin Console

Effects observed

  • Associate with thread functionality is invalid

  • Flush connection pool cannot be done

Attributes useful only in pooled environment

There are a few attributes that are useful only in pooled environment hence a WARNING message is seen in the server.log when they are used.


  • Connection validation

  • Validate Atmost Once (Related to Connection Validation)

  • Match Connections

  • Max Connection Usage

  • Idle Timeout

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

shalini_m

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today