I see a lot of similar posts but I did not see any workable solution yet.
I want to update/remove entity-beans using Jboss3.0-BMP.
I implement all ejb* + un/setEntityContext()
(of course some of them are empty)
1. There is *NO* problem of create and find
2. when I try remove sth. in a session bean like
MyBean my=myhome.create(new Integer(1));
I got "removing bean lock and it has tx set" error.
pls find trace at the end of this msg.
3. Same error when update.
4. If changed to CMP, the above is fine.
5. It is reproducible w/ MySQL and SQL-server.
6. I try some tricks found in this forum wildly, like change connection pool/cache(?) size, set autocommit=false, does not help.
I am toally blocked on this !!
thx in advance for any solution.
00:50:59,394 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
java.lang.IllegalStateException: removing bean lock and it has tx set!
There was a bug posted on this yesterday. It mentions that if you call remove on the bean istance instead of the home, it works.
This is not my code, so I don't really understand what is going on. You could add your $0.02 to the bug report at sourceforge.