File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes jboss-connection pool problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jboss-connection pool problem" Watch "jboss-connection pool problem" New topic
Author

jboss-connection pool problem

bethanapalli kumar
Greenhorn

Joined: Oct 29, 2004
Posts: 6
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

Joined: Oct 29, 2004
Posts: 6
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jboss-connection pool problem