Hi,
I have two problems I’m trying to figure out.
I’m trying to configure a process engine with JTA. I’m using the JtaProcessEngineConfiguration (we are not using spring) and at least on the surface looked like it is working. However, when I execute my code to deploy a process I notice that it is still immediately visible in other transactions. This is the first problem, because I don’t feel like I should be able to see that until the global transaction commits. I think this is a bug, but I’m not sure as I’m not a JTA expert.
Next issue is that I’m artificially testing it by throwing a RuntimeException after deployment. I see that it is trying to do an UnregisterDeploymentCmd, but it gets a NullPointerException in AbstractManager on this line:
Context.getCommandContext().getAuthentication();
so even unregistering the deployment doesn’t work. This definitely seems like a bug to me, I’ve stepped through and Context.getCommandContext()
is returning null.
java.lang.NullPointerException at org.camunda.bpm.engine.impl.persistence.AbstractManager.getCurrentAuthentication(AbstractManager.java:256) at org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager.checkCamundaAdmin(AuthorizationManager.java:463) at org.camunda.bpm.engine.impl.cmd.UnregisterDeploymentCmd.execute(UnregisterDeploymentCmd.java:39) at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentFailListener.execute(DeploymentFailListener.java:35) at org.camunda.bpm.engine.impl.cfg.jta.JtaTransactionContext$TransactionStateSynchronization.afterCompletion(JtaTransactionContext.java:102) at com.atomikos.icatch.jta.Sync2Sync.afterCompletion(Sync2Sync.java:61) at com.atomikos.icatch.imp.CoordinatorImp.notifySynchronizationsAfterCompletion(CoordinatorImp.java:441) at com.atomikos.icatch.imp.CoordinatorStateHandler.rollbackWithAfterCompletionNotification(CoordinatorStateHandler.java:564) at com.atomikos.icatch.imp.ActiveStateHandler.rollback(ActiveStateHandler.java:279) at com.atomikos.icatch.imp.CoordinatorImp.rollback(CoordinatorImp.java:577) - locked <0x6c0a> (a com.atomikos.finitestates.FSMImp) at com.atomikos.icatch.imp.TransactionStateHandler.rollback(TransactionStateHandler.java:165) at com.atomikos.icatch.imp.TransactionStateHandler.rollbackWithStateCheck(TransactionStateHandler.java:180) at com.atomikos.icatch.imp.CompositeTransactionImp.doRollback(CompositeTransactionImp.java:201) at com.atomikos.icatch.imp.CompositeTransactionImp.rollback(CompositeTransactionImp.java:314) at com.atomikos.icatch.jta.TransactionImp.rollback(TransactionImp.java:199) at com.atomikos.icatch.jta.TransactionManagerImp.rollback(TransactionManagerImp.java:426) at com.atomikos.icatch.jta.UserTransactionImp.rollback(UserTransactionImp.java:97)
Any opinion is appreciated,
Thanks