JBoss Error while retrieving from database
shahin Dec 12, 2002 12:11 AMHi
My JSP Page calls a bean while loading. The bean is called to get the value from the database.
If i load the same page there four times i start getting the following error. It calls the ejbstore() Method and then take
lot of time and display the following error and after that calle the ejbPassivate and unsetEntityContext() method.
------------------------------------------------------------------------------
09:53:28,923 INFO [STDOUT] In ejbStore() CPD method
09:58:28,845 WARN [TxCapsule] Transaction XidImpl [FormatId=257, GlobalId=passi
on//21, BranchQual=] timed out. status=STATUS_ACTIVE
10:03:24,570 INFO [STDOUT] In the ejbPassivate() method
10:03:24,570 INFO [STDOUT] In the unsetEntityContext() method
-------------------------------------------------------------------------------
And If there is no record in the database, it is calling the setEntityContext and then display the following error:
--------------------------------------------------------------------
10:33:10,228 WARN [TxCapsule] Transaction XidImpl [FormatId=257, GlobalId=passi
on//27, BranchQual=] timed out. status=STATUS_ACTIVE
10:33:10,658 ERROR [BeanLock] Thread[RMI TCP Connection(131)-10.21.57.29,5,RMI R
untime]Saw rolled back tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=passio
n//27, BranchQual=] waiting for txLock
---------------------------------------------------------------------------
My ejb-jar.xml file contain the following code:
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
"http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
<ejb-jar>
<display-name>YarnJC</display-name>
<enterprise-beans>
Knitting Job Card
<ejb-name>YarnJC</ejb-name>
com.mediasoft.knitgarman.outsourcing.YarnJCHome
com.mediasoft.knitgarman.outsourcing.YarnJC
<ejb-class>com.mediasoft.knitgarman.outsourcing.YarnJCBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
False
<resource-ref>
<res-ref-name>jdbc/ejbPool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Yarn JC Session
<ejb-name>YarnJCSessionBean</ejb-name>
com.mediasoft.knitgarman.outsourcing.YarnJCSessionHome
com.mediasoft.knitgarman.outsourcing.YarnJCRemote
<ejb-class>com.mediasoft.knitgarman.outsourcing.YarnJCSessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>com.mediasoft.knitgarman.outsourcing/YarnJC</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
com.mediasoft.knitgarman.outsourcing.YarnJCHome
com.mediasoft.knitgarman.outsourcing.YarnJC
<ejb-link>YarnJC</ejb-link>
</ejb-ref>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>YarnJC</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
What could be the problem? Thanks in Advance.