Author: objectiser
Date: 2009-11-24 09:46:40 -0500 (Tue, 24 Nov 2009)
New Revision: 312
Modified:
trunk/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeployer.java
Log:
RIFTSAW-117 - if the deployment unit being undeployed still exists, then check whether the
deployment unit has a more recent 'last modified time' than the cached deployment
unit for the same name (i.e. indicating it had been updated).
Modified:
trunk/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeployer.java
===================================================================
---
trunk/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeployer.java 2009-11-24
12:45:27 UTC (rev 311)
+++
trunk/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeployer.java 2009-11-24
14:46:40 UTC (rev 312)
@@ -120,8 +120,16 @@
du.getRelativePath());
try {
+ BPELDeploymentUnit prev=m_deploymentUnits.get(top.getSimpleName());
+
+ // Undeploy if deployment unit no longer exists on the filesystem, OR
+ // the last modified time of the cached deployment unit is older than
+ // the last modified time of the current deployment unit, signifying
+ // it has been updated and therefore must be undeployed first
if (top instanceof VFSDeploymentUnit &&
- ((VFSDeploymentUnit)top).getRoot().exists() == false) {
+ (((VFSDeploymentUnit)top).getRoot().exists() == false ||
+ (prev != null && prev.getLastModified() <
+ ((VFSDeploymentUnit)top).getRoot().getLastModified()))) {
// TODO: Unique name - see deploy
BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), 0);
Show replies by date