jQuery in Action, 2nd edition*
The moose likes EJB and other Java EE Technologies and the fly likes ejb.remove() and database lock ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb.remove() and database lock ?" Watch "ejb.remove() and database lock ?" New topic
Author

ejb.remove() and database lock ?

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Hi,

we are using a 3rd party EJB product in our application and it sometimes throws


2007-07-05 16:08:24,709 [WebContainer : 3] ERROR Sonora.Fields.FmsTableSessionBean - wasdev2 update >>> Unexpected exception: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: javax.ejb.EJBException: [SQL0913] Row or object SONOR00039 in SONORACA type *FILE in use.S_EXCP(9)


as per our DBA,the application is trying to do an update or delete transaction and it is no being committed so when another process is trying to get this resource the database will response that the table is in use or lock.

if i call ejb.remove(), will it relase the lock on table and ends transaction ? is there any alternate solution for this issue ? we are using DB2 over iSeries v5.3

Thanks,
Rajeev
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
A transaction should be designed to last for the minimum amount of time. Try and find out how long the transactions are taking. As a general rule, 30 seconds should normally be more than sufficient.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb.remove() and database lock ?