• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Usage in OC4J

 
Nagaraju Nookala
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Oracle9iAS and OC4J. I created a new instance of OC4J for my application. I modified the datasource configuration to point to my database server which is Oracle 9i.

The details in my Edit Data Source screen of Enterprise Manager Console of OC4J are as below:

Maximum Open Connections 20
Minimum Open Connections 1
(datasource JNDI name, URL, UserName, Password are not shown here)

When I click on the OC4J instance link on the EM Console I am seeing the following information for the JDBC Usage

JDBC Usage

Open JDBC Connections 88
Total JDBC Connections 175
Active Transactions 0
Transaction Commits 0
Transaction Rollbacks 0

Why am I seeing Totla and Open JDBC Connections more than the set value?

I am using the below given code to access the datasource and fetch and manipulate the underlying data through my code:



Are there any connection leaks?

Thanks,
NN

[edited to add code tags]
[ August 18, 2005: Message edited by: Jeanne Boyarsky ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nagaraju,
There isn't a connection leak, but there is a resource leak. You need to close the resultset, then the statement and then the connection. The lower level objects are no longer accessible to be closed after you close the connection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic