[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    Re: connection pool problem
From:       "Daniel Beland" <dan () rdketchup ! com>
Date:       2004-10-29 15:12:13
Message-ID: 27457.195.153.139.2.1099062733.squirrel () www ! rdketchup ! com
[Download RAW message or body]



I never used Jboss, but in Tomcat it works this way and I suppose jboss
has the same behavior.

When you close a connection in your program, you tell your application
server that you don't need it anymore, but it it up to the application
server to close it or not, you only release it from the context use.

In your current setup, your min-pool-size is set to 5, which probably
means that jboss will try to always keep 5 open connections, even if they
are not currently in use. The max size only tells jboss the maximum size
to open at a time.

So if you open 10 connections and close them all, my guess is that 5 will
get closed by jboss but 5 will remain active.


Hope I'm not wrong! :)
Daniel


>
> Hi
>
> I am using jboss connection pool mechanism.......following is my
>
> oracle-mobile-ds.xml...I am using jboss3.25,jdk1.4.1 and eclipse on
>
> windowsxp....Do u have any idea????
>
>
>
> - <datasources>
>
> - <local-tx-datasource>
>
> <jndi-name>jdbc/ora_mobile_ds</jndi-name>
>
>
>
> <connection-url>jdbc:oracle:thin:@123.456.789.123:1521:TEST</connection-url>
>
> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
>
> <user-name>shanta</user-name>
>
> <password>shanta</password>
>
> <min-pool-size>5</min-pool-size>
>
> <max-pool-size>20</max-pool-size>
>
> <prepared-statement-cache-size>50</prepared-statement-cache-size>
>
> </local-tx-datasource>
>
> </datasources>
>
>
>
> i have added following entry in standardjaws.xml
>
> <datasource>java:/jdbc/ora_mobile_ds</datasource>
>
> <type-mapping>Oracle9</type-mapping>
>
> <debug>true</debug>
>
>
>
>
>
> I am using this one in my programm and i am closing
>
> connection explictly in my programm.I have observed some misbehaviour. Its
>
> not able to close the connection ,even though i have explicitly closed
>
> connection.
>
> I am not getting any idea....why its not
>
> closing connection even after i explicitly close the connection
>
>
>
> public static void close(ResultSet rs)
>
> {
>
> try {
>
> if (rs != null) rs.close();
>
> }
>
> catch (SQLException sqle)
>
> {
>
> sqle.printStackTrace();
>
> }
>
> }
>
> public static void close(CallableStatement stmt)
>
> {
>
> try {
>
> if (stmt != null) stmt.close();
>
> }
>
> catch (SQLException sqle)
>
> {
>
> sqle.printStackTrace();
>
> }
>
> }
>
>
>
> public static void close(Statement stmt)
>
> {
>
> try {
>
> if (stmt != null) stmt.close();
>
> }
>
> catch (SQLException sqle)
>
> {
>
> sqle.printStackTrace();
>
> }
>
> }
>
>
>
> public static void close(PreparedStatement stmt)
>
> {
>
> try {
>
> if (stmt != null) stmt.close();
>
> }
>
> catch (SQLException sqle)
>
> {
>
> sqle.printStackTrace();
>
> }
>
> }
>
>
>
> public static void close(Connection conn)
>
> {
>
> try {
>
> if (conn != null) conn.close();
>
> }
>
> catch (SQLException sqle)
>
> {
>
> sqle.printStackTrace();
>
> }
>
> }
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download now.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic