2 Replies Latest reply on Apr 2, 2002 11:09 PM by kenryu

    Transaction Problem with BMP

    kenryu

      hi;
      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>



        • 1. Re: Transaction Problem with BMP
          davidjencks

          Have you consulted your dba and made absolutely sure that your use of db resources is not causing the deadlock? Often you have to do significant analysis and develop a resource usage ordering to avoid deadlock problems. Check the size of your db locks also. (table locks are more likely to produce deadlock than row locks)

          • 2. Re: Transaction Problem with BMP
            kenryu

            I have consulted my DBA and came up with nothing to fix that. is it the best if we use jboss in unix platform? for production we're going to free bsd and currently I'm testing jboss in windows platform. Is there any other way to avoid the deadlock? (may be in the jboss.xml or ejb-jar?)how about increasing the <instance-pool> or <container-pool>? like I said before this is the only major problem that prohibit us from deploying multiple number of application for different countries and our time to make a decision is getting closer. So any help or suggestion would be useful. Thank you very much before!



            ^_^
            thank's