WebSphere Application Server - Connection not getting closed

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > August 2006 > Connection not getting closed





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Connection not getting closed

2006-08-25, 7:38 am

Hi,

In my application I have some scheduled job which runs at a perticular time. In this I am dong some order processing. When I execute this job I get "SQL Exception: ORA-00020: maximum> number of processes (150) exceeded" exception.

I monitored the connection pool from PMI and found that connections are getting created but not getting closed. In the code I am properly closing the connection , I also confirmed that the code is getting executed. But in PMI CloseCount does not show any
cloed connection.

Following is the code for closing the connection

public boolean cleanup()
throws SQLException
{
boolean conClosed = false;
if(resSet != null)
resSet.close();
if(stmt != null)
stmt.close();
if(prepStmt != null)
prepStmt.close();
if(conn != null)
{
conn.close();
conClosed = true;
}
return conClosed;
}

Please help me in this. Do I need to add any Websphere specific configuration or code to close the connection?

Thankx
Paul Ilechko

2006-08-25, 1:31 pm

Connections don't close until the transaction ends if they are
shareable, so it might be a transaction boundary issue. Look into
that,and also try changing the connection to be non-shareable.

aniket1983@gmail.com wrote:
> Hi,
>
> In my application I have some scheduled job which runs at a
> perticular time. In this I am dong some order processing. When I
> execute this job I get "SQL Exception: ORA-00020: maximum> number of
> processes (150) exceeded" exception.
>
> I monitored the connection pool from PMI and found that connections
> are getting created but not getting closed. In the code I am properly
> closing the connection , I also confirmed that the code is getting
> executed. But in PMI CloseCount does not show any cloed connection.
>
> Following is the code for closing the connection
>
> public boolean cleanup() throws SQLException { boolean conClosed =
> false; if(resSet != null) resSet.close(); if(stmt != null)
> stmt.close(); if(prepStmt != null) prepStmt.close(); if(conn != null)
> { conn.close(); conClosed = true; } return conClosed; }
>
> Please help me in this. Do I need to add any Websphere specific
> configuration or code to close the connection?
>
> Thankx

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com