I had an experiment: before a process start and after it I looked up the UserTransaction:
try {
logger.info("found: " + new InitialContext().lookup("java:comp/UserTransaction"));
} catch (NamingException e) {
logger.info("not found", e);
}
// start process code
try {
logger.info("found: " + new InitialContext().lookup("java:comp/UserTransaction"));
} catch (NamingException ex) {
logger.info("not found", ex);
}
The name java:comp/UserTransaction I took from org.drools.persistence.jta.JtaTransactionManager which falls with NPE.
It still falls and in my log:
30974 | Thu Jan 01 12:39:35 MSK 1970 | INFO | found: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@1033fb5 | com.example.my.jbpm.rest.ProcessManagementResources | http--127.0.0.1-8080-2 |
| Note [note=] |
31052 | Thu Jan 01 12:39:36 MSK 1970 | FINE | No UserTransaction found at JNDI location [java:comp/UserTransaction] | org.drools.persistence.jta.JtaTransactionManager | NioProcessor-2 |
| Note [note=] |
31159 | Thu Jan 01 12:39:37 MSK 1970 | INFO | found: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@1033fb5 | com.example.my.jbpm.rest.ProcessManagementResources | http--127.0.0.1-8080-2 |
| Note [note=] |