Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
ARQ-384 Update some container v. in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakknutsen committed Mar 18, 2011
1 parent 4fea174 commit 0681049
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Expand Up @@ -203,13 +203,18 @@ private Properties getInitialProperties() throws IOException

// Load properties from a jndi.properties file if it exists.
// OpenEJB would have done this if started via the InitialContext
String propertiesFile = containerConfig.getJndiProperties() == null ? "jndi.properties" : containerConfig.getJndiProperties();
InputStream jndiPropertiesStream = new FileInputStream(new File(propertiesFile));
if (jndiPropertiesStream != null)
if(containerConfig.getJndiProperties() != null)
{
properties.load(jndiPropertiesStream);
File jndiPropertiesFile = new File(containerConfig.getJndiProperties());
if(jndiPropertiesFile.exists())
{
InputStream jndiPropertiesStream = new FileInputStream(jndiPropertiesFile);
if (jndiPropertiesStream != null)
{
properties.load(jndiPropertiesStream);
}
}
}

// configure OpenEJB to not deploy apps from the classpath
properties.put("openejb.deployments.classpath", "false");
// configure OpenEJB to use integration classes from Arquillian
Expand Down
Expand Up @@ -154,7 +154,7 @@ protected Object lookupEJB(Class<?> fieldType, String mappedName) throws Excepti
// }

InitialContext initcontext = createContext();
if(mappedName != null)
if(mappedName != null && !mappedName.equals(""))
{
return initcontext.lookup(mappedName);
}
Expand Down

0 comments on commit 0681049

Please sign in to comment.