You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2010/01/04 06:32:31 UTC
svn commit: r895566 - in /geronimo/server/trunk:
framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/
framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/
framework/modules/geronimo-kerne...
Author: xuhaihong
Date: Mon Jan 4 05:32:06 2010
New Revision: 895566
URL: http://svn.apache.org/viewvc?rev=895566&view=rev
Log:
GERONIMO-5008 Create util methods for all the Geronimo components
Added:
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/IOUtils.java
- copied, changed from r895383, geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/SelectorUtils.java
- copied, changed from r895383, geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SelectorUtils.java
Removed:
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/classloader/IoUtil.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SelectorUtils.java
Modified:
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationResolver.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/AbstractRepository.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/UnpackArtifactTypeHandler.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/SelectorUtilsTest.java
geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigStore.java
geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java
geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationResolver.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationResolver.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationResolver.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationResolver.java Mon Jan 4 05:32:06 2010
@@ -22,7 +22,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.Stack;
@@ -30,9 +29,9 @@
import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.kernel.repository.ArtifactResolver;
import org.apache.geronimo.kernel.repository.Dependency;
-import org.apache.geronimo.kernel.repository.ImportType;
import org.apache.geronimo.kernel.repository.MissingDependencyException;
import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.util.IOUtils;
/**
* @version $Rev$ $Date$
@@ -121,7 +120,7 @@
Set<URL> matches = configurationStore.resolve(configurationId, moduleName, pattern);
return matches;
} else if (baseDir != null) {
- Set<URL> matches = IOUtil.search(baseDir, pattern);
+ Set<URL> matches = IOUtils.search(baseDir, pattern);
return matches;
} else {
throw new IllegalStateException("No configurationStore or baseDir supplied so paths can not be resolved");
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/AbstractRepository.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/AbstractRepository.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/AbstractRepository.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/AbstractRepository.java Mon Jan 4 05:32:06 2010
@@ -25,7 +25,6 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/UnpackArtifactTypeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/UnpackArtifactTypeHandler.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/UnpackArtifactTypeHandler.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/UnpackArtifactTypeHandler.java Mon Jan 4 05:32:06 2010
@@ -16,18 +16,15 @@
*/
package org.apache.geronimo.kernel.repository;
-import java.io.InputStream;
import java.io.File;
-import java.io.IOException;
import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
-import java.util.zip.ZipInputStream;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
-import org.apache.geronimo.kernel.repository.ArtifactTypeHandler;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.repository.FileWriteMonitor;
-import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.util.IOUtils;
/**
* @version $Rev: 476049 $ $Date: 2006-11-17 15:35:17 +1100 (Fri, 17 Nov 2006) $
@@ -76,7 +73,7 @@
}
}
} finally {
- IOUtil.flush(out);
+ IOUtils.flush(out);
out.close();
}
in.closeEntry();
@@ -84,7 +81,7 @@
}
}
} catch (IOException e) {
- IOUtil.recursiveDelete(target);
+ IOUtils.recursiveDelete(target);
throw e;
} finally {
in.close();
Copied: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/IOUtils.java (from r895383, geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/IOUtils.java?p2=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/IOUtils.java&p1=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java&r1=895383&r2=895566&rev=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/IOUtil.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/IOUtils.java Mon Jan 4 05:32:06 2010
@@ -14,15 +14,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.kernel.config;
+package org.apache.geronimo.kernel.util;
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.io.Reader;
import java.io.Writer;
import java.net.MalformedURLException;
import java.net.URL;
@@ -42,8 +43,8 @@
/**
* @version $Rev$ $Date$
*/
-public class IOUtil {
- private static final Logger log = LoggerFactory.getLogger(IOUtil.class);
+public class IOUtils {
+ private static final Logger log = LoggerFactory.getLogger(IOUtils.class);
public static void recursiveCopy(File srcDir, File destDir) throws IOException {
if (srcDir == null) throw new NullPointerException("sourceDir is null");
@@ -177,61 +178,7 @@
return deleteFile(root);
}
- public static void flush(OutputStream thing) {
- if (thing != null) {
- try {
- thing.flush();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void flush(Writer thing) {
- if (thing != null) {
- try {
- thing.flush();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void close(JarFile thing) {
- if (thing != null) {
- try {
- thing.close();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void close(InputStream thing) {
- if (thing != null) {
- try {
- thing.close();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void close(OutputStream thing) {
- if (thing != null) {
- try {
- thing.close();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void close(Reader thing) {
- if (thing != null) {
- try {
- thing.close();
- } catch (Exception ignored) {
- }
- }
- }
-
- public static void close(Writer thing) {
+ public static void close(Closeable thing) {
if (thing != null) {
try {
thing.close();
@@ -253,7 +200,7 @@
matches.put(pattern, match);
}
} else {
- Map<String, File> files = IOUtil.listAllFileNames(root);
+ Map<String, File> files = IOUtils.listAllFileNames(root);
for (Map.Entry<String, File> entry : files.entrySet()) {
String fileName = entry.getKey();
if (SelectorUtils.matchPath(pattern, fileName)) {
@@ -348,4 +295,80 @@
map.put(prefix, base);
return map;
}
+
+ public static byte[] getBytes(InputStream inputStream) throws IOException {
+ try {
+ byte[] buffer = new byte[4096];
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ for (int count = inputStream.read(buffer); count >= 0; count = inputStream.read(buffer)) {
+ out.write(buffer, 0, count);
+ }
+ byte[] bytes = out.toByteArray();
+ return bytes;
+ } finally {
+ close(inputStream);
+ }
+ }
+
+ public static void flush(OutputStream thing) {
+ if (thing != null) {
+ try {
+ thing.flush();
+ } catch(Exception ignored) {
+ }
+ }
+ }
+
+ public static void flush(Writer thing) {
+ if (thing != null) {
+ try {
+ thing.flush();
+ } catch(Exception ignored) {
+ }
+ }
+ }
+
+ public static void close(JarFile thing) {
+ if (thing != null) {
+ try {
+ thing.close();
+ } catch(Exception ignored) {
+ }
+ }
+ }
+
+ public static final class EmptyInputStream extends InputStream {
+ public int read() {
+ return -1;
+ }
+
+ public int read(byte b[]) {
+ return -1;
+ }
+
+ public int read(byte b[], int off, int len) {
+ return -1;
+ }
+
+ public long skip(long n) {
+ return 0;
+ }
+
+ public int available() {
+ return 0;
+ }
+
+ public void close() {
+ }
+
+ public synchronized void mark(int readlimit) {
+ }
+
+ public synchronized void reset() {
+ }
+
+ public boolean markSupported() {
+ return false;
+ }
+ }
}
Copied: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/SelectorUtils.java (from r895383, geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SelectorUtils.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/SelectorUtils.java?p2=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/SelectorUtils.java&p1=geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SelectorUtils.java&r1=895383&r2=895566&rev=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/SelectorUtils.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/util/SelectorUtils.java Mon Jan 4 05:32:06 2010
@@ -14,12 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.geronimo.kernel.config;
+package org.apache.geronimo.kernel.util;
import java.io.File;
import java.util.StringTokenizer;
import java.util.Vector;
+import org.apache.geronimo.kernel.config.Os;
+
/**
* <p>This is a utility class used by selectors and DirectoryScanner. The
* functionality more properly belongs just to selectors, but unfortunately
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/SelectorUtilsTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/SelectorUtilsTest.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/SelectorUtilsTest.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/config/SelectorUtilsTest.java Mon Jan 4 05:32:06 2010
@@ -18,6 +18,8 @@
import junit.framework.TestCase;
+import org.apache.geronimo.kernel.util.SelectorUtils;
+
/**
* @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
*/
Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigStore.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigStore.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/mock/MockConfigStore.java Mon Jan 4 05:32:06 2010
@@ -16,18 +16,6 @@
*/
package org.apache.geronimo.kernel.mock;
-import org.apache.geronimo.kernel.Jsr77Naming;
-import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.config.ConfigurationData;
-import org.apache.geronimo.kernel.config.IOUtil;
-import org.apache.geronimo.kernel.config.InvalidConfigException;
-import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.config.NullConfigurationStore;
-import org.apache.geronimo.kernel.config.ConfigurationStore;
-import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
-
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -36,6 +24,18 @@
import java.util.Map;
import java.util.Set;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.config.NullConfigurationStore;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.IOUtils;
+
/**
* ???
*
@@ -87,7 +87,7 @@
if (file == null) {
throw new NoSuchConfigException(configId);
}
- return IOUtil.search(file, pattern);
+ return IOUtils.search(file, pattern);
}
public void installFake(Artifact configId, File file) {
Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java Mon Jan 4 05:32:06 2010
@@ -29,16 +29,14 @@
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.kernel.config.IOUtil;
import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.util.IOUtils;
import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.taskdefs.Tar;
import org.apache.tools.ant.taskdefs.Zip;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.types.ResourceCollection;
import org.apache.tools.ant.types.TarFileSet;
-import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.ZipFileSet;
/**
@@ -65,7 +63,7 @@
private void removeExcludes(File source, Map<String, File> all) {
Map<String, File> matches = new HashMap<String, File>();
for (String exclude : this.excludes) {
- IOUtil.find(source, exclude, matches);
+ IOUtils.find(source, exclude, matches);
}
for (String exclude : matches.keySet()) {
Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java Mon Jan 4 05:32:06 2010
@@ -47,7 +47,7 @@
import org.apache.geronimo.kernel.config.ConfigurationInfo;
import org.apache.geronimo.kernel.config.ConfigurationStore;
import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.util.IOUtils;
import org.apache.geronimo.kernel.config.InvalidConfigException;
import org.apache.geronimo.kernel.config.NoOConfigurationDataTransformer;
import org.apache.geronimo.kernel.config.NoSuchConfigException;
@@ -137,7 +137,7 @@
try {
configurationData = ConfigurationUtil.readConfigurationData(in);
} finally {
- IOUtil.close(in);
+ IOUtils.close(in);
}
} else {
JarFile jarFile = new JarFile(location);
@@ -147,8 +147,8 @@
in = jarFile.getInputStream(entry);
configurationData = ConfigurationUtil.readConfigurationData(in);
} finally {
- IOUtil.close(in);
- IOUtil.close(jarFile);
+ IOUtils.close(in);
+ IOUtils.close(jarFile);
}
}
} catch (ClassNotFoundException e) {
@@ -188,7 +188,7 @@
} catch (IOException e) {
return false;
} finally {
- IOUtil.close(jarFile);
+ IOUtils.close(jarFile);
}
}
}
@@ -249,15 +249,15 @@
if (moduleName != null) {
location = new File(location, moduleName);
}
- return IOUtil.search(location, path);
+ return IOUtils.search(location, path);
/* if(path == null) {
return Collections.singleton(location.toURL());
} else {
if (location.isDirectory()) {
- Set matches = IOUtil.search(location, path);
+ Set matches = IOUtils.search(location, path);
return matches;
} else {
- Set matches = IOUtil.search(location, path);
+ Set matches = IOUtils.search(location, path);
return matches;
}
}
@@ -265,7 +265,7 @@
if (moduleName != null) {
path = moduleName + "/" +path;
}
- return IOUtil.search(location, path);
+ return IOUtils.search(location, path);
}
}
@@ -359,7 +359,7 @@
repository.copyToRepository(source, configId, null);
} else if (source.isDirectory()) {
// directory is in wrong place -- directory copy
- IOUtil.recursiveCopy(source, destination);
+ IOUtils.recursiveCopy(source, destination);
} else {
throw new InvalidConfigException("Unable to install configuration from " + source);
}
@@ -382,7 +382,7 @@
// don't really care
}
File location = repository.getLocation(configId);
- IOUtil.recursiveDelete(location);
+ IOUtils.recursiveDelete(location);
// Number of directory levels up, to check and delete empty parent directories in the repo
int dirDepth = 0;
@@ -467,7 +467,7 @@
try {
configurationInfo = ConfigurationUtil.readConfigurationInfo(in, getAbstractName(), inPlaceLocation);
} finally {
- IOUtil.close(in);
+ IOUtils.close(in);
}
} else {
JarFile jarFile = new JarFile(location);
@@ -480,8 +480,8 @@
in = jarFile.getInputStream(entry);
configurationInfo = ConfigurationUtil.readConfigurationInfo(in, getAbstractName(), inPlaceLocation);
} finally {
- IOUtil.close(in);
- IOUtil.close(jarFile);
+ IOUtils.close(in);
+ IOUtils.close(jarFile);
}
}
Modified: geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java (original)
+++ geronimo/server/trunk/plugins/clustering/geronimo-deploy-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java Mon Jan 4 05:32:06 2010
@@ -26,7 +26,7 @@
import org.apache.geronimo.gbean.annotation.ParamReference;
import org.apache.geronimo.kernel.config.ConfigurationData;
import org.apache.geronimo.kernel.config.ConfigurationStore;
-import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.util.IOUtils;
import org.apache.geronimo.kernel.config.InvalidConfigException;
import org.apache.geronimo.kernel.config.NoSuchConfigException;
import org.apache.geronimo.kernel.repository.Artifact;
@@ -66,7 +66,7 @@
}
protected void deleteDir(File packedConfigurationDir) {
- IOUtil.recursiveDelete(packedConfigurationDir);
+ IOUtils.recursiveDelete(packedConfigurationDir);
}
protected DirectoryPackager newDirectoryPackager() {
Modified: geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java?rev=895566&r1=895565&r2=895566&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java (original)
+++ geronimo/server/trunk/plugins/hotdeploy/geronimo-hot-deploy/src/main/java/org/apache/geronimo/deployment/hot/DirectoryMonitor.java Mon Jan 4 05:32:06 2010
@@ -21,7 +21,7 @@
import org.apache.geronimo.deployment.cli.DeployUtils;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.util.IOUtils;
import java.io.File;
import java.io.Serializable;
@@ -184,7 +184,7 @@
File file = new File(path);
if(file.exists()) { // if not, probably it's deletion kicked off this whole process
log.info("Hot deployer deleting "+id);
- if(!IOUtil.recursiveDelete(file)) {
+ if(!IOUtils.recursiveDelete(file)) {
log.error("Hot deployer unable to delete "+path);
}
it.remove();