5 Replies Latest reply on Mar 29, 2006 5:23 AM by r f

    JMS, MDB, and jBPM as a SAR?

    Jim Rigsbee Newbie

      I'm working on the JMS implementation. I'll have an MDB command executor. I don't want to have to build a jbpm context for each instance of the bean. Would it make sense to deploy jBPM as a SAR such that the MDB gets its context from it.

      I know there has been some suggestion as doing that for BPEL and other integration of jBPM into JBoss...how does this fit in and who do I need to coordinate with?

      Regards, Jim

        • 1. Re: JMS, MDB, and jBPM as a SAR?
          Tom Baeyens Master

          see the ant target 'create.jbpm.configuration' in the build file build.deploy.xml.

          that will create a new jboss server configuration called jbpm, based on the default configuration. the jbpm.sar is deployed in there.

          that service archive does nothing but publish the JbpmConfiguration in JNDI.

          note that the webapplication is completely broken since i'm reworking it.

          regards, tom.

          • 2. Re: JMS, MDB, and jBPM as a SAR?
            Jim Rigsbee Newbie

            Tom,

            I notice in the current command executor thread we establish a context on each message processed and then close it.

            Is there alot of overhead associated with this? Do you have any ideas for how we might avoid having to start up the engine, hibernate, etc. on every transaction?

            Thanks, Jim

            • 3. Re: JMS, MDB, and jBPM as a SAR?
              Tom Baeyens Master

              Creating JbpmContext objects is very little overhead. Let me know if you think different.

              Everything in JbpmContext is initialized lazy. So you only will initialize something that is absolutely necessary.

              In a jboss environment, you might check if there is a current hibernate session (with SessionFactory.getCurrentSession()) and inject that into the jbpm context with JbpmContext.setSession(...);

              regards, tom.

              • 4. Re: JMS, MDB, and jBPM as a SAR?
                Jim Rigsbee Newbie

                Excellent idea...

                Thanks, Jim

                • 5. Re: JMS, MDB, and jBPM as a SAR?
                  r f Newbie

                  I've tried to use the JmsMessageServiceFactoryImpl, and needed quite some time to find out that it is not implemented. Instead of making it look like it would work, it would be nice to put a throw new InternalError("Not implemented yet"); so that you do not waste time searching for a possible misconfig to realise at the end that you never had a chance to use it.