Bugs item #489528, was opened at 2001-12-05 12:46
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=489528&group_id=22866

Category: JBossServer
Group: v2.2.2 (stable)
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Michael Nestler (vorlon_sf)
>Assigned to: Andreas Schaefer (schaefera)
Summary: Deadlock when calling remove() twice

Initial Comment:
JBoss 2.2.2 under Win2K, JDK 1.3.0_02

I get a deadlock (LOCKING-WAITING) when I do the 
following on a CMP entity bean:

1. Call remove(). ejbRemove() calls setRollbackOnly() 
and throws a RemoveException, because the caller was 
not authorized (application logic).

2. Call prepareRemove() to authorize. Seems to be 
okay, no error in the log file.

3. Call remove() which causes the deadlock (LOCKING-
WAITING).

#3 makes no sense to me and seems to be a bug.


[Default] JBoss 2.2.2 Started in 0m:9s
[UserCommunityDirectory] create
(123456789DIR,987654321,TEST DIRECTORY 123,This is a 
test description.)
[UserCommunityDirectory] [123456789DIR] remove()
[UserCommunityDirectory] Could not remove 123456789DIR
[UserCommunityDirectory] javax.ejb.RemoveException: 
Could not remove 123456789DIR
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCRemoveEntityCommand
.execute(JDBCRemoveEntityCommand.java:56)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.remov
eEntity(JAWSPersistenceManager.java:168)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.CMPPersistenceManager.removeEntit
y(CMPPersistenceManager.java:466)
[UserCommunityDirectory]        at 
org.jboss.ejb.EntityContainer.remove
(EntityContainer.java:331)
[UserCommunityDirectory]        at 
java.lang.reflect.Method.invoke(Native Method)
[UserCommunityDirectory]        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invo
ke(EntityContainer.java:692)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.
invoke(EntitySynchronizationInterceptor.java:208)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke
(EntityInstanceInterceptor.java:186)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext
(TxInterceptorCMT.java:133)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:263)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:99)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:190)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:195)
[UserCommunityDirectory]        at 
org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:323)
[UserCommunityDirectory]        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.
invoke(JRMPContainerInvoker.java:392)
[UserCommunityDirectory]        at 
java.lang.reflect.Method.invoke(Native Method)
[UserCommunityDirectory]        at 
sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:241)
[UserCommunityDirectory]        at 
sun.rmi.transport.Transport$1.run(Transport.java:142)
[UserCommunityDirectory]        at 
java.security.AccessController.doPrivileged(Native 
Method)
[UserCommunityDirectory]        at 
sun.rmi.transport.Transport.serviceCall
(Transport.java:139)
[UserCommunityDirectory]        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:443)
[UserCommunityDirectory]        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:643)
[UserCommunityDirectory]        at java.lang.Thread.run
(Thread.java:484)
[UserCommunityDirectory] findByPrimaryKey(123456789DIR)
[UserCommunityDirectory] [123456789DIR] prepareRemove
(987654321,null)
[UserCommunityDirectory] [123456789DIR] remove()
[UserCommunityDirectory] LOCKING-WAITING (TRANSACTION) 
for id 123456789DIR ctx.hash 8385974 
tx:TransactionImpl:XidImpl [FormatId=257, 
GlobalId=POLONIUM//3, BranchQual=]
[UserCommunityDirectory] LOCKING-WAITING (TRANSACTION) 
for id 123456789DIR ctx.hash 8385974 
tx:TransactionImpl:XidImpl [FormatId=257, 
GlobalId=POLONIUM//3, BranchQual=]
[UserCommunityDirectory] LOCKING-WAITING (TRANSACTION) 
for id 123456789DIR ctx.hash 8385974 
tx:TransactionImpl:XidImpl [FormatId=257, 
GlobalId=POLONIUM//3, BranchQual=]


----------------------------------------------------------------------

>Comment By: Andreas Schaefer (schaefera)
Date: 2002-02-04 14:12

Message:
Logged In: YES 
user_id=70434

If this problem persists with JBoss 2.4 or 3 please report 
it again. JBoss 2.2 is not supported anymore.

Andy

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2001-12-05 17:08

Message:
Logged In: NO 

I will try the same with JBoss 2.4. Have only a problem in 
migrating our database to JBoss 2.4, since we have CMP 
entity beans with 1:1 relationships to other CMP entity 
beans, and the by JBoss created handles mapping the 
relationship seem not to be usable in JBoss 2.4. So I will 
probably have to solve this problem first.

----------------------------------------------------------------------

Comment By: Luke Taylor (luke_t)
Date: 2001-12-05 16:16

Message:
Logged In: YES 
user_id=369802

You are using a rather old version of JBoss. I believe 2.2.2
was released in May and I recall there have been changes to
entity locking since then. 

You should try to reconfirm the problem with an up-to-date
version (currently 2.4.4).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=489528&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to