File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes table locks, static connection 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 "table locks, static connection" Watch "table locks, static connection" New topic

table locks, static connection

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Hello. I think I have a problem, and don't know what to do about it. We have an application we created that connects to a DB2/400 database. When a user keys in an order number, the app retrieves the data from the db back to the user.
I've recently noticed, that after the user has the data back, there is still an object lock on the table that the data was retrieved from.
Also, if the user logs out of the application, and then gets back in again, it shows the time the job entered the system, the same as the first time they got on. I am using a static conneciton object, is that bad? Could someone explain the do's and don'ts of using a static connection.
Also, why is there still a lock on my table after the user got the data back.
Apparently I still have a lot to learn!
Thanks for any help!
I agree. Here's the link:
subject: table locks, static connection
It's not a secret anymore!