Author: lhein
Date: Mon Dec 8 06:38:32 2008
New Revision: 724364
URL: http://svn.apache.org/viewvc?rev=724364&view=rev
Log:
changed to servicemix-utils-1.1.0-SNAPSHOT (needed for new helper methods in
FileUtil class used in servicemix-core)
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
servicemix/smx3/trunk/pom.xml
Modified:
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java?rev=724364&r1=724363&r2=724364&view=diff
==============================================================================
---
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
(original)
+++
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
Mon Dec 8 06:38:32 2008
@@ -16,7 +16,8 @@
*/
package org.apache.servicemix.jbi.framework;
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -51,8 +52,8 @@
import org.apache.servicemix.jbi.event.DeploymentListener;
import org.apache.servicemix.jbi.management.AttributeInfoHelper;
import org.apache.servicemix.jbi.management.BaseSystemService;
-import org.apache.servicemix.jbi.util.FileUtil;
import org.apache.servicemix.jbi.util.XmlPersistenceSupport;
+import org.apache.servicemix.util.FileUtil;
/**
* Monitors install and deploy directories to auto install/deploy archives
@@ -696,15 +697,7 @@
private boolean isAvailable(File file) {
// First check to see if the file is still growing
- long targetLength = file.length();
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- //Do nothing
- }
- long target2Length = file.length();
-
- if (targetLength != target2Length) {
+ if (!FileUtil.isFileFullyAvailable(file)) {
LOG.warn("File is still being copied, deployment deferred to next
cycle: " + file.getName());
return false;
}
Modified: servicemix/smx3/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/pom.xml?rev=724364&r1=724363&r2=724364&view=diff
==============================================================================
--- servicemix/smx3/trunk/pom.xml (original)
+++ servicemix/smx3/trunk/pom.xml Mon Dec 8 06:38:32 2008
@@ -49,7 +49,7 @@
</scm>
<properties>
- <servicemix-utils-version>1.0.0</servicemix-utils-version>
+ <servicemix-utils-version>1.1.0-SNAPSHOT</servicemix-utils-version>
<servicemix-specs-version>1.1.0</servicemix-specs-version>
<servicemix-common-version>2008.01</servicemix-common-version>
<servicemix-shared-version>2008.01</servicemix-shared-version>