[jboss-user] [JCA/JBoss] - inactive connections are not closed in oracle even i mentine

ps.ganesh do-not-reply at jboss.com
Thu Jun 26 00:27:30 EDT 2008

I am using a pooled connection in my web application using jboss specific configuration file oracle-ds.xml the entries of the file is :

      <new-connection-sql>select 1 from dual</new-connection-sql>
      <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>

In my application I am getting the connection by datasource as :

Context ctx=new InitialContext();
ds = (DataSource) ctx.lookup(jndiName);

When I complete load testing with 50 users I found 50 inactive connections at oracle side 

[ SELECT COUNT(*) FROM v$session WHERE osuser='tsering' AND status='INACTIVE' ]

and when i complete single transation after that my inactive conn incremented by 1.
I am not aware why the inactive connections are there at oracle side. Is there any mechanism to remove these inactive connections from oracle side.

I know that when we call con.close() method in a pooled connection the connection is returned back to pool but I didn't know why it is not using the inactive connection for a new connection request  it is creating a new one.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160724#4160724

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160724

More information about the jboss-user mailing list