You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/12/02 23:21:06 UTC
svn commit: r722636 - in /ode/branches/APACHE_ODE_1.X:
axis2-war/src/test/java/org/apache/ode/axis2/correlation/
axis2/src/main/java/org/apache/ode/axis2/
bpel-store/src/main/java/org/apache/ode/store/
Author: midon
Date: Tue Dec 2 14:21:05 2008
New Revision: 722636
URL: http://svn.apache.org/viewvc?rev=722636&view=rev
Log:
ODE-445: test existence of work/config/app directories
This reverts commit cf7c7cab37ecce553c208512aec39d50b7b0ca50.
Modified:
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java
ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinHibTest.java Tue Dec 2 14:21:05 2008
@@ -6,7 +6,7 @@
@BeforeMethod
protected void setUp() throws Exception {
System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib");
+ getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
super.setUp();
}
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationJoinLazyHibTest.java Tue Dec 2 14:21:05 2008
@@ -6,7 +6,7 @@
@BeforeMethod
protected void setUp() throws Exception {
System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib");
+ getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
super.setUp();
}
}
\ No newline at end of file
Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/correlation/CorrelationMultiHibTest.java Tue Dec 2 14:21:05 2008
@@ -6,7 +6,7 @@
@BeforeMethod
protected void setUp() throws Exception {
System.setProperty("org.apache.ode.configDir",
- getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib");
+ getClass().getClassLoader().getResource("webapp").getFile() + "/WEB-INF/conf.hib-derby");
super.setUp();
}
}
Modified: ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java (original)
+++ ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/ODEServer.java Tue Dec 2 14:21:05 2008
@@ -136,11 +136,15 @@
String rootDir = System.getProperty("org.apache.ode.rootDir");
if (rootDir != null) _appRoot = new File(rootDir);
else _appRoot = new File(contextPath);
+
+ if(!_appRoot.isDirectory()) throw new IllegalArgumentException(_appRoot+" does not exist or is not a directory");
TempFileManager.setWorkingDirectory(_appRoot);
__log.debug("Loading properties");
String confDir = System.getProperty("org.apache.ode.configDir");
_configRoot = confDir == null ? new File(_appRoot, "conf") : new File(confDir);
+ if(!_configRoot.isDirectory()) throw new IllegalArgumentException(_configRoot+" does not exist or is not a directory");
+
_odeConfig = new ODEConfigProperties(_configRoot);
try {
@@ -157,6 +161,7 @@
String wdir = _odeConfig.getWorkingDir();
if (wdir == null) _workRoot = _appRoot;
else _workRoot = new File(wdir.trim());
+ if(!_workRoot.isDirectory()) throw new IllegalArgumentException(_workRoot+" does not exist or is not a directory");
__log.debug("Initializing transaction manager");
initTxMgr();
Modified: ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessConfImpl.java Tue Dec 2 14:21:05 2008
@@ -131,17 +131,18 @@
List<File> propFiles = new ArrayList<File>();
propFiles.addAll(_du.getEndpointConfigFiles());
- if (_configDir != null) {
+ if (_configDir != null && _configDir.isDirectory()) {
// list and sort endpoint config files
File[] files = _configDir.listFiles(new FileFilter() {
public boolean accept(File path) {
return path.getName().endsWith(".endpoint") && path.isFile();
}
});
- if( files != null ) {
- Arrays.sort(files);
- propFiles.addAll(Arrays.asList(files));
- }
+ Arrays.sort(files);
+ propFiles.addAll(Arrays.asList(files));
+ }else{
+ // this case should not happen since the dir exsistence is tested in ODEServer
+ if(__log.isWarnEnabled()) __log.warn(_configDir+" does not exist or is not a directory");
}
return propFiles;
}
Modified: ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java?rev=722636&r1=722635&r2=722636&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java (original)
+++ ode/branches/APACHE_ODE_1.X/bpel-store/src/main/java/org/apache/ode/store/ProcessStoreImpl.java Tue Dec 2 14:21:05 2008
@@ -731,6 +731,8 @@
}
public void setDeployDir(File depDir) {
+ if (depDir != null && !depDir.isDirectory())
+ throw new IllegalArgumentException("Deploy directory is not a directory or does not exist: " + depDir);
_deployDir = depDir;
}
@@ -743,6 +745,8 @@
}
public void setConfigDir(File configDir) {
+ if (configDir != null && !configDir.isDirectory())
+ throw new IllegalArgumentException("Config directory is not a directory or does not exist: " + configDir);
this._configDir = configDir;
}