permaculture playing cards
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
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb.remove() and database lock ?" Watch "ejb.remove() and database lock ?" New topic

ejb.remove() and database lock ?

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455

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

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:
subject: ejb.remove() and database lock ?
It's not a secret anymore!