Author: objectiser
Date: 2010-07-06 07:35:18 -0400 (Tue, 06 Jul 2010)
New Revision: 837
Modified:
branches/RiftSaw-2.1.x/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeploymentUnit.java
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/apache/ode/store/RiftSawProcessStore.java
Log:
RIFTSAW-243 - fixed auto-increment of version number, so now uses the explicit version
number specified.
Modified:
branches/RiftSaw-2.1.x/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeploymentUnit.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeploymentUnit.java 2010-07-06
09:29:45 UTC (rev 836)
+++
branches/RiftSaw-2.1.x/runtime/deployer/src/main/java/org/jboss/soa/bpel/deployer/BPELDeploymentUnit.java 2010-07-06
11:35:18 UTC (rev 837)
@@ -36,6 +36,11 @@
public BPELDeploymentUnit(String name, long lastModified) {
m_name = name;
m_lastModified = lastModified;
+
+ // Remove any .jar suffix
+ if (m_name != null && m_name.endsWith(".jar")) {
+ m_name = m_name.substring(0, m_name.length()-4);
+ }
}
/**
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/apache/ode/store/RiftSawProcessStore.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/apache/ode/store/RiftSawProcessStore.java 2010-07-06
09:29:45 UTC (rev 836)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/apache/ode/store/RiftSawProcessStore.java 2010-07-06
11:35:18 UTC (rev 837)
@@ -73,7 +73,8 @@
public void undeploy(BPELDeploymentUnit bdu) {
__log.debug("Undeploy "+bdu);
- undeploy(bdu.getDeploymentDescriptor().getParentFile());
+
+ undeploy(bdu.getName());
}
/*
@@ -86,23 +87,7 @@
return(m_extensionValidators);
}
*/
-
- //
https://jira.jboss.org/browse/RIFTSAW-155
- protected void retirePreviousPackageVersions(DeploymentUnitDir du) {
- //retire all the other versions of the same DU
- // Riftsaw deployment units are slightly different
- String name = du.getName();
- name = name.replaceAll("-(\\d)+\\.jar",
"-(\\\\d)+\\\\.jar");
- Pattern duNamePattern = Pattern.compile(name);
- for (String deployedDUname : _deploymentUnits.keySet()) {
- Matcher matcher = duNamePattern.matcher(deployedDUname);
- if (matcher.matches()) {
- setRetiredPackage(deployedDUname, true);
- }
- }
- }
-
public class DeployScheduler extends Thread {
public DeployScheduler() {
@@ -160,6 +145,8 @@
__log.debug("Re-compiling:
"+bdu.getDeploymentDescriptor().getParentFile());
DeploymentUnitDir du=new
DeploymentUnitDir(bdu.getDeploymentDescriptor().getParentFile());
+
+ du.setName(bdu.getName());
// Create the DU and compile it before acquiring lock.
//du.setExtensionValidators(getExtensionValidators());
@@ -186,7 +173,7 @@
if (deploy) {
__log.debug("Deploy new version:
"+bdu.getDeploymentDescriptor().getParentFile());
- deploy(bdu.getDeploymentDescriptor().getParentFile());
+ deploy(bdu.getDeploymentDescriptor().getParentFile(), true, bdu.getName(), false);
} else {
__log.debug("Trigger Integration Layer to use existing version:
"+bdu.getDeploymentDescriptor().getParentFile());