1 Reply Latest reply on Jun 26, 2008 5:09 AM by Vicky Kak

    inactive connections are not closed in oracle even i mentine

    Ganesh P S Newbie

      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.