[
https://jira.jboss.org/jira/browse/JBPM-2694?page=com.atlassian.jira.plug...
]
Juan Pedraja commented on JBPM-2694:
------------------------------------
I am also hitting the same problem in 4.3 and WLS 10.3.2. See
http://community.jboss.org/message/522467#522467 for more details.
The problem lies in the hardcoded Jboss names used in the JTATransaction class. These are
not configurable through the xml configuration
package org.jbpm.pvm.internal.tx;
public class JtaTransaction extends AbstractTransaction implements Transaction {
private static Log log = Log.getLog(JtaTransaction.class.getName());
public static final String JNDINAME_USERTRANSACTION_JBOSS_GLOBAL =
"UserTransaction";
public static final String JNDINAME_TRANSACTIONMANAGER_JBOSS_GLOBAL =
"java:/TransactionManager";
protected String userTransactionJndiName = JNDINAME_USERTRANSACTION_JBOSS_GLOBAL;
protected String transactionManagerJndiName = JNDINAME_TRANSACTIONMANAGER_JBOSS_GLOBAL;
The workaround I am using right now is to access the ConfigurationImpl object directly AND
overide override the JtaTransaction Wire binding with WLSJtaTransaction
public static class WLSJtaTransaction extends JtaTransaction {
public AppServerJtaTransaction() {
super.transactionManagerJndiName =
"javax.transaction.TransactionManager"
super.userTransactionJndiName = "java:comp/UserTransaction";
}
}
public void initJBPM() {
// It should really be org.jbpm.api.Configuration configuration = new
org.jbpm.api.Configuration();
org.jbpm.pvm.internal.cfg. ConfigurationImpl configuration = new
org.jbpm.pvm.internal.cfg.ConfigurationImpl();
String configFile = "" ; //READ in your jbpm.cfg.xml
configuration.setXmlString(configFile);
configuration.getTransactionWireDefinition().addDescriptor(JtaTransaction.class.getName(),
new ObjectDescriptor(AppServerJtaTransaction.class));
processEngine = configuration.buildProcessEngine();
}
JTA Transaction - couldn't lookup 'UserTransaction' from
jndi
-------------------------------------------------------------
Key: JBPM-2694
URL:
https://jira.jboss.org/jira/browse/JBPM-2694
Project: jBPM
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.2, jBPM 4.1, jBPM 4.0
Environment: Application Server Oracle Weblogic 10.3
Java 6
DB2 v9
Windows XP Professional
Reporter: P. De Bock
On Oracle Weblogic 10.3, the JTA transaction feature causes an exception.
org.jbpm.api.JbpmException: couldn't lookup 'UserTransaction' from jndi:
Unable to resolve 'UserTransaction'. Resolved '': Unable to resolve
'UserTran
saction'. Resolved ''
at
org.jbpm.pvm.internal.tx.jta.JtaTransaction.lookupFromJndi(JtaTransaction.java:137)
at
org.jbpm.pvm.internal.tx.jta.JtaTransaction.lookupJeeUserTransaction(JtaTransaction.java:116)
at
org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:42)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
at
org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
at
org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
...
Default Weblogic JNDI reference = 'javax.transaction.UserTransaction' but jBPM
4.2 only support standard JEE specs ('UserTransaction').
With, jBPM 3.3, it's possible to override the jndi name value as a property in the
jbpm hibernate config file (<property
name="jta.UserTransaction">java:comp/UserTransaction</property>).
Ref :
http://docs.jboss.org/jbpm/v3/userguide/deployment.html
I am not sure that jBPM 4.2 implements that solution.
I also know that "JTA Transactions" is in Incubation and is not documented in
Developers Guide and that app-servers ohter than jBOSS are not assumed to be supported.
Does a actual solution or work-around exist for that problem with released 4.2 version ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira