Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0-M2
-
None
-
None
-
JBoss 4.0.4 GA, ServiceMix 3.0-M2
-
Patch Available
Description
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)
> jbiContainer.getAutoDeploymentService().removeArchive(entry);