Author: rmannibucau
Date: Fri Oct 5 21:26:39 2012
New Revision: 1394821
URL: http://svn.apache.org/viewvc?rev=1394821&view=rev
Log:
OPENEJB-1909 using etc as synonym for conf folder - managing case where
oepnejb.xml doesnt' exist
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigUtils.java
Modified:
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigUtils.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigUtils.java?rev=1394821&r1=1394820&r2=1394821&view=diff
==============================================================================
---
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigUtils.java
(original)
+++
openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigUtils.java
Fri Oct 5 21:26:39 2012
@@ -120,7 +120,7 @@ public class ConfigUtils {
/*
* [5] Try finding the standard openejb.conf file relative to the
*/
- file = SystemInstance.get().getConf("conf/openejb.conf");
+ file = SystemInstance.get().getConf("openejb.conf");
if (file != null && file.exists() && file.isFile()) {
return file.getAbsolutePath();
}
@@ -149,7 +149,7 @@ public class ConfigUtils {
throw new OpenEJBException("Could not locate config file: ", e);
}
- return (file == null) ? null : file.getAbsolutePath();
+ return (file == null || !file.exists()) ? null :
file.getAbsolutePath();
}
public static File createConfig(File config) throws java.io.IOException {