• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jboss-connection pool problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 racle: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.
After 20 connections its not able to give another connection.

I am not getting any idea....why its not
closing connection even after i explicitly close the connection


Following are methods which i used for closing 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();
}
}



Thanks
shanta.B
 
bethanapalli kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I did close the issue, the problem was because Firestorm DAO was blocking the connections. I did closely review the Firestorm DAO's and explicitly closing the ResultSet, Connections and Statement I could resolved the problem.


:roll:
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic