1 Reply Latest reply on Jan 11, 2006 4:18 PM by aguizar

    JbpmSessionFactory scope Q

    fmuhlenberg


      Should the JbpmSession instance

      JbpmSession jbpms = JbpmSessionFactory.getInstance().openJbpmSession();
      


      be held as a singleton or can multiple instances concurrently exist?

      I'm running both sevlets and EJBs in my jBoss jBPM instance and am running into exceptions related to transactions.

      -fm


        • 1. Re: JbpmSessionFactory scope Q
          aguizar

          There should be one JbpmSession per thread. When you openJbpmSession(), the session is associated to the current thread, and you can retrieve it at any time later with JbpmSession.getCurrentJbpmSession(). You might want to read the topic Transaction demarcation with EJB/CMT to get more details about working with transactions.