JBoss Deployer fails when uninstalling / reinstalling Service Assemblies
------------------------------------------------------------------------
Key: SM-552
URL: https://issues.apache.org/activemq/browse/SM-552
Project: ServiceMix
Issue Type: Bug
Affects Versions: 3.0-M2
Environment: JBoss 4.0.4 GA, ServiceMix 3.0-M2
Reporter: Frank Trietsch
Attachments: JBIService.java
Uninstallation / reinstallation of ServiceAssemblies fails with different
errors (KernelAlreadyExistsException, etc.). This is due to a buggy
JBIService.uninstallArchive() method.
Fixed with this patch (complete file attached):
RCS file:
/opt/cvs/cvsroot/OpenSource/jboss-deployer/src/java/org/servicemix/jboss/deployment/JBIService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -w -b -r1.1 -r1.2
22d21
< import java.util.Date;
34,36c33
< import org.apache.servicemix.jbi.deployment.Descriptor;
< import org.apache.servicemix.jbi.deployment.DescriptorFactory;
< import org.apache.servicemix.jbi.framework.AutoDeploymentService;
---
> import org.apache.servicemix.jbi.framework.AutoDeploymentService.ArchiveEntry;
56a54,55
> private Map<String, ArchiveEntry> archiveMap = new HashMap<String,
> ArchiveEntry>();
>
120c119,120
< jbiContainer.updateExternalArchive(archive);
---
> ArchiveEntry entry =
> jbiContainer.getAutoDeploymentService().updateExternalArchive(archive, true);
> archiveMap.put(archive, entry);
138,139c138,142
< jbiContainer.getAutoDeploymentService().removeArchive(
<
jbiContainer.getAutoDeploymentService().updateExternalArchive(archive,false));
---
> ArchiveEntry entry = archiveMap.get(archive);
> if (entry == null) {
> throw new DeploymentException("No service assembly " +
> archive + " registered!");
> }
> jbiContainer.getAutoDeploymentService().removeArchive(entry);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira