3 Replies Latest reply on Nov 22, 2005 10:07 AM by Yunfeng Hou

    dependency on JbpmSession/JbpmSessionFactory

    James Depoorter Novice

      Do we have to depend on JbpmSession and/or JbpmSessionFactory? In other words, could we have our own session managers, factories and the like, which will address the various sessions (GraphSession, TaskMgtSession,...), or at least override them (as the JbpmSession is needed in the constructor for the sessions)?
      The JbpmSession and Factory could be seen as utility stuff, as the real implementation is within the different pojos, sessions...
      In that way, one could safely omit using the JbpmSession and Factory in favor of an own implementation.
      Defining some interfaces on top of them could also do the trick, because adhering to a certain contract is very useful for custom implementations.


        • 1. Re: dependency on JbpmSession/JbpmSessionFactory
          Tom Baeyens Master

          i'm working on simplification of this now. cause i'm adding async continuation of process.

          should make session management easier and better configurable.

          if you're interested, please take the time to look at the alpha versions of 3.1 that will be released in a few weeks and provide us with some feedback.

          regards, tom.

          • 2. Re: dependency on JbpmSession/JbpmSessionFactory
            James Depoorter Novice

            Feedback :-)

            We've seen that ContextBuilder is a starting point for configuring things like session management, transaction management, etc... We would like to define the ContextBuilder in a Spring environment instead of using the built-in ObjectFactory stuff (where javadoc refers to Spring). Problems:
            - In doc. Internal JBPM Usages 6.1.1 , it is specified that ContextBuilder.create("client") should be called. We would like to use injection to inject the defined ContextBuilder (in spring) in the beans that need it.
            - The ObjectFactory could be manufactured from an AbstractObjectFactory, so this could serve as a wrapper for any beanfactory like Spring. That way, you never have to explicitly call create, but use something like ObjectFactory.getBean("name"), and let the factory do the rest. This is useful for e.g. GraphSession, which now calls create explicitly.
            - We also would like to specify our own implementation of a *Session, also in a beanwise manner.

            All suggestions are welcome. We are very happy to contribute.

            • 3. Re: dependency on JbpmSession/JbpmSessionFactory
              Yunfeng Hou Newbie

              I implements a jbpm session factory and jbpm session which could be used in Spring. To get a jbpmSession, all you should do is just call

              JbpmSession session =(JbpmSession) appContext.getBean("jbpmSessionFactory");


              My implementation also leave the transaction support to transaction manager, so it is quite a complete implementation.

              Please refer to
              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72744

              Yunfeng Hou