0 Replies Latest reply on Feb 18, 2016 3:44 PM by dominique.toupin

    How to configure jBPM 6.3 with EJB to works on Wildfly 10.0.0.Final

    dominique.toupin

      We are developing a client/server application backed by Wildfly 10.0.0.Final (remote EJB calls) and are currently evaluating several workflow engines to integrate in our application.

       

      So far, we have this setup:

       

      I will explain why we had to come up with this configuration in a moment.

       

      We made the following adjustments to the kie-*.war in order to make them works under Wildfly 10 (using the "standalone-full.xml" profile):

      • kie-wb-distribution-wars-6.3.0.Final-wildfly8.war
        • WEB-INF/bpms-jms.xml
          • Change xmlns="urn:jboss:messaging-deployment:1.0" to xmlns="urn:jboss:messaging-activemq-deployment:1.0"
          • Change hornetq-server to server
      • kie-server-6.3.0.Final-ee7.war

       

      With this setup, we want to achieve this: the first Wildfly server will contain the KIE Workbench which will also act as the jBPM controller, while the second Wildfly server will be used as our application back-end and wiil allow the client to interact with workflows via remote EJB calls.

       

      At first, we tried to put everything on the same server, but we kept on getting org.hibernate.StaleStateException when trying to perform operations using the workbench and remote EJB calls, which almost completely disappeared after splitting our setup in two.

       

      However, after further investigations, it seems our problems comes from conflicting KSession instances, probably because the default RuntimeManager strategy used for EJB calls is "Singleton" (I guessed that based on the "*-jbpmSessionId.ser" files I found in the standalone/data folder of my Wildfly servers).

       

      I read here that other strategies can be used. From what I deduced, the strategy that would best suit us would be the "Per request" strategy.

       

      How can we configure our setup to use this RuntimeManager strategy? Was there an easier way to integrate jBPM EJB api in our setup? One of our requirements is that jBPM tables resides in the same database as our application tables but in a different schema.

       

      Thanks in advance for your help.