Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC 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
Bookmark "Critical Please Advice" Watch "Critical Please Advice" New topic
Author

Critical Please Advice

peter brews
Greenhorn

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
Rancher

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?
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Critical Please Advice