• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Critical Please Advice

 
peter brews
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic