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

    JbpmSessionFactory scope Q

    Fred Muhlenberg Newbie


      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
          Alejandro Guizar Master

          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.