Transaction Problem with BMP
kenryu Apr 2, 2002 10:08 AMhi;
I'm writing an BMP entity bean with CMT that insert data into sql server 2000. But I keep on having deadlock problem. This is the message that I got from Jboss:
[INFO,Default] Error in storeRow = com.jnetdirect.jsql.u: Transaction (Process I
D 142) was deadlocked on {lock} resources with another process and has been chos
en as the deadlock victim. Rerun the transaction.
I have used JSQL Connect and database driver and I still experienced the same problem. Could you please any body who has experience on this? (probably JBOSS Developer?). cause this is the MAJOR problem that prevent us from using JBoss as our production application server.
I also have increase the instance-pool size and cache to 1000. Please helppppppppp
This is the jboss.jcml configuration:
=====================================
com.jnetdirect.jsql.JSQLDriver
SQLServerDS
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
jdbc:JSQLConnect://localhost:1433/test
1200000
tj
arlo97
100
1000
false
false
false
false
120000
200000
true
false
1.0
TRANSACTION_READ_COMMITTED
this is the ejb-jar.xml :
==========================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>
no description
<display-name>TestJAR</display-name>
<enterprise-beans>
no description
<display-name>TestBean</display-name>
<ejb-name>TestBean</ejb-name>
TestHome
Test
<ejb-class>TestEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
False
<resource-ref>
<res-ref-name>jdbc/Test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>TestBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TestBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>methodD</method-name>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TestBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
<container-transaction>
<ejb-name>TestBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>findByPrimaryKey</method-name>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
this is the jboss.xml:
=======================
<enterprise-beans>
<ejb-name>TestBean</ejb-name>
<jndi-name>ejb/Test</jndi-name>
<resource-ref>
<res-ref-name>jdbc/Test</res-ref-name>
<jndi-name>java:/SQLServerDS</jndi-name>
</resource-ref>
</enterprise-beans>
<container-configurations>
<instance-pool>100000</instance-pool>
<instance-cache>100000</instance-cache>
</container-configurations>