Please help.
Problem:
An application can run on JBoss 3.0.6, but can't run on JBoss, 4.0.0DR3,
It "hangs" when the a sessionEJB tries to access the primary key attribute of a newly created local entity EJB object.
Environment:
JBoss 4.0.0DR3.
Window XP Professional.
MySQL database server: 3.23.58-nt
Detail Problem description:
Entity EJB Account has AccountLocal interface and has attributes userId (primary key) and pwd.
Session EJB ABCSession creates an AccountLocal object as follows:
AccountLocal act = getAccountLocalHome().create(account); //account is a value object.
ABCSession can access the non-primary-key attribute of AccontLocal.
But If it tries to access the primary key, userId of AccountLocal, as follows:
String tmpStr = act.getUserId();
It stucks for several minutes and displays the following console message:
WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=D8WSVL31/18, BranchQual=, localId=18] timed out. status=STATUS_ACTIVE
And several minutes later, another console message is displayed:
WARN [AbstractInstanceCache] Unable to passivate due to ctx lock,id=myid
This console message was displayed several minutes repeatedly.
I check the database when the program stucks, the Account record is created in database.
The ejb-jar.xml specifies the trans-attributes of methods involved are "Required". And I think that
no transaction is established from user interface.
Can anyone please tell me what caused the problem?
Thanks in advance.
Ben C.