[jboss-user] [JNDI/Naming/Network] - Connection not getting closed in jboss4.0.3

javamagician81 do-not-reply at jboss.com
Thu May 24 02:34:07 EDT 2007


Hi,

I am using JNDI for getting the connection I have wriiten a java servlet
that takes the connection by look up as:

Context ctx=new InitialContext();
DataSource  ds = (DataSource) ctx.lookup("java:comp/env/OracleDS");

oracle-ds.xml
--------------------

 <local-tx-datasource>
	<jndi-name>OracleDS</jndi-name>
  	<connection-url>jdbc:oracle:thin:@mc01.dlh.comp.com:1521:test</connection-url>
  	<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  	<user-name>test1</user-name>
  	test1
	<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
	<new-connection-sql>select sysdate from dual</new-connection-sql>
	<check-valid-connection-sql>select sysdate from dual</check-valid-connection-sql>
	<min-pool-size>5</min-pool-size>
	<max-pool-size>20</max-pool-size>
	<idle-timeout-minutes>3</idle-timeout-minutes>
</local-tx-datasource>


--------
I am able to get the 8 connections by hitting the servlet URL, for testing purpose I am not closing the connecion in my application at all.

Although I've put the idle-timeout-minutes to 3 mins still the jboss is not able to close the connetion. I wait for a long but connection is still opened there I check by quering from v$session table in oracle the connection is already there.

Also I've to implement the conection pool in my web application using JBOSS 4.0.3 is this the right way for doing that or not ?

Thanks in advance for any help.

Regards,
Amit Ruwali




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

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



More information about the jboss-user mailing list