This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jboss-connection pool problem

 
bethanapalli kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
  • 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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic