Skip to content

Commit

Permalink
* Updated the activity-monitor version to 1.2.0-SNAPSHOT.
Browse files Browse the repository at this point in the history
* Updated the JNDI name.
  • Loading branch information
jeffyu committed Jan 10, 2012
1 parent e9b7a3d commit a178543
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Expand Up @@ -25,4 +25,5 @@ public class JNDINamingUtils {

public static final String BPEL_ENGINE = "java:global/BPELEngine";

public static final String BPEL_EMF = "java:global/BPELEMFactory";
}
Expand Up @@ -36,7 +36,7 @@ public ProcessHistoryPluginImpl() {
try
{
InitialContext ctx = new InitialContext();
EntityManagerFactory emf = (EntityManagerFactory)ctx.lookup("bpel/EntityManagerFactory");
EntityManagerFactory emf = (EntityManagerFactory)ctx.lookup(JNDINamingUtils.BPEL_EMF);
if (null == emf) {
throw new IllegalStateException("EntityManagerFactory is null");
}
Expand Down
Expand Up @@ -79,6 +79,7 @@ public class BPELEngineImpl implements BPELEngine {
private static final Log LOG=LogFactory.getLog(BPELEngineImpl.class);

private static final String _jndiName = "BPELEngine";
private static final String _emfJndiName = "BPELEMFactory";

private BpelServerImpl _bpelServer;
private RiftSawProcessStore _store;
Expand Down Expand Up @@ -156,6 +157,12 @@ public void init(ServiceLocator locator, java.util.Properties props) throws Exce

LOG.info("Register the BPEL Engine into JNDI");
JndiServiceActivator.registerToJndi(_jndiName, this);
// hack to expose the EntityManagerFactory.
// See org.apache.ode.dao.jpa.hibernate.BpelDAOConnectionFactoryImpl as well.
Object emf = _odeConfig.getProperties().get("ode.emf");
if (emf != null) {
JndiServiceActivator.registerToJndi(_emfJndiName, emf);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -101,7 +101,7 @@
<riftsaw.ode.version>3.0.0-SNAPSHOT</riftsaw.ode.version>
<riftsaw.engine.version>3.0.0-SNAPSHOT</riftsaw.engine.version>
<bpel.console.version>2.4.0-SNAPSHOT</bpel.console.version>
<activity.monitor.model.version>1.0.0.Final</activity.monitor.model.version>
<activity.monitor.model.version>1.2.0-SNAPSHOT</activity.monitor.model.version>
<dsp.version>1.0.0.Final</dsp.version>
<commons.logging.version>1.1.1</commons.logging.version>
<commons.lang.version>2.4</commons.lang.version>
Expand Down

0 comments on commit a178543

Please sign in to comment.