views:

13

answers:

1

I fixed and use Connection Pool to get the DB Connection from JSP to Oracle Database now.

But then I found out from the OC4J console at once that there are many UNCLOSED/NOT-CLOSED connection.

I am using OC4J 9.0.4.1 and Oracle 10g. Is there any effective way to find out the location or area that the connection is not closed.

In addition, I would like to know the followings:

1) The UNCLOSED connection means the Connection or ResultSet or Statment ? 2) IF Connection for the ResultSet and Statement is closed, the corresponding ResultSet and Statement are closed automatically too ?

A: 

I'd expect that this is easiest to detect on the server side - one assumes (!) that there is a 'show me all the open connections' report or command on the server that should show up a list of those connections together with the last executed SQL on that connection (am coming from the MSSQL side of things here - this doesn't sound like too much of a stretch, tho').

Unclosed means that the connection has not been closed.

Will A
Any suggestion or hint then ?
SkyEagle888
Sure - take a look @ the server state and get a list of open connections there + the SQL that was last executed on each - I'd expect you'll see a lot of the same SQL if you've forgotten to close a connection somewhere.
Will A
Yes fire up SQL Developer, connect to the database, see database sessions and you can see the last SQL for each session.
Andrew Russell
I am running SQLDeveloper now. I am checking the Tools-->Monitor Sessions
SkyEagle888
I am running SQLDeveloper now. I am checking the Tools-->Monitor Sessions
SkyEagle888
I saw a list of connections. But it didn't show whether those connections are closed or not. In addition, where can I check the corresponding SQL statement for each connetion ?
SkyEagle888