wood burning stoves 2.0
The moose likes JDBC and Relational Databases and the fly likes Critical Please Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Critical Please Advice" Watch "Critical Please Advice" New topic

Critical Please Advice

peter brews

Joined: Feb 11, 2002
Posts: 20
We have a application running on Weblogic. We have developed a Java class which gets a connection from the connection pool and have methods to get Statemet Objects on the connection. from the client code example: JSP we instansiate this class to get the Connection object and the Statement object and execute queries.
There seems to be a potential problem in the sense that there is Statment Contention. Exampele : 2 Statement Objects A & B are getting executed Statment B completes its operations but A is still open when we call the closeStatement method on Statement object B it seems to be closing Statemnt A which causes a lot of problems.

Could you please advice
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Sounds like the handling of your Connection object isn't thread safe. Are you getting hold of the connection object in a servlet or JSP and holding onto it as a an instance variable? That would be the most obvious cause for your woes.
Did you want to give some more detail on your setup if this is not the case?
I agree. Here's the link: http://aspose.com/file-tools
subject: Critical Please Advice
It's not a secret anymore!