Topic
  • 7 replies
  • Latest Post - ‏2013-05-20T11:43:47Z by gas
EJA3_sara_ahmadi
EJA3_sara_ahmadi
35 Posts

Pinned topic close in use connection in connection pool

‏2013-02-02T12:32:22Z |
Hello
We want to set a time out for in flight connections (i.e connections that are in use) in websphere application server connection pool, so long running connections are closed and returned back to connection pool, is it possible?
Thanks
Updated on 2013-02-27T08:04:33Z at 2013-02-27T08:04:33Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: close in use connection in connection pool

    ‏2013-02-02T22:46:15Z  
    From Admin Console > Data Sources > {Data Source} > Connection Pool Properties

    Modify,
    • Connection Time Out: Specifies the number of seconds that a connection request remains active.

    • Unused Timeout: Specifies the maximum number of seconds that an idle connection can remain in the pool before being discarded by the maintenance thread.

    • Aged Timeout: Specifies the interval, in seconds, after which an unused, aged connection is discarded (regardless of recent activity) by the pool maintenance thread.

    Try to discard connection before the Unused timeout, because you can get "Connection is Closed" exceptions. For best results, we use

    Connection Timeout: 180
    Unused Timeout: 1800
    Aged Timeout: 1200

    Hope this helps.
  • bpaskin
    bpaskin
    4178 Posts

    Re: close in use connection in connection pool

    ‏2013-02-05T12:26:44Z  
    Hi, you should be setting a timeout value on the Statement itself so that the connection does not stay open for too long. See http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#setQueryTimeout(int) . You can flush the pool, but not from the Admin Console. You will need to write a Jython/JACL script to purge the pool. Please see this example: http://www-01.ibm.com/support/docview.wss?uid=swg21220832 .

    Regards,
    Brian
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: close in use connection in connection pool

    ‏2013-02-27T08:04:33Z  
    Hi,

    I would like to share my knowledge regarding connection pool

    Connection Timeout - specify the interval, in seconds , when a connection request times out. it will shows an error as (connection timeout exception)

    Max connections - Specify the maximum number of physical connections that can be created in pool.
    Min connections - Specify the minimum number of physical connections to be maintained.

    Reap time - Specify the interval , in seconds, between runs on pool maintainence and the thread.

    unused timeout - specify the interval , in seconds , when an unused or idle connection is discarded.

    Aged timeout - Specify the interval , in seconds , before a physical connection is discarded, regardless of recent usuage activity.

    Purge policy - Specify how to purge connections, when a stale or fatal connection error is detected.
  • HSDS43253
    HSDS43253
    2 Posts

    Re: close in use connection in connection pool

    ‏2013-05-20T11:07:32Z  

    Hi SystemAdmin,

    I'm sorry for asking a basic question. Can I set the "aged timeout" property using JMSAdmin tool? Or using MQ Explorer on Windows?

    I'm not sure we have AdminConsole up and running. Is it only avaiable for enterprise version?

     

    Thanks a lot.

  • gas
    gas
    891 Posts

    Re: close in use connection in connection pool

    ‏2013-05-20T11:15:11Z  
    • HSDS43253
    • ‏2013-05-20T11:07:32Z

    Hi SystemAdmin,

    I'm sorry for asking a basic question. Can I set the "aged timeout" property using JMSAdmin tool? Or using MQ Explorer on Windows?

    I'm not sure we have AdminConsole up and running. Is it only avaiable for enterprise version?

     

    Thanks a lot.

    Hi,

    'Aged timeout' is set via WebSphere Application Server browser based administrative console.

    JMSAdmin tool and MQ Explorer are tools used with WebSphere MQ, not Application Server and you cannot set this timeout using these tools, as it is used by application server, not MQ.

     

    Gas

     

  • HSDS43253
    HSDS43253
    2 Posts

    Re: close in use connection in connection pool

    ‏2013-05-20T11:34:39Z  
    • gas
    • ‏2013-05-20T11:15:11Z

    Hi,

    'Aged timeout' is set via WebSphere Application Server browser based administrative console.

    JMSAdmin tool and MQ Explorer are tools used with WebSphere MQ, not Application Server and you cannot set this timeout using these tools, as it is used by application server, not MQ.

     

    Gas

     

    Thank you. Do you have any document on how to start the browser based administrative console? Do we have to purchase this tool?

  • gas
    gas
    891 Posts

    Re: close in use connection in connection pool

    ‏2013-05-20T11:43:47Z  
    • HSDS43253
    • ‏2013-05-20T11:34:39Z

    Thank you. Do you have any document on how to start the browser based administrative console? Do we have to purchase this tool?

    It is built-in in the WebSphere Application Server. Your application server must be running to open admin console.

    By default it is accessible via http://yourHost:9060/ibm/consile

    Here is some more information:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.base.doc/info/aes/ae/tcon_console.html

    Gas