Avatar billede datajesper Nybegynder
13. januar 2004 - 12:00 Der er 3 kommentarer

Create og Remove Stateful SessionBeans i samme Transaktion ?

Er det ikke muligt at Create og Remove en Stateful SessionBean i samme Transaktion ?

metoden creater Sessionen, kalder et par metoder, og hvis det sidste metodekald returnerer null, kaldes remove()

Det giver følgende fejl:
weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:UserSession with primary key:10.035.337.115.992.070 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Thread[ExecuteThread: '12' for queue: 'default',5,Thread Group for Queue: 'default'].
    at weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLockManager.java:448)
    at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.java:258)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java:225)
    at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java:215)
    at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:313)
    at weblogic.ejb20.manager.StatefulSessionManager.remove(StatefulSessionManager.java:821)
    at weblogic.ejb20.internal.StatefulEJBObject.remove(StatefulEJBObject.java:96)
    at dk.organisator.ofuse.UserSessionBean_fm0pn9_EOImpl.remove(UserSessionBean_fm0pn9_EOImpl.java:440)
Avatar billede arne_v Ekspert
13. januar 2004 - 12:29 #1
http://edocs.bea.com/wls/docs61/notes/bugfixes2.html

CR100246
A LockTimeoutException occurred during a test, upon attempt to remove a stateful EJB. The sequence of operations was:


During test within the remote method of an entity bean, create a stateful session bean (local/localhome interfaces).

Call business methods on the stateful session bean, which in turn create different types of beans.

Try to remove the stateful session bean.
On calling remove the following exception is thrown:

Nov 18, 2002 12:51:33 AM PST> <Info> <EJB> <010049> <EJB Exception in method: remove: weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:LibraryInfoEJB with primary key:85335648642269185 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Thread[ExecuteThread: '6' for queue: 'default',5,Thread Group for Queue: 'default']. weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:LibraryInfoEJB with primary key:85335648642269185 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Thread[ExecuteThread: '6' for queue: 'default',5,Thread Group for Queue: 'default'].
at
weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLockManager.java:449)
at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.java:259)
at
weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java:248)
at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java

The problem was solved by adding a new weblogic-ejb-jar.xml deployment descriptor element, <allow-remove-during-transaction>. When this element is set to true, the exception does not occur
Avatar billede arne_v Ekspert
13. januar 2004 - 12:31 #2
Det må vist være et svar
Avatar billede arne_v Ekspert
23. januar 2004 - 22:12 #3
OK ?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester