Author: mriou
Date: Mon Sep 25 17:30:16 2006
New Revision: 449873
URL: http://svn.apache.org/viewvc?view=rev&rev=449873
Log:
Fixed undeployment for both file system and PM-API based deployment. Checked
that both work together nicely.
Modified:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentWebService.java
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentUnitImpl.java
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
Modified:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java?view=diff&rev=449873&r1=449872&r2=449873
==============================================================================
---
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
(original)
+++
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
Mon Sep 25 17:30:16 2006
@@ -142,6 +142,7 @@
if (!deployDir.exists()) {
_odeServer.getBpelServer().undeploy(deployDir);
+ m.delete();
}
}
Modified:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentWebService.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentWebService.java?view=diff&rev=449873&r1=449872&r2=449873
==============================================================================
---
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentWebService.java
(original)
+++
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentWebService.java
Mon Sep 25 17:30:16 2006
@@ -115,6 +115,9 @@
unzip(dest, (DataHandler) binaryNode.getDataHandler());
_service.deploy(dest);
+ File deployedMarker = new File(_deployPath,
namePart.getText() + ".deployed");
+ deployedMarker.createNewFile();
+
// Telling the poller what we deployed so that it
doesn't try to deploy it again
_poller.markAsDeployed(dest);
__log.info("Deployment of artifact " + dest.getName()
+ " successful.");
@@ -138,7 +141,11 @@
// files in there. The poller shouldn't pick them up
so we're asking
// it to hold on for a while.
_poller.hold();
+
boolean result = _service.undeploy(deploymentDir);
+ File deployedMarker = new File(_deployPath, elmtStr +
".deployed");
+ deployedMarker.delete();
+
OMElement response =
factory.createOMElement("response", depns);
response.setText("" + result);
sendResponse(factory, messageContext,
"undeployResponse", response);
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentUnitImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentUnitImpl.java?view=diff&rev=449873&r1=449872&r2=449873
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentUnitImpl.java
(original)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/deploy/DeploymentUnitImpl.java
Mon Sep 25 17:30:16 2006
@@ -193,6 +193,11 @@
return (int) (_name.hashCode() + _lastModified);
}
+ public boolean equals(Object obj) {
+ if (!(obj instanceof DeploymentUnitImpl)) return false;
+ return
((DeploymentUnitImpl)obj).getDeployDir().getAbsolutePath().equals(getDeployDir().getAbsolutePath());
+ }
+
public File getDeployDir() {
return _duDirectory;
}
@@ -255,9 +260,8 @@
return ret;
}
- public Set<QName> getProcessNames() {
-
- loadProcessDefinitions();
+ public Set<QName> getProcessNames() {
+ if (_processes == null) loadProcessDefinitions();
return _processes.keySet();
}
Modified:
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java?view=diff&rev=449873&r1=449872&r2=449873
==============================================================================
---
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
(original)
+++
incubator/ode/trunk/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelServerImpl.java
Mon Sep 25 17:30:16 2006
@@ -168,7 +168,7 @@
du = deploymentUnit;
}
if (du == null) {
- __log.warn("Couldn't deploy " + file.getName() + ", package
was not found.");
+ __log.warn("Couldn't undeploy " + file.getName() + ", package
was not found.");
return false;
}