1 Reply Latest reply on Sep 17, 2001 1:32 PM by Jeffrey Wescott

    Deadlocks using session beans/trasactional database calls

    Chad Brak Newbie


      I set up a test using Apache's JMeter to see if I could bring down my application which is currently written using two different approaches.

      The first way is a combination of struts/ejbs where the action object makes a remote call to a session bean that queries a MySQL database. The connections are established in the following manner from DAO objects instantiated from the session beans:

      initialContext = new InitialContext();
      ds = (DataSource)initialContext.lookup("java:/mySQLDB");
      conn = ds.getConnection("xxx","xxx");

      which you might have already noticed by reading my last posting.

      The second method I am using is non-ejb related in that the database calls are made through my local connection pool from servlets/beans.

      There is a troubling performance issue with the first method...I get deadlocked when 4 people are hitting the site at the same time. With my non-ejb method, however, I can have 20 people hitting the site every second with response times under a second. What is the deal with transactional database calls in the context of JBoss? Is there a way to do some major performance tuning? I have the latest mm.mysql driver and the latest MySQL database.

      I would be grateful for any clues in this matter.