Author: alex.guizar(a)jboss.com
Date: 2010-08-07 17:45:37 -0400 (Sat, 07 Aug 2010)
New Revision: 6551
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/etc/jbpm.jndi.properties
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1903/ENCAction.java
Log:
JBPM-2916 provide fallback naming provider url and partition name
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/etc/jbpm.jndi.properties
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/etc/jbpm.jndi.properties 2010-08-07
20:23:33 UTC (rev 6550)
+++
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/main/etc/jbpm.jndi.properties 2010-08-07
21:45:37 UTC (rev 6551)
@@ -1 +1,2 @@
-java.naming.provider.url=${jboss.bind.address}:1100
+java.naming.provider.url=jnp://${jboss.bind.address}:1100 jnp://${jboss.bind.address}
+jnp.partitionName=${jboss.partition.name}
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1903/ENCAction.java
===================================================================
---
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1903/ENCAction.java 2010-08-07
20:23:33 UTC (rev 6550)
+++
jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/jbpm1903/ENCAction.java 2010-08-07
21:45:37 UTC (rev 6551)
@@ -3,6 +3,7 @@
import javax.naming.Context;
import javax.naming.InitialContext;
+import org.apache.commons.logging.LogFactory;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
@@ -11,13 +12,15 @@
private static final long serialVersionUID = 1L;
public void execute(ExecutionContext executionContext) throws Exception {
- Context jndiContext = new InitialContext();
+ Context initialContext = new InitialContext();
+ // log jndi environment
+ LogFactory.getLog(ENCAction.class).info(initialContext.getEnvironment());
try {
- Object queue = jndiContext.lookup("java:comp/env/jms/JobQueue");
+ Object queue = initialContext.lookup("java:comp/env/jms/JobQueue");
executionContext.setVariable("queue", queue);
}
finally {
- jndiContext.close();
+ initialContext.close();
}
executionContext.leaveNode();
}