2 Replies Latest reply on Sep 1, 2006 5:57 AM by Kevin Conner

    Transaction timing out

    Srdjan Djuricic Newbie

      I have a problem with transaction timing out and I know how to increase the time out interval but I would just like to learn as to what exactly is going on and how I can fix the problem without increasing the timeout.

      class RequestProcessor {

      public void do() {

      // very long process
      // retrieve another session bean
      persistence = (IPersistence) ctx.lookup( IPersistence.JNDI_NAME );


      public class PersistenceFacade implements IPersistence {
      private EntityManager em;

      // calls an entityManager to retrieve
      public void retrieve()


      RequestProcessor is a session bean that is being called remotely. In ejb-jar.xml transaction type is set to Bean.
      It calls another session bean called PeristenceFacade that contains entity manager to insert entity beans. The transaction type in PersistenceFace
      is set to Container.

      While still executing a doSomeWhereLongProcess I get notification in log that transaction timed out and when it tries to called PersistenceFacade
      I get an exception. What would it start a transaction even before I looked up a PersistenceFacade?

      I tried setting transaction type to Bean in PersistenceFacade but it is complaining that EntityManager must have a transaction.

      What is the proper way of handling this type of scenario?