4 Replies Latest reply on Jun 21, 2006 11:28 AM by Brian Viveiros

    createSession slow under load. (or createQueueSession)

    Brian Viveiros Newbie

      When I test my application under load the createSession(true, Session.SESSION_TRANSACTED) method becomes my bottleneck. I've seen it take up to 2 seconds to return.

      Can someone explain what is happening in this method that might be slowing things down?

      - JBoss AS 4.0.3SP1
      - The application and the queue are running on the same server.
      - The app has a servlet that does the following:
      1. Lookup the UserTransaction.
      2. Begin a new Transaction
      3. Get a Hibernate session
      4. Create a JMS Session
      5. Performs some database queries and inserts using Hibernate.
      6. Post a message to the queue
      7. Commit the UserTransaction