2 Replies Latest reply on Apr 29, 2009 11:58 AM by Harold Hannon

    nothing persisting?

    Harold Hannon Newbie

      I've used JBPM back in version 2 and I have set up the 3.2.2 version recently. I've noticed quite a few changes in the use of the context and the lack of use of the JBPMSession. I can start and move processes along all day and all night, but there is nothing in my JBPM_XXXInstance tables. No processes, tasks, etc. Did something change or am I still suppose to use the JBPMSession to allow for persisting?

        • 1. Re: nothing persisting?
          Harold Hannon Newbie

          The JTADBPersistenceServiceFactory seems to be my culprit. Switching to the DBPersistenceServiceFactory solved the issue for me.

          • 2. Re: nothing persisting?
            Harold Hannon Newbie

            So, now that I know that the JTA persistance is not committing, can anyone give me a hint as to the why? I'll paste my config and a quick example of a MDB that starts a process that never commits to the database.

             <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
             <!--<service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />-->
             <service name="message" factory="org.jbpm.msg.jms.JmsMessageServiceFactory" />
             <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
             <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
             <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
             <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
             <!-- use the context class loader -->
             <string name="jbpm.classLoader" value="context" />
             Note, that the default job executor needs to be overwritten with a null value.
             In the enterprise configuration there should be no job executor.
             Async messaging is there bound to jms and scheduling to ejb timers.
             <null name="jbpm.job.executor" />

            package com.theplanet.jbpm.messagebeans;
            import javax.ejb.ActivationConfigProperty;
            import javax.ejb.MessageDriven;
            import javax.ejb.TransactionManagement;
            import javax.ejb.TransactionManagementType;
            import javax.ejb.TransactionAttribute;
            import javax.ejb.TransactionAttributeType;
            import javax.jms.Message;
            import javax.jms.TextMessage;
            import javax.jms.MessageListener;
            import org.jbpm.graph.exe.ProcessInstance;
            import org.jbpm.JbpmConfiguration;
            import org.jbpm.JbpmContext;
             * Message-Driven Bean implementation class for: ProcessMDB
            @MessageDriven(name = "ProcessMDB", activationConfig = {
             @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
             @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ProcessQueue"),
             @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
            public class CopyOfProcessMDB implements MessageListener {
             * Default constructor.
             public CopyOfProcessMDB() {
             // TODO Auto-generated constructor stub
             * @see MessageListener#onMessage(Message)
             public void onMessage(Message message) {
             JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
             JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
             try {
             TextMessage txt = (TextMessage) message;
             ProcessInstance processInstance = jbpmContext
             } catch (final Exception exc) {
             try {
             // jbpmContext.setRollbackOnly(); old stuff when using bean managed
             } catch (final Exception e) {
             } finally {
             // jbpmContext.close(); same on bean managed