2 Replies Latest reply on Apr 4, 2006 11:12 AM by forjbpm

    JbpmSessionFactory inside an EJB

    aamonten

      Can any tell me how to retreive a JbpmSessionFactory inside an EJB? a piece of source code would be great.

      regards
      Alejandro

        • 1. Re: JbpmSessionFactory inside an EJB
          aguizar

          Take a look at this topic: Transaction demarcation with EJB/CMT.

          Instead of looking up the JbpmSessionFactory in JNDI yourself, you can retrieve it by calling JbpmSessionFactory.getInstance() within ejbCreate() and keep it in a field. Remember to nullify that field in ejbRemove().

          • 2. Re: JbpmSessionFactory inside an EJB
            forjbpm

            Hi!

            Just a question, I am posting it here because its related to EJB.
            what is this doing exactly?


            JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();


            Can I use directly this to open graphSession directly? the way you are doing it in you monitoring code?

            Regards,