Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-kernel/build.xml5
-rw-r--r--build-kernel/config/org.eclipse.virgo.kernel.userregion.properties1
-rw-r--r--build-kernel/kernel-ivy.xml3
-rw-r--r--build-kernel/lib/org.eclipse.virgo.kernel.launch.properties3
-rw-r--r--build-kernel/repository/ext/org.eclipse.virgo.kernel.userregion.springdm.plan6
-rw-r--r--build.properties2
-rw-r--r--build.versions14
-rw-r--r--org.eclipse.virgo.kernel.agent.dm/.classpath8
-rw-r--r--org.eclipse.virgo.kernel.agent.dm/ivy.xml2
-rw-r--r--org.eclipse.virgo.kernel.agent.dm/template.mf5
-rw-r--r--org.eclipse.virgo.kernel.artifact/.classpath14
-rw-r--r--org.eclipse.virgo.kernel.core/.classpath16
-rw-r--r--org.eclipse.virgo.kernel.core/ivy.xml2
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/AbortableSignal.java31
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BlockingAbortableSignal.java70
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BundleStarter.java12
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/BundleStartTracker.java47
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StandardBundleStarter.java30
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StartupTracker.java50
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/diagnostics/KernelLogEvents.java1
-rw-r--r--org.eclipse.virgo.kernel.core/src/main/resources/EventLogMessages.properties1
-rw-r--r--org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/config/internal/KernelConfigurationPropertiesSourceTests.java1
-rw-r--r--org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/core/internal/BundleStartTrackerTests.java61
-rw-r--r--org.eclipse.virgo.kernel.core/template.mf1
-rw-r--r--org.eclipse.virgo.kernel.deployer.dm/.classpath4
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/.classpath12
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/ParDeploymentTests.java6
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PipelinedDeployerIntegrationTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/RedeployRefreshTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/StubInstallArtifactLifecycleListener.java6
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/bug330506.parbin0 -> 1194 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties1
-rw-r--r--org.eclipse.virgo.kernel.deployer/.classpath24
-rw-r--r--org.eclipse.virgo.kernel.deployer/ivy.xml3
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java109
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeployerLogEvents.java1
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptions.java112
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunction.java (renamed from org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunction.java)83
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/ApplicationRecoverer.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/BlockingAbortableSignal.java74
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployer.java21
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/event/DeploymentListener.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLog.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogDeploymentListener.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/RecoveryAgent.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/hot/HotDeploymentFileSystemListener.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/management/StandardDeployer.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifact.java10
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListener.java8
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListenerSupport.java6
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactTreeInclosure.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifact.java58
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitor.java302
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifact.java15
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifactTreeFactory.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/LoggingInstallArtifactLifecycleListener.java7
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ParPlanInstallArtifactFactory.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/PlanInstallArtifactTreeFactory.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStateMonitor.java387
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosure.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardPlanInstallArtifact.java18
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java7
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriverBundleListener.java3
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleInstallArtifactFactory.java3
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java24
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java42
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/resources/EventLogMessages.properties1
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptionsTests.java1
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/StubInstallArtifactLifecycleListener.java15
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunctionTests.java229
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployerTests.java121
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunctionTests.java164
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogTests.java13
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerFileSystemListenerTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifactTests.java134
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitorTests.java4
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AtomicInstallArtifactLifecycleListenerTests.java11
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosureTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubAbortableSignal.java58
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubArtifactStateMonitor.java164
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java3
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.classpath86
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.project74
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.settings/com.springsource.server.ide.bundlor.core.prefs6
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.settings/org.eclipse.wst.common.project.facet.core.xml8
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.settings/org.springframework.ide.eclipse.beans.core.prefs6
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.springBeans28
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/build.xml16
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/ivy.xml80
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/ModuleBeanFactoryPostProcessor.java52
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBean.java116
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBeanPostProcessor.java62
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java138
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelAnnotationMBeanExporter.java78
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelExtensionConfiguringOsgiPostProcessor.java98
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java194
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelMBeanExporter.java80
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelModelMBean.java100
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/LoadTimeWeaverPostProcessor.java76
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/MBeanExporterPostProcessor.java122
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java126
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml78
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/template.mf42
-rw-r--r--org.eclipse.virgo.kernel.kerneldmfragment/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.model/.classpath8
-rw-r--r--org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/deployer/DeployerArtifact.java15
-rw-r--r--org.eclipse.virgo.kernel.osgi/.classpath24
-rw-r--r--org.eclipse.virgo.kernel.osgi/ivy.xml1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/resources/.gitignore0
-rw-r--r--org.eclipse.virgo.kernel.osgi/template.mf1
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java4
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/internal/commands/classloading/ClassLoadingCommandProviderTests.java2
-rw-r--r--org.eclipse.virgo.kernel.services/.classpath20
-rw-r--r--org.eclipse.virgo.kernel.shell/.classpath18
-rw-r--r--org.eclipse.virgo.kernel.shell/ivy.xml3
-rw-r--r--org.eclipse.virgo.kernel.shell/template.mf2
-rw-r--r--org.eclipse.virgo.kernel.smoketest/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.stubs/.classpath4
-rw-r--r--org.eclipse.virgo.kernel.stubs/src/main/java/org/eclipse/virgo/kernel/stubs/StubInstallArtifact.java10
-rw-r--r--org.eclipse.virgo.kernel.test/.classpath12
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java20
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java41
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/TestSignal.java17
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF24
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/META-INF/test.config.properties2
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties3
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/initial-artifact-plan/com.springsource.kernel.test.userregion.springdm.plan6
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/spring/context.xml11
-rw-r--r--org.eclipse.virgo.kernel.test/template.mf2
-rw-r--r--org.eclipse.virgo.kernel.userregion/.classpath22
-rw-r--r--org.eclipse.virgo.kernel.userregion/ivy.xml1
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployer.java2
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployerTests.java2
-rw-r--r--org.eclipse.virgo.kernel.userregion/template.mf1
140 files changed, 2867 insertions, 1777 deletions
diff --git a/build-kernel/build.xml b/build-kernel/build.xml
index bdf7b83a..784fcaa2 100644
--- a/build-kernel/build.xml
+++ b/build-kernel/build.xml
@@ -78,8 +78,8 @@
<filterset>
<filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
<filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
+ <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
<filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
- <filter token="FELIX.EVENTADMIN.VERSION" value="${org.apache.felix.eventadmin}"/>
<filter token="KERNEL.VERSION" value="${bundle.version}"/>
<filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
<filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
@@ -87,6 +87,7 @@
<filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
<filter token="SPRING.VERSION" value="${org.springframework}"/>
<filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
+ <filter token="OSGI.EXTENSIONS.VERSION" value="${org.eclipse.virgo.osgi}"/>
</filterset>
</copy>
@@ -95,8 +96,8 @@
<filterset>
<filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
<filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
+ <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
<filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
- <filter token="FELIX.EVENTADMIN.VERSION" value="${org.apache.felix.eventadmin}"/>
<filter token="KERNEL.VERSION" value="${bundle.version}"/>
<filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
<filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
diff --git a/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties b/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
index 00d5a34f..ec89d2fd 100644
--- a/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
@@ -33,6 +33,7 @@ packageImports =\
org.eclipse.osgi.*;version="0",\
javax.*;version="0",\
org.osgi.service.cm;version="0",\
+ org.osgi.service.log;version="0",\
org.osgi.service.event;version="0",\
org.slf4j;version="[1.6.1,2)",\
org.slf4j.spi;version="[1.6.1,2)"
diff --git a/build-kernel/kernel-ivy.xml b/build-kernel/kernel-ivy.xml
index 96a87564..4353289b 100644
--- a/build-kernel/kernel-ivy.xml
+++ b/build-kernel/kernel-ivy.xml
@@ -16,9 +16,10 @@
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgicommand" rev="latest.integration" conf="lib-kernel->runtime"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.userregionfactory" rev="latest.integration" conf="lib-kernel->runtime"/>
<dependency org="org.slf4j" name="com.springsource.slf4j.org.apache.commons.logging" rev="${org.slf4j}" conf="lib-kernel->runtime"/>
- <dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${org.aspectj}" conf="lib-kernel->runtime"/>
+ <dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${org.aspectj}" conf="lib-kernel->runtime"/>
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="lib-kernel->runtime"/>
<dependency org="org.eclipse.equinox" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="lib-kernel->runtime"/>
+ <dependency org="org.eclipse.virgo.osgi" name="org.eclipse.virgo.osgi.console" rev="${org.eclipse.virgo.osgi}" conf="lib-kernel->runtime"/>
<!-- repository-ext -->
diff --git a/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties b/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
index 150937a2..a72788ab 100644
--- a/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
+++ b/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
@@ -1,4 +1,5 @@
launcher.bundles =\
+ file:lib/kernel/org.eclipse.virgo.osgi.console-@OSGI.EXTENSIONS.VERSION@.jar,\
file:lib/kernel/com.springsource.slf4j.api-@SLF4J.VERSION@.jar@start,\
file:lib/kernel/com.springsource.slf4j.org.apache.commons.logging-@SLF4J.VERSION@.jar@start,\
file:lib/kernel/com.springsource.org.aspectj.weaver-@ASPECTJ.VERSION@.jar@start,\
@@ -7,7 +8,7 @@ launcher.bundles =\
file:lib/kernel/org.eclipse.equinox.cm-@EQUINOX.CONFIGADMIN.VERSION@.jar@start,\
file:lib/kernel/org.eclipse.virgo.medic.core-@MEDIC.VERSION@.jar@start,\
file:lib/kernel/org.eclipse.virgo.util.osgi-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.apache.felix.eventadmin-@FELIX.EVENTADMIN.VERSION@.jar@start,\
+ file:lib/kernel/equinox-event-@EQUINOX.EVENT.VERSION@.jar@start,\
file:lib/kernel/org.eclipse.virgo.util.common-@UTIL.VERSION@.jar@start,\
file:lib/kernel/org.eclipse.virgo.util.io-@UTIL.VERSION@.jar@start,\
file:lib/kernel/org.eclipse.virgo.util.jmx-@UTIL.VERSION@.jar,\
diff --git a/build-kernel/repository/ext/org.eclipse.virgo.kernel.userregion.springdm.plan b/build-kernel/repository/ext/org.eclipse.virgo.kernel.userregion.springdm.plan
index f9f9d9b3..0cb09f5b 100644
--- a/build-kernel/repository/ext/org.eclipse.virgo.kernel.userregion.springdm.plan
+++ b/build-kernel/repository/ext/org.eclipse.virgo.kernel.userregion.springdm.plan
@@ -1,4 +1,4 @@
-<plan name="org.eclipse.virgo.kernel.userregion.springdm" version="2.2.0" scoped="false" atomic="false"
+<plan name="org.eclipse.virgo.kernel.userregion.springdm" version="3.0.0" scoped="false" atomic="false"
xmlns="http://www.eclipse.org/virgo/schema/plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
@@ -8,6 +8,6 @@
<artifact type="bundle" name="org.springframework.osgi.core" version="[1.2.1, 1.3.0)"/>
<artifact type="bundle" name="org.springframework.osgi.extender" version="[1.2.1, 1.3.0)"/>
<artifact type="bundle" name="org.springframework.osgi.io" version="[1.2.1, 1.3.0)"/>
- <artifact type="bundle" name="org.eclipse.virgo.kernel.agent.dm" version="[2.1.0, 3.0)"/>
- <artifact type="bundle" name="org.eclipse.virgo.kernel.deployer.dm" version="[2.1.0, 3.0)"/>
+ <artifact type="bundle" name="org.eclipse.virgo.kernel.agent.dm" version="[3.0, 4.0)"/>
+ <artifact type="bundle" name="org.eclipse.virgo.kernel.deployer.dm" version="[3.0, 4.0)"/>
</plan>
diff --git a/build.properties b/build.properties
index 14f04b42..32ff8499 100644
--- a/build.properties
+++ b/build.properties
@@ -1,4 +1,4 @@
-version=2.2.0
+version=3.0.0
release.type=integration
javadoc.exclude.package.names=**/internal/**,**/internal
ivy.cache.dir=${basedir}/../ivy-cache
diff --git a/build.versions b/build.versions
index f20c2457..25219cce 100644
--- a/build.versions
+++ b/build.versions
@@ -1,13 +1,13 @@
# Compile
-org.apache.felix.eventadmin=1.0.0
org.eclipse.osgi.services=3.3.0.v20101018
+org.eclipse.equinox.event=1.2.100.v20101208
org.eclipse.equinox.cm=1.0.200.v20100520
org.aspectj=1.6.6.RELEASE
org.eclipse.osgi=3.7.0.v20101022
-org.eclipse.virgo.medic=2.2.0.D-20110113044904
-org.eclipse.virgo.osgi=2.2.0.D-20101207145732
-org.eclipse.virgo.repository=2.2.0.D-20110113045118
-org.eclipse.virgo.util=2.2.0.D-20101207150035
+org.eclipse.virgo.medic=3.0.0.D-20110201142122
+org.eclipse.virgo.osgi=3.0.0.D-20110201141222
+org.eclipse.virgo.repository=3.0.0.D-20110201142541
+org.eclipse.virgo.util=3.0.0.D-20110201141522
org.slf4j=1.6.1
org.slf4j.spi=1.6.1
org.springframework.osgi=1.2.1
@@ -28,7 +28,7 @@ javax.portlet=2.0.0
javax.servlet=2.5.0
javax.transaction=1.1.0
org.easymock=2.3.0
-org.eclipse.virgo.test=2.2.0.D-20110113044811
-org.eclipse.virgo.teststubs=2.2.0.D-20101207145338
+org.eclipse.virgo.test=3.0.0.D-20110201141918
+org.eclipse.virgo.teststubs=3.0.0.D-20110201140958
org.hsqldb=1.8.0.9
org.junit=4.7.0
diff --git a/org.eclipse.virgo.kernel.agent.dm/.classpath b/org.eclipse.virgo.kernel.agent.dm/.classpath
index d1af4a22..779ed358 100644
--- a/org.eclipse.virgo.kernel.agent.dm/.classpath
+++ b/org.eclipse.virgo.kernel.agent.dm/.classpath
@@ -22,7 +22,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
@@ -31,16 +31,16 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.core"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.agent.dm/ivy.xml b/org.eclipse.virgo.kernel.agent.dm/ivy.xml
index 52391a06..a3ec4729 100644
--- a/org.eclipse.virgo.kernel.agent.dm/ivy.xml
+++ b/org.eclipse.virgo.kernel.agent.dm/ivy.xml
@@ -21,6 +21,7 @@
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
<dependency org="org.eclipse.equinox" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="compile->runtime"/>
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer" rev="latest.integration" conf='compile->compile'/>
<dependency name='org.eclipse.virgo.util.io' rev='${org.eclipse.virgo.util}' org='org.eclipse.virgo.util' conf='compile->compile'/>
@@ -30,7 +31,6 @@
<dependency name='org.eclipse.virgo.medic' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='aspects, compile->runtime'/>
<dependency name='org.eclipse.virgo.medic.core' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='runtime->runtime'/>
<dependency name='org.eclipse.virgo.medic.test' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='test->runtime'/>
- <dependency name='org.apache.felix.eventadmin' rev='${org.apache.felix.eventadmin}' conf='compile->compile' org='org.apache.felix'/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->compile"/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->compile"/>
<override org="org.springframework" rev="${org.springframework}"/>
diff --git a/org.eclipse.virgo.kernel.agent.dm/template.mf b/org.eclipse.virgo.kernel.agent.dm/template.mf
index baa0fc15..8d276f22 100644
--- a/org.eclipse.virgo.kernel.agent.dm/template.mf
+++ b/org.eclipse.virgo.kernel.agent.dm/template.mf
@@ -10,8 +10,9 @@ Import-Template:
org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, =.+1)}",
org.aspectj.*;version="${org.aspectj:[=.=.=.=, +1)}",
- org.osgi.*;version="0",
org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}",
- org.springframework.osgi.*;version="${org.springframework.osgi:[=.=.=, +1)}"
+ org.springframework.osgi.*;version="${org.springframework.osgi:[=.=.=, +1)}",
+ org.osgi.*;version="0",
+ org.eclipse.osgi.*;version="0"
diff --git a/org.eclipse.virgo.kernel.artifact/.classpath b/org.eclipse.virgo.kernel.artifact/.classpath
index c3f64181..f236a19f 100644
--- a/org.eclipse.virgo.kernel.artifact/.classpath
+++ b/org.eclipse.virgo.kernel.artifact/.classpath
@@ -22,16 +22,16 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.0019103807.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-2.0019103807.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.core/.classpath b/org.eclipse.virgo.kernel.core/.classpath
index e03ab694..cda45556 100644
--- a/org.eclipse.virgo.kernel.core/.classpath
+++ b/org.eclipse.virgo.kernel.core/.classpath
@@ -24,27 +24,27 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-sources-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-sources-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry exported="true" kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.core/ivy.xml b/org.eclipse.virgo.kernel.core/ivy.xml
index 05a0a684..4047d45a 100644
--- a/org.eclipse.virgo.kernel.core/ivy.xml
+++ b/org.eclipse.virgo.kernel.core/ivy.xml
@@ -21,6 +21,7 @@
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
<dependency org="org.eclipse.equinox" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="compile->runtime"/>
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<dependency name='org.eclipse.virgo.util.io' rev='${org.eclipse.virgo.util}' org='org.eclipse.virgo.util' conf='compile->compile'/>
<dependency name='org.eclipse.virgo.util.jmx' rev='${org.eclipse.virgo.util}' org='org.eclipse.virgo.util' conf='aspects->runtime'/>
@@ -30,7 +31,6 @@
<dependency name='org.eclipse.virgo.medic' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='aspects, compile->runtime'/>
<dependency name='org.eclipse.virgo.medic.core' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='runtime->runtime'/>
<dependency name='org.eclipse.virgo.medic.test' rev='${org.eclipse.virgo.medic}' org='org.eclipse.virgo.medic' conf='test->runtime'/>
- <dependency name='org.apache.felix.eventadmin' rev='${org.apache.felix.eventadmin}' conf='compile->compile' org='org.apache.felix'/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->compile"/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->compile"/>
<override org="org.springframework" rev="${org.springframework}"/>
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/AbortableSignal.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/AbortableSignal.java
new file mode 100644
index 00000000..7519e5bd
--- /dev/null
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/AbortableSignal.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.core;
+
+/**
+ * {@link AbortableSignal} is an interface for signalling successful or unsuccessful completion.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Implementations of this class must be thread safe.
+ *
+ */
+public interface AbortableSignal extends Signal {
+
+ /**
+ * Notifies the abortion of this Signal, there has been no error but the signal will not complete.
+ * If signalFailure or signalCompletion has already been called, the behaviour is undefined.
+ */
+ void signalAborted();
+
+}
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BlockingAbortableSignal.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BlockingAbortableSignal.java
new file mode 100644
index 00000000..260ca0e1
--- /dev/null
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BlockingAbortableSignal.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.kernel.core;
+
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * <p>
+ * A <code>Signal</code> implementation that blocks until notified of completion or abortion.
+ * </p>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Thread-safe.
+ *
+ */
+public final class BlockingAbortableSignal implements AbortableSignal {
+
+ private volatile boolean aborted = false;
+
+ private final BlockingSignal blockingSignal;
+
+ public BlockingAbortableSignal() {
+ this.blockingSignal = new BlockingSignal();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalSuccessfulCompletion() {
+ this.blockingSignal.signalSuccessfulCompletion();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalFailure(final Throwable cause) {
+ this.blockingSignal.signalFailure(cause);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalAborted() {
+ this.aborted = true;
+ this.blockingSignal.signalSuccessfulCompletion();
+ }
+
+ public boolean isAborted(){
+ return this.aborted;
+ }
+
+ public boolean awaitCompletion(long period, TimeUnit timeUnit) throws FailureSignalledException {
+ boolean complete = this.blockingSignal.awaitCompletion(period, timeUnit);
+ if(aborted){
+ return false;
+ }
+ return complete;
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BundleStarter.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BundleStarter.java
index bce3ec9a..f02d90b8 100644
--- a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BundleStarter.java
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/BundleStarter.java
@@ -35,7 +35,7 @@ public interface BundleStarter {
* @param signal the <code>Signal</code> to drive.
* @throws BundleException if Bundle {@link Bundle#start()} fails
*/
- void start(Bundle bundle, Signal signal) throws BundleException;
+ void start(Bundle bundle, AbortableSignal signal) throws BundleException;
/**
* Starts the supplied {@link Bundle}, driving the supplied signal upon successful or unsuccessful completion
@@ -48,7 +48,13 @@ public interface BundleStarter {
* @param signal the <code>Signal</code> to drive.
* @throws BundleException
*/
- void start(Bundle bundle, int options, Signal signal) throws BundleException;
+ void start(Bundle bundle, int options, AbortableSignal signal) throws BundleException;
- void trackStart(Bundle bundle, Signal signal);
+ /**
+ * Apply tracking to the given <code>Bundle</code> using the given <code>Signal</code> but don't actually start it.
+ *
+ * @param bundle the <code>Bundle</code> to track.
+ * @param signal the <code>Signal</code> to be notified.
+ */
+ void trackStart(Bundle bundle, AbortableSignal signal);
}
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/BundleStartTracker.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/BundleStartTracker.java
index a20e51ee..0d3cac29 100644
--- a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/BundleStartTracker.java
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/BundleStartTracker.java
@@ -17,6 +17,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.BundleUtils;
import org.eclipse.virgo.kernel.core.Signal;
import org.osgi.framework.Bundle;
@@ -68,7 +69,7 @@ final class BundleStartTracker implements EventHandler {
private final Map<Bundle, Throwable> failureMap = new HashMap<Bundle, Throwable>();
- private final Map<Bundle, List<Signal>> signalMap = new HashMap<Bundle, List<Signal>>();
+ private final Map<Bundle, List<AbortableSignal>> signalMap = new HashMap<Bundle, List<AbortableSignal>>();
private final BundleListener bundleListener = new StartupTrackerBundleListener();
@@ -92,7 +93,7 @@ final class BundleStartTracker implements EventHandler {
private void driveSignalsIfStartCompleted(Bundle bundle, boolean springDmPowered) {
- List<Signal> signals = null;
+ List<AbortableSignal> signals = null;
Throwable failure = null;
boolean isActive = isBundleActive(bundle);
@@ -123,20 +124,22 @@ final class BundleStartTracker implements EventHandler {
if (signals != null) {
if (!springDmPowered && isActive) {
LOGGER.info("Non-Spring DM powered bundle '{}' has started. Driving signals '{}'.", bundle, signals);
- driveSignals(signals, null);
+ driveSignals(signals, false, null);
}
else {
- driveSignals(signals, failure);
+ driveSignals(signals, false, failure);
}
}
}
- private void driveSignals(final List<Signal> signals, final Throwable cause) {
+ private void driveSignals(final List<AbortableSignal> signals, final boolean aborted, final Throwable cause) {
this.signalExecutor.execute(new Runnable() {
public void run() {
- for (Signal signal : signals) {
+ for (AbortableSignal signal : signals) {
LOGGER.info("Driving signal '{}'", signal);
- if (cause == null) {
+ if (aborted){
+ signal.signalAborted();
+ } else if (cause == null) {
signal.signalSuccessfulCompletion();
} else {
signal.signalFailure(cause);
@@ -154,7 +157,7 @@ final class BundleStartTracker implements EventHandler {
LOGGER.info("Handling event '{}'", event);
Throwable cause = null;
- List<Signal> signals = null;
+ List<AbortableSignal> signals = null;
Bundle bundle = (Bundle) event.getProperty("bundle");
if (EVENT_FAILURE.equals(event.getTopic())) {
@@ -176,11 +179,11 @@ final class BundleStartTracker implements EventHandler {
}
if (signals != null) {
- driveSignals(signals, cause);
+ driveSignals(signals, false, cause);
}
}
- public void trackStart(Bundle bundle, Signal signal) {
+ public void trackStart(Bundle bundle, AbortableSignal signal) {
if (BundleUtils.isFragmentBundle(bundle)) {
throw new IllegalArgumentException("Cannot track the start of a fragment bundle.");
}
@@ -191,11 +194,11 @@ final class BundleStartTracker implements EventHandler {
if (signal != null) {
if (springDmPowered || !bundleActive) {
- List<Signal> queue;
+ List<AbortableSignal> queue;
synchronized (this.monitor) {
queue = this.signalMap.get(bundle);
if (queue == null) {
- queue = new ArrayList<Signal>();
+ queue = new ArrayList<AbortableSignal>();
this.signalMap.put(bundle, queue);
}
LOGGER.info("Adding signal '{}' for bundle '{}'", signal, bundle);
@@ -203,7 +206,7 @@ final class BundleStartTracker implements EventHandler {
}
} else {
// !springDmPowered && bundleActive
- driveSignals(Arrays.asList(signal), null);
+ driveSignals(Arrays.asList(signal), false, null);
}
}
driveSignalsIfStartCompleted(bundle, springDmPowered);
@@ -224,26 +227,32 @@ final class BundleStartTracker implements EventHandler {
private final class StartupTrackerBundleListener implements SynchronousBundleListener {
+ private Boolean isLazyBundle = false;
+
/**
* {@inheritDoc}
*/
public void bundleChanged(BundleEvent event) {
Bundle bundle = event.getBundle();
if (event.getType() == BundleEvent.STARTED) {
- List<Signal> signals = null;
+ List<AbortableSignal> signals = null;
if (!isSpringDmPoweredBundle(bundle)) {
synchronized (BundleStartTracker.this.monitor) {
signals = BundleStartTracker.this.signalMap.remove(bundle);
}
if (signals != null) {
LOGGER.info("Non-Spring DM powered bundle '{}' has started. Driving signals '{}'.", bundle, signals);
- driveSignals(signals, null);
+ driveSignals(signals, false, null);
}
}
}
+ if(event.getType() == BundleEvent.LAZY_ACTIVATION){
+ this.isLazyBundle = true;
+ LOGGER.info("Bundle '{}' has lazy activation and is in the starting state.", bundle);
+ }
if (event.getType() == BundleEvent.STOPPED) {
LOGGER.info("Bundle '{}' has stopped. Removing its related tracking state.", bundle);
- BundleStartTracker.this.cleanup(bundle, new RuntimeException("bundle stopped"));
+ BundleStartTracker.this.cleanup(bundle, this.isLazyBundle, this.isLazyBundle ? null : new RuntimeException("bundle stopped"));
}
}
}
@@ -253,8 +262,8 @@ final class BundleStartTracker implements EventHandler {
* @param bundle whose tracking state is removed
* @param cause reason for cleaning up
*/
- public void cleanup(Bundle bundle, Throwable cause) {
- List<Signal> danglingSignals = null;
+ public void cleanup(Bundle bundle, boolean aborted, Throwable cause) {
+ List<AbortableSignal> danglingSignals = null;
synchronized (BundleStartTracker.this.monitor) {
if (bundle != null) {
BundleStartTracker.this.bundlesWithCreatedApplicationContexts.remove(bundle);
@@ -263,7 +272,7 @@ final class BundleStartTracker implements EventHandler {
}
}
if (danglingSignals != null) {
- driveSignals(danglingSignals, cause);
+ driveSignals(danglingSignals, aborted, cause);
}
}
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StandardBundleStarter.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StandardBundleStarter.java
index 7eca0d0e..a354a9b9 100644
--- a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StandardBundleStarter.java
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StandardBundleStarter.java
@@ -11,9 +11,9 @@
package org.eclipse.virgo.kernel.core.internal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.BundleStarter;
import org.eclipse.virgo.kernel.core.BundleUtils;
-import org.eclipse.virgo.kernel.core.Signal;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
@@ -41,14 +41,14 @@ final class StandardBundleStarter implements BundleStarter {
/**
* {@inheritDoc}
*/
- public void start(Bundle bundle, Signal signal) throws BundleException {
+ public void start(Bundle bundle, AbortableSignal signal) throws BundleException {
start(bundle, DEFAULT_START_OPTIONS, signal);
}
/**
* {@inheritDoc}
*/
- public void start(Bundle bundle, int options, Signal signal) throws BundleException {
+ public void start(Bundle bundle, int options, AbortableSignal signal) throws BundleException {
trackStart(bundle, signal);
@@ -56,21 +56,16 @@ final class StandardBundleStarter implements BundleStarter {
try {
bundle.start(options);
} catch (BundleException be) {
- this.bundleStartTracker.cleanup(bundle, be);
+ this.bundleStartTracker.cleanup(bundle, false, be);
throw be;
}
}
}
- private static boolean bundleNeedsStarting(Bundle bundle) {
- if (bundle != null) {
- int bundleState = bundle.getState();
- return (bundleState != Bundle.STARTING && bundleState != Bundle.ACTIVE);
- }
- return false;
- }
-
- public void trackStart(Bundle bundle, Signal signal) {
+ /**
+ * {@inheritDoc}
+ */
+ public void trackStart(Bundle bundle, AbortableSignal signal) {
if (BundleUtils.isFragmentBundle(bundle)) {
throw new IllegalArgumentException("A fragment bundle cannot be started and so start cannot be tracked");
}
@@ -79,4 +74,13 @@ final class StandardBundleStarter implements BundleStarter {
this.bundleStartTracker.trackStart(bundle, signal);
}
}
+
+ private static boolean bundleNeedsStarting(Bundle bundle) {
+ if (bundle != null) {
+ int bundleState = bundle.getState();
+ return (bundleState != Bundle.STARTING && bundleState != Bundle.ACTIVE);
+ }
+ return false;
+ }
+
}
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StartupTracker.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StartupTracker.java
index 2e4acc36..9355c202 100644
--- a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StartupTracker.java
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/core/internal/StartupTracker.java
@@ -12,25 +12,16 @@
package org.eclipse.virgo.kernel.core.internal;
import java.lang.management.ManagementFactory;
-import java.util.concurrent.TimeUnit;
import java.util.Map;
+import java.util.concurrent.TimeUnit;
import javax.management.JMException;
import javax.management.MBeanServer;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.event.Event;
-import org.osgi.service.event.EventAdmin;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
import org.eclipse.virgo.kernel.config.internal.KernelConfiguration;
-import org.eclipse.virgo.kernel.core.BlockingSignal;
+import org.eclipse.virgo.kernel.core.BlockingAbortableSignal;
import org.eclipse.virgo.kernel.core.BundleUtils;
import org.eclipse.virgo.kernel.core.FailureSignalledException;
import org.eclipse.virgo.kernel.core.FatalKernelException;
@@ -38,6 +29,13 @@ import org.eclipse.virgo.kernel.core.Shutdown;
import org.eclipse.virgo.kernel.diagnostics.KernelLogEvents;
import org.eclipse.virgo.medic.dump.DumpGenerator;
import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* <code>StartupTracker</code> tracks the startup of the Kernel and produces event log entries, and
@@ -60,9 +58,11 @@ final class StartupTracker {
private static final String KERNEL_EVENT_STARTING = KERNEL_EVENT_TOPIC + "STARTING";
private static final String KERNEL_EVENT_STARTED = KERNEL_EVENT_TOPIC + "STARTED";
-
+
private static final String KERNEL_EVENT_START_TIMED_OUT = KERNEL_EVENT_TOPIC + "START_TIMED_OUT";
+ private static final String KERNEL_EVENT_START_ABORTED = KERNEL_EVENT_TOPIC + "START_ABORTED";
+
private static final String KERNEL_EVENT_START_FAILED = KERNEL_EVENT_TOPIC + "START_FAILED";
private static final String KERNEL_BSN_PREFIX = "org.eclipse.virgo.kernel";
@@ -154,21 +154,29 @@ final class StartupTracker {
long waitTime = TimeUnit.SECONDS.toMillis(this.startupWaitTime);
for (Bundle bundle : bundles) {
+
if (!BundleUtils.isFragmentBundle(bundle) && isKernelBundle(bundle)) {
- BlockingSignal signal = new BlockingSignal();
+ BlockingAbortableSignal signal = new BlockingAbortableSignal();
this.asyncBundleStartTracker.trackStart(bundle, signal);
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("Awaiting startup of bundle {} for up to {} milliseconds with signal {}.", new Object[]{bundle, waitTime, signal});
- }
+ LOGGER.debug("Awaiting startup of bundle {} for up to {} milliseconds with signal {}.", new Object[]{bundle, waitTime, signal});
long startTime = System.currentTimeMillis();
boolean bundleStarted = signal.awaitCompletion(waitTime, TimeUnit.MILLISECONDS);
waitTime -= System.currentTimeMillis() - startTime;
- if (!bundleStarted || waitTime <= 0) {
- kernelStartTimedOut();
+ if (!bundleStarted) {
+ if(signal.isAborted()){
+ LOGGER.error("Bundle {} aborted before the Kernel timeout of {} seconds with {} seconds remaining.", new Object[]{bundle, this.startupWaitTime, TimeUnit.MILLISECONDS.toSeconds(waitTime)});
+ kernelStartAborted(bundle);
+ } else if (waitTime <= 0) {
+ LOGGER.error("Kernel has failed to start before the timeout of {} seconds.", this.startupWaitTime);
+ kernelStartTimedOut();
+ } else {
+ LOGGER.error("Bundle {} did not start within the Kernel timeout of {} seconds.", bundle, this.startupWaitTime);
+ kernelStartTimedOut();
+ }
return;
}
}
@@ -223,6 +231,12 @@ final class StartupTracker {
logEvent(KernelLogEvents.KERNEL_STARTED);
}
+ private void kernelStartAborted(Bundle bundle) {
+ postEvent(KERNEL_EVENT_START_ABORTED);
+ logEvent(KernelLogEvents.KERNEL_EVENT_START_ABORTED, bundle.getSymbolicName(), bundle.getVersion());
+ generateDumpAndShutdown("startupTimedOut", null);
+ }
+
private void kernelStartTimedOut() {
postEvent(KERNEL_EVENT_START_TIMED_OUT);
logEvent(KernelLogEvents.KERNEL_START_TIMED_OUT, this.startupWaitTime);
diff --git a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/diagnostics/KernelLogEvents.java b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/diagnostics/KernelLogEvents.java
index e2d5088d..67b0fb62 100644
--- a/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/diagnostics/KernelLogEvents.java
+++ b/org.eclipse.virgo.kernel.core/src/main/java/org/eclipse/virgo/kernel/diagnostics/KernelLogEvents.java
@@ -29,6 +29,7 @@ public enum KernelLogEvents implements LogEvent {
KERNEL_START_FAILED(3, Level.ERROR), //
KERNEL_START_TIMED_OUT(4, Level.ERROR), //
KERNEL_PLAN_ARGUMENTS_INCORRECT(5, Level.WARNING), //
+ KERNEL_EVENT_START_ABORTED(6, Level.ERROR), //
SHUTDOWN_INITIATED(10, Level.INFO), //
IMMEDIATE_SHUTDOWN_INITIATED(11, Level.INFO), //
diff --git a/org.eclipse.virgo.kernel.core/src/main/resources/EventLogMessages.properties b/org.eclipse.virgo.kernel.core/src/main/resources/EventLogMessages.properties
index bac92102..3eec2038 100644
--- a/org.eclipse.virgo.kernel.core/src/main/resources/EventLogMessages.properties
+++ b/org.eclipse.virgo.kernel.core/src/main/resources/EventLogMessages.properties
@@ -3,6 +3,7 @@ KE0002I = Kernel started.
KE0003E = Kernel failed to start.
KE0004E = Kernel failed to start within {} seconds.
KE0005W = Option -plan requires one or two arguments but {} were provided: '{}'.
+KE0006E = Kernel failed to start due to the aborted start of '{}' version '{}'.
KE0010I = Shutdown initiated.
KE0011I = Immediate shutdown initiated.
diff --git a/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/config/internal/KernelConfigurationPropertiesSourceTests.java b/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/config/internal/KernelConfigurationPropertiesSourceTests.java
index 825b3d18..ed6e2dbb 100644
--- a/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/config/internal/KernelConfigurationPropertiesSourceTests.java
+++ b/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/config/internal/KernelConfigurationPropertiesSourceTests.java
@@ -14,7 +14,6 @@ package org.eclipse.virgo.kernel.config.internal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import java.io.IOException;
import java.util.Map;
import java.util.Properties;
diff --git a/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/core/internal/BundleStartTrackerTests.java b/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/core/internal/BundleStartTrackerTests.java
index 0398a61d..46b121cd 100644
--- a/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/core/internal/BundleStartTrackerTests.java
+++ b/org.eclipse.virgo.kernel.core/src/test/java/org/eclipse/virgo/kernel/core/internal/BundleStartTrackerTests.java
@@ -21,11 +21,13 @@ import java.util.List;
import org.junit.Test;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleException;
+import org.osgi.framework.BundleListener;
import org.osgi.service.event.Event;
import org.springframework.core.task.SyncTaskExecutor;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.internal.BundleStartTracker;
import org.eclipse.virgo.teststubs.osgi.framework.StubBundle;
import org.eclipse.virgo.teststubs.osgi.framework.StubBundleContext;
@@ -50,6 +52,7 @@ public class BundleStartTrackerTests {
bundle.start();
assertEquals(1, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
assertEquals(Bundle.ACTIVE, bundle.getState());
@@ -79,6 +82,38 @@ public class BundleStartTrackerTests {
bundleStartTracker.handleEvent(new Event("org/osgi/service/blueprint/container/CREATED", properties));
assertEquals(1, signal.successCount);
+ assertEquals(0, signal.abortCount);
+ assertEquals(0, signal.failures.size());
+ }
+
+ @Test
+ public void startOfLazyActivationBundle() throws BundleException {
+ StubBundleContext bundleContext = new StubBundleContext();
+ StubBundle bundle = new StubBundle();
+ bundle.addHeader("Bundle-ActivationPolicy", "lazy");
+ bundle.setBundleContext(bundleContext);
+
+ BundleStartTracker bundleStartTracker = new BundleStartTracker(new SyncTaskExecutor());
+ bundleStartTracker.initialize(bundleContext);
+
+ UnitTestSignal signal = new UnitTestSignal();
+ bundleStartTracker.trackStart(bundle, signal);
+
+ List<BundleListener> bundleListeners = bundleContext.getBundleListeners();
+ for(BundleListener listener : bundleListeners){
+ listener.bundleChanged(new BundleEvent(BundleEvent.LAZY_ACTIVATION, bundle));
+ }
+
+ assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
+ assertEquals(0, signal.failures.size());
+
+ for(BundleListener listener : bundleListeners){
+ listener.bundleChanged(new BundleEvent(BundleEvent.STOPPED, bundle));
+ }
+
+ assertEquals(0, signal.successCount);
+ assertEquals(1, signal.abortCount);
assertEquals(0, signal.failures.size());
}
@@ -96,6 +131,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
bundle.start();
@@ -108,6 +144,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.handleEvent(new Event("org/osgi/service/blueprint/container/FAILURE", properties));
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(1, signal.failures.size());
assertTrue(signal.failures.contains(failure));
@@ -132,6 +169,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(1, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
}
@@ -156,6 +194,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(1, signal.failures.size());
assertTrue(signal.failures.contains(failure));
}
@@ -174,6 +213,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
Dictionary<String, Object> properties = new Hashtable<String, Object>();
@@ -184,6 +224,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.handleEvent(new Event("org/osgi/service/blueprint/container/CREATED", properties));
assertEquals(1, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
}
@@ -201,6 +242,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
Dictionary<String, Object> properties = new Hashtable<String, Object>();
@@ -213,6 +255,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.handleEvent(new Event("org/osgi/service/blueprint/container/FAILURE", properties));
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(1, signal.failures.size());
assertTrue(signal.failures.contains(failure));
@@ -240,6 +283,7 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
}
@@ -266,14 +310,16 @@ public class BundleStartTrackerTests {
bundleStartTracker.trackStart(bundle, signal);
assertEquals(0, signal.successCount);
+ assertEquals(0, signal.abortCount);
assertEquals(0, signal.failures.size());
}
- private static final class UnitTestSignal implements Signal {
+ private static final class UnitTestSignal implements AbortableSignal {
private final List<Throwable> failures = new ArrayList<Throwable>();
-
+
private int successCount = 0;
+ private int abortCount = 0;
/**
* {@inheritDoc}
@@ -287,6 +333,13 @@ public class BundleStartTrackerTests {
*/
public void signalSuccessfulCompletion() {
successCount++;
- }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalAborted() {
+ abortCount++;
+ }
}
}
diff --git a/org.eclipse.virgo.kernel.core/template.mf b/org.eclipse.virgo.kernel.core/template.mf
index 30876aa9..1f0aeb29 100644
--- a/org.eclipse.virgo.kernel.core/template.mf
+++ b/org.eclipse.virgo.kernel.core/template.mf
@@ -14,6 +14,7 @@ Import-Template:
org.osgi.*;version="0",
org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}",
org.springframework.osgi.*;version="${org.springframework.osgi:[=.=.=, +1)}",
+ org.eclipse.osgi.*;version="0",
org.w3c.dom;version="0",
org.xml.sax;version="0"
Excluded-Exports:
diff --git a/org.eclipse.virgo.kernel.deployer.dm/.classpath b/org.eclipse.virgo.kernel.deployer.dm/.classpath
index 41256c26..54aa978c 100644
--- a/org.eclipse.virgo.kernel.deployer.dm/.classpath
+++ b/org.eclipse.virgo.kernel.deployer.dm/.classpath
@@ -32,12 +32,12 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.core"/>
diff --git a/org.eclipse.virgo.kernel.deployer.test/.classpath b/org.eclipse.virgo.kernel.deployer.test/.classpath
index 33a1f641..4d4a3281 100644
--- a/org.eclipse.virgo.kernel.deployer.test/.classpath
+++ b/org.eclipse.virgo.kernel.deployer.test/.classpath
@@ -28,16 +28,16 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.0.RELEASE/org.springframework.orm-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.0.RELEASE/org.springframework.orm-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.0.RELEASE/org.springframework.transaction-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.0.RELEASE/org.springframework.transaction-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/javax.transaction/com.springsource.javax.transaction/1.1.0/com.springsource.javax.transaction-1.1.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-2.2.0.D-20101207145732.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-sources-2.2.0.D-20101207145732.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/2.2.0.D-20110113044811/org.eclipse.virgo.test.framework-2.2.0.D-20110113044811.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/2.2.0.D-20110113044811/org.eclipse.virgo.test.framework-sources-2.2.0.D-20110113044811.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.launcher-3.0.0.D-20110201141222.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.launcher-sources-3.0.0.D-20110201141222.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.0.0.D-20110201141918/org.eclipse.virgo.test.framework-3.0.0.D-20110201141918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.0.0.D-20110201141918/org.eclipse.virgo.test.framework-sources-3.0.0.D-20110201141918.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.model"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/ParDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/ParDeploymentTests.java
index 82229325..078324d5 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/ParDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/ParDeploymentTests.java
@@ -34,6 +34,7 @@ public class ParDeploymentTests extends AbstractDeployerIntegrationTest {
private static final File PAR_FILE = new File("src/test/resources/BundlesAndConfig.par");
private static final File PAR_FOR_BUG331767 = new File("src/test/resources/bug331767.par");
+ private static final File PAR_FOR_BUG330506 = new File("src/test/resources/bug330506.par");
private static final String BUNDLE_SYMBOLIC_NAME = "appA-1-bundleA";
private static final String BUNDLE_SYMBOLIC_NAME_BUG331767 = "PARbug331767-1-BUNDLEbug331767";
@@ -65,6 +66,11 @@ public class ParDeploymentTests extends AbstractDeployerIntegrationTest {
this.deployer.undeploy(deploymentIdentity);
assertBundleNotPresent(BUNDLE_SYMBOLIC_NAME_BUG331767, BUNDLE_VERSION);
}
+
+ @Test(expected=DeploymentException.class)
+ public void deployParContainingFragmentOfSystemBundle() throws DeploymentException {
+ this.deployer.deploy(PAR_FOR_BUG330506.toURI());
+ }
private void assertBundlePresent(String symbolicName, Version version) {
Bundle[] bundles = this.context.getBundles();
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PipelinedDeployerIntegrationTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PipelinedDeployerIntegrationTests.java
index 8a0a6ac5..03de2e6f 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PipelinedDeployerIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PipelinedDeployerIntegrationTests.java
@@ -29,7 +29,7 @@ import org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListene
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.util.io.FileCopyUtils;
import org.eclipse.virgo.util.io.FileSystemUtils;
import org.eclipse.virgo.util.io.PathReference;
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/RedeployRefreshTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/RedeployRefreshTests.java
index 4c3399c8..bec672a5 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/RedeployRefreshTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/RedeployRefreshTests.java
@@ -23,7 +23,7 @@ import org.osgi.framework.ServiceReference;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.util.io.PathReference;
/**
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/StubInstallArtifactLifecycleListener.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/StubInstallArtifactLifecycleListener.java
index 9d33b135..4baefa8d 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/StubInstallArtifactLifecycleListener.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/StubInstallArtifactLifecycleListener.java
@@ -92,6 +92,12 @@ final class StubInstallArtifactLifecycleListener implements InstallArtifactLifec
/**
* {@inheritDoc}
*/
+ public void onStartAborted(InstallArtifact installArtifact) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void onStarted(InstallArtifact installArtifact) {
this.startedCount.incrementAndGet();
}
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
index b1282084..6dae07e2 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
@@ -7,7 +7,7 @@ launcher.bundles =\
file:../ivy-cache/repository/org.eclipse.equinox/org.eclipse.equinox.cm/${org.eclipse.equinox.cm}/org.eclipse.equinox.cm-${org.eclipse.equinox.cm}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/${org.eclipse.virgo.medic}/org.eclipse.virgo.medic.core-${org.eclipse.virgo.medic}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/${org.eclipse.virgo.util}/org.eclipse.virgo.util.osgi-${org.eclipse.virgo.util}.jar@start,\
- file:../ivy-cache/repository/org.apache.felix/org.apache.felix.eventadmin/${org.apache.felix.eventadmin}/org.apache.felix.eventadmin-${org.apache.felix.eventadmin}.jar@start,\
+ file:../ivy-cache/repository/org.eclipse/equinox-event/${org.eclipse.equinox.event}/equinox-event-${org.eclipse.equinox.event}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.common/${org.eclipse.virgo.util}/org.eclipse.virgo.util.common-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.io/${org.eclipse.virgo.util}/org.eclipse.virgo.util.io-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.jmx/${org.eclipse.virgo.util}/org.eclipse.virgo.util.jmx-${org.eclipse.virgo.util}.jar,\
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
index 4401dbb8..a2bfe2d6 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
@@ -7,7 +7,7 @@ launcher.bundles =\
file:../ivy-cache/repository/org.eclipse.equinox/org.eclipse.equinox.cm/${org.eclipse.equinox.cm}/org.eclipse.equinox.cm-${org.eclipse.equinox.cm}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/${org.eclipse.virgo.medic}/org.eclipse.virgo.medic.core-${org.eclipse.virgo.medic}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/${org.eclipse.virgo.util}/org.eclipse.virgo.util.osgi-${org.eclipse.virgo.util}.jar@start,\
- file:../ivy-cache/repository/org.apache.felix/org.apache.felix.eventadmin/${org.apache.felix.eventadmin}/org.apache.felix.eventadmin-${org.apache.felix.eventadmin}.jar@start,\
+ file:../ivy-cache/repository/org.eclipse/equinox-event/${org.eclipse.equinox.event}/equinox-event-${org.eclipse.equinox.event}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.common/${org.eclipse.virgo.util}/org.eclipse.virgo.util.common-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.io/${org.eclipse.virgo.util}/org.eclipse.virgo.util.io-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.jmx/${org.eclipse.virgo.util}/org.eclipse.virgo.util.jmx-${org.eclipse.virgo.util}.jar@start,\
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
index 4e0c2938..f5f2ac60 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
@@ -7,7 +7,7 @@ launcher.bundles =\
file:../ivy-cache/repository/org.eclipse.equinox/org.eclipse.equinox.cm/${org.eclipse.equinox.cm}/org.eclipse.equinox.cm-${org.eclipse.equinox.cm}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/${org.eclipse.virgo.medic}/org.eclipse.virgo.medic.core-${org.eclipse.virgo.medic}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/${org.eclipse.virgo.util}/org.eclipse.virgo.util.osgi-${org.eclipse.virgo.util}.jar@start,\
- file:../ivy-cache/repository/org.apache.felix/org.apache.felix.eventadmin/${org.apache.felix.eventadmin}/org.apache.felix.eventadmin-${org.apache.felix.eventadmin}.jar@start,\
+ file:../ivy-cache/repository/org.eclipse/equinox-event/${org.eclipse.equinox.event}/equinox-event-${org.eclipse.equinox.event}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.common/${org.eclipse.virgo.util}/org.eclipse.virgo.util.common-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.io/${org.eclipse.virgo.util}/org.eclipse.virgo.util.io-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.jmx/${org.eclipse.virgo.util}/org.eclipse.virgo.util.jmx-${org.eclipse.virgo.util}.jar,\
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/bug330506.par b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/bug330506.par
new file mode 100644
index 00000000..84cceab2
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/bug330506.par
Binary files differ
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
index 702be33b..054b32d2 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
@@ -51,6 +51,7 @@ packageImports =\
javax.*;version="0",\
org.osgi.service.cm;version="0",\
org.osgi.service.event;version="0",\
+ org.osgi.service.log;version="0",\
org.slf4j;version="[1.6.1,2)"
serviceImports =\
diff --git a/org.eclipse.virgo.kernel.deployer/.classpath b/org.eclipse.virgo.kernel.deployer/.classpath
index f79293a2..8144d532 100644
--- a/org.eclipse.virgo.kernel.deployer/.classpath
+++ b/org.eclipse.virgo.kernel.deployer/.classpath
@@ -24,35 +24,35 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.extensions.equinox-2.2.0.D-20101207145732.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.extensions.equinox-sources-2.2.0.D-20101207145732.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.extensions.equinox-3.0.0.D-20110201141222.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.extensions.equinox-sources-3.0.0.D-20110201141222.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/DEV_DIR/external-artifacts/non-spring-build/org.springframework.osgi/org.springframework.osgi.extender/1.2.1.RC1-SFW3/org.springframework.osgi.extender-sources.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-sources-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-sources-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer/ivy.xml b/org.eclipse.virgo.kernel.deployer/ivy.xml
index 83502659..43a9d4b5 100644
--- a/org.eclipse.virgo.kernel.deployer/ivy.xml
+++ b/org.eclipse.virgo.kernel.deployer/ivy.xml
@@ -22,6 +22,7 @@
<dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
@@ -30,8 +31,6 @@
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
<dependency org="org.eclipse.equinox" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="compile->runtime"/>
-
- <dependency name='org.apache.felix.eventadmin' rev='${org.apache.felix.eventadmin}' conf='compile->compile' org='org.apache.felix'/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->runtime"/>
<dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->runtime"/>
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java
index 29f25561..936433c7 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/ApplicationDeployer.java
@@ -28,115 +28,6 @@ import org.osgi.framework.Version;
public interface ApplicationDeployer {
/**
- * {@link DeploymentOptions} provides a collection of deployment options.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * This class is immutable and therefore thread safe.
- */
- public class DeploymentOptions {
-
- public static final DeploymentOptions DEFAULT_DEPLOYMENT_OPTIONS = new DeploymentOptions();
-
- private final boolean recoverable;
-
- private final boolean deployerOwned;
-
- private final boolean synchronous;
-
- /**
- * Create default deployment options.
- */
- public DeploymentOptions() {
- this.recoverable = true;
- this.deployerOwned = false;
- this.synchronous = true;
- }
-
- /**
- * Create deployment options with the given recoverability, ownership, and synchronisation.
- *
- * @param recoverable <code>true</code> if and only if the application is to persist across Server restarts
- * @param deployerOwned <code>true</code> if and only if the application at the location specified on deployment
- * is to be deleted when the application is undeployed
- * @param synchronous <code>true</code> if and only if the application should be deployed synchronously
- */
- public DeploymentOptions(boolean recoverable, boolean deployerOwned, boolean synchronous) {
- this.recoverable = recoverable;
- this.deployerOwned = deployerOwned;
- this.synchronous = synchronous;
- }
-
- /**
- * Get the recoverability option.
- *
- * @return <code>true</code> if and only if the application is to persist across Server restarts
- */
- public boolean getRecoverable() {
- return this.recoverable;
- }
-
- /**
- * Get the ownership option.
- *
- * @return <code>true</code> if and only if the application at the location specified on deployment is to be
- * deleted when the application is undeployed
- */
- public boolean getDeployerOwned() {
- return this.deployerOwned;
- }
-
- /**
- * Get the synchronisation option which is <code>true</code> if and only if the application should be deployed
- * synchronously.
- * <p/>
- * Deploying synchronously means that control does not return to the caller of the
- * {@link org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer#deploy(URI, DeploymentOptions) deploy}
- * method until any application contexts for the application have been built and published in the service
- * registry or deployment fails or times out.
- * <p/>
- * Deploying asynchronously means that control returns to the caller of the
- * {@link org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer#deploy(URI, DeploymentOptions) deploy}
- * method once the application has been started, but not necessarily before any application contexts have been
- * built and published.
- *
- * @return <code>true</code> if and only if the application should be deployed synchronously
- */
- public boolean getSynchronous() {
- return this.synchronous;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (deployerOwned ? 1231 : 1237);
- result = prime * result + (recoverable ? 1231 : 1237);
- result = prime * result + (synchronous ? 1231 : 1237);
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- DeploymentOptions other = (DeploymentOptions) obj;
- if (deployerOwned != other.deployerOwned)
- return false;
- if (recoverable != other.recoverable)
- return false;
- if (synchronous != other.synchronous)
- return false;
- return true;
- }
- }
-
- /**
* Deploys the artifact are the supplied <code>location</code>. The supplied <code>options</code> govern how the
* installed artifact is handled by the deployed, e.g. if it is recovered and re-installed upon warm restart.
*
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeployerLogEvents.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeployerLogEvents.java
index 230040c3..e5f21e36 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeployerLogEvents.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeployerLogEvents.java
@@ -69,6 +69,7 @@ public enum DeployerLogEvents implements LogEvent {
REFRESH_REQUEST_FAILED(505, Level.ERROR), //
UNDEPLOY_ARTEFACT_NOT_FOUND(506, Level.ERROR), //
REFRESH_ARTEFACT_NOT_FOUND(507, Level.ERROR), //
+ START_ABORTED(508, Level.INFO), //
JAR_UNPACK_ERROR(600, Level.ERROR), //
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptions.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptions.java
new file mode 100644
index 00000000..4f243dc8
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptions.java
@@ -0,0 +1,112 @@
+package org.eclipse.virgo.kernel.deployer.core;
+
+import java.net.URI;
+
+/**
+ * {@link DeploymentOptions} provides a collection of deployment options.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * This class is immutable and therefore thread safe.
+ */
+public class DeploymentOptions {
+
+ public static final DeploymentOptions DEFAULT_DEPLOYMENT_OPTIONS = new DeploymentOptions();
+
+ private final boolean recoverable;
+
+ private final boolean deployerOwned;
+
+ private final boolean synchronous;
+
+ /**
+ * Create default deployment options.
+ */
+ public DeploymentOptions() {
+ this.recoverable = true;
+ this.deployerOwned = false;
+ this.synchronous = true;
+ }
+
+ /**
+ * Create deployment options with the given recoverability, ownership, and synchronisation.
+ *
+ * @param recoverable <code>true</code> if and only if the application is to persist across Server restarts
+ * @param deployerOwned <code>true</code> if and only if the application at the location specified on deployment
+ * is to be deleted when the application is undeployed
+ * @param synchronous <code>true</code> if and only if the application should be deployed synchronously
+ */
+ public DeploymentOptions(boolean recoverable, boolean deployerOwned, boolean synchronous) {
+ this.recoverable = recoverable;
+ this.deployerOwned = deployerOwned;
+ this.synchronous = synchronous;
+ }
+
+ /**
+ * Get the recoverability option.
+ *
+ * @return <code>true</code> if and only if the application is to persist across Server restarts
+ */
+ public boolean getRecoverable() {
+ return this.recoverable;
+ }
+
+ /**
+ * Get the ownership option.
+ *
+ * @return <code>true</code> if and only if the application at the location specified on deployment is to be
+ * deleted when the application is undeployed
+ */
+ public boolean getDeployerOwned() {
+ return this.deployerOwned;
+ }
+
+ /**
+ * Get the synchronisation option which is <code>true</code> if and only if the application should be deployed
+ * synchronously.
+ * <p/>
+ * Deploying synchronously means that control does not return to the caller of the
+ * {@link org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer#deploy(URI, DeploymentOptions) deploy}
+ * method until any application contexts for the application have been built and published in the service
+ * registry or deployment fails or times out.
+ * <p/>
+ * Deploying asynchronously means that control returns to the caller of the
+ * {@link org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer#deploy(URI, DeploymentOptions) deploy}
+ * method once the application has been started, but not necessarily before any application contexts have been
+ * built and published.
+ *
+ * @return <code>true</code> if and only if the application should be deployed synchronously
+ */
+ public boolean getSynchronous() {
+ return this.synchronous;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (deployerOwned ? 1231 : 1237);
+ result = prime * result + (recoverable ? 1231 : 1237);
+ result = prime * result + (synchronous ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DeploymentOptions other = (DeploymentOptions) obj;
+ if (deployerOwned != other.deployerOwned)
+ return false;
+ if (recoverable != other.recoverable)
+ return false;
+ if (synchronous != other.synchronous)
+ return false;
+ return true;
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunction.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunction.java
index 2dbda4fc..d98c8960 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunction.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunction.java
@@ -18,13 +18,13 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * {@link SignalJunction} provides a collection of signals of a given size that join to drive a given signal. The given
+ * {@link AbortableSignalJunction} provides a collection of signals of a given size that join to drive a given signal. The given
* signal is driven for completion when any of the signals in the collection is driven for failure or all the signals in
* the collection are driven for successful completion. The given signal is driven at most once.
* <p />
@@ -34,27 +34,29 @@ import org.slf4j.LoggerFactory;
* This class is thread safe.
*
*/
-public final class SignalJunction {
+public final class AbortableSignalJunction {
- private static final Logger LOGGER = LoggerFactory.getLogger(SignalJunction.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(AbortableSignalJunction.class);
- private final Signal signal;
+ private final AbortableSignal signal;
- private final List<Signal> subSignals;
+ private final List<AbortableSignal> subSignals;
private final AtomicInteger incompleteCount;
-
+
private final AtomicBoolean failureSignalled = new AtomicBoolean(false);
+
+ private final AtomicBoolean abortionSignalled = new AtomicBoolean(false);
/**
- * Constructs a {@link SignalJunction} of the given size for the given signal.
+ * Constructs a {@link AbortableSignalJunction} of the given size for the given signal.
*
* @param signal the signal to be controlled
* @param size the number of signals in the collection
*/
- public SignalJunction(Signal signal, int size) {
+ public AbortableSignalJunction(AbortableSignal signal, int size) {
this.signal = signal;
- List<Signal> s = new ArrayList<Signal>();
+ List<AbortableSignal> s = new ArrayList<AbortableSignal>();
for (int i = 0; i < size; i++) {
s.add(new SubSignal());
}
@@ -72,54 +74,78 @@ public final class SignalJunction {
*
* @return an unmodifiable {@link Set} of signals in the collection
*/
- public List<Signal> getSignals() {
+ public List<AbortableSignal> getSignals() {
return this.subSignals;
}
-
+
+ public boolean failed() {
+ return this.failureSignalled.get();
+ }
+
+ public boolean aborted() {
+ return this.abortionSignalled.get();
+ }
+
private void subSignalFailed(Throwable cause) {
// Ensure the incomplete count is zero.
- int i = SignalJunction.this.incompleteCount.get();
+ int i = AbortableSignalJunction.this.incompleteCount.get();
LOGGER.debug("SubSignal failed. {} has {} incomplete signals", this, i);
- while (i > 0 && !SignalJunction.this.incompleteCount.compareAndSet(i, 0)) {
- i = SignalJunction.this.incompleteCount.get();
+ while (i > 0 && !AbortableSignalJunction.this.incompleteCount.compareAndSet(i, 0)) {
+ i = AbortableSignalJunction.this.incompleteCount.get();
}
// If this invocation took the count to zero, drive failure.
if (i > 0) {
- if (SignalJunction.this.signal != null) {
+ if (AbortableSignalJunction.this.signal != null) {
LOGGER.debug("{} signalling failure", this);
- SignalJunction.this.signal.signalFailure(cause);
+ AbortableSignalJunction.this.signal.signalFailure(cause);
this.failureSignalled.set(true);
}
}
}
-
- public boolean failed() {
- return this.failureSignalled.get();
+
+ private void subSignalAborted() {
+ // Ensure the incomplete count is zero.
+ int i = AbortableSignalJunction.this.incompleteCount.get();
+
+ LOGGER.debug("SubSignal aborted. {} has {} incomplete signals", this, i);
+
+ while (i > 0 && !AbortableSignalJunction.this.incompleteCount.compareAndSet(i, 0)) {
+ i = AbortableSignalJunction.this.incompleteCount.get();
+ }
+
+ // If this invocation took the count to zero, drive failure.
+ if (i > 0) {
+ if (AbortableSignalJunction.this.signal != null) {
+ LOGGER.debug("{} signalling aborted", this);
+ AbortableSignalJunction.this.signal.signalAborted();
+ this.abortionSignalled.set(true);
+ }
+ }
}
private void subSignalSucceeded() {
// Decrement the incomplete count.
- int incomplete = SignalJunction.this.incompleteCount.decrementAndGet();
+ int incomplete = AbortableSignalJunction.this.incompleteCount.decrementAndGet();
LOGGER.debug("SubSignal succeeded. {} now has {} incomplete signals", this, incomplete);
if (incomplete == 0) {
// If this invocation took the count to zero, drive successful completion.
- if (SignalJunction.this.signal != null) {
+ if (AbortableSignalJunction.this.signal != null) {
LOGGER.debug("{} has no incomplete signals. Signalling success", this);
- SignalJunction.this.signal.signalSuccessfulCompletion();
+ AbortableSignalJunction.this.signal.signalSuccessfulCompletion();
}
}
}
/**
- * {@link SubSignal} is a signal that reports completion to its {@link SignalJunction} once and only once.
+ * {@link SubSignal} is a signal that reports completion to its {@link AbortableSignalJunction} once and only once.
*
*/
- private class SubSignal implements Signal {
+ private class SubSignal implements AbortableSignal {
private final AtomicBoolean complete = new AtomicBoolean(false);
@@ -136,5 +162,12 @@ public final class SignalJunction {
subSignalSucceeded();
}
}
+
+ public void signalAborted() {
+ if (this.complete.compareAndSet(false, true)) {
+ LOGGER.debug("SubSignal {} signalling abortion", this);
+ subSignalAborted();
+ }
+ }
}
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/ApplicationRecoverer.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/ApplicationRecoverer.java
index ec0bea2b..22391c00 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/ApplicationRecoverer.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/ApplicationRecoverer.java
@@ -14,7 +14,7 @@ package org.eclipse.virgo.kernel.deployer.core.internal;
import java.net.URI;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
/**
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/BlockingAbortableSignal.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/BlockingAbortableSignal.java
new file mode 100644
index 00000000..2701883a
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/BlockingAbortableSignal.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.kernel.deployer.core.internal;
+
+import org.eclipse.virgo.kernel.core.AbortableSignal;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+
+
+/**
+ * <p>
+ * A <code>Signal</code> implementation that blocks until notified of completion or abortion.
+ * </p>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Thread-safe.
+ *
+ */
+public final class BlockingAbortableSignal implements AbortableSignal {
+
+ private final BlockingSignal blockingSignal;
+
+ private boolean aborted = false;
+
+ public BlockingAbortableSignal(boolean synchronous) {
+ this.blockingSignal = new BlockingSignal(synchronous);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalSuccessfulCompletion() {
+ this.blockingSignal.signalSuccessfulCompletion();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalFailure(Throwable cause) {
+ this.blockingSignal.signalFailure(cause);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalAborted() {
+ this.aborted = true;
+ }
+
+ public boolean isAborted(){
+ return this.aborted;
+ }
+
+ public boolean awaitCompletion(long timeInSeconds) throws DeploymentException {
+ return this.blockingSignal.awaitCompletion(timeInSeconds);
+ }
+
+ public boolean checkComplete() throws DeploymentException {
+ boolean complete = this.blockingSignal.checkComplete();
+ if(this.aborted){
+ return false;
+ }
+ return complete;
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployer.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployer.java
index 55440a4c..b3498220 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployer.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployer.java
@@ -28,6 +28,7 @@ import org.eclipse.virgo.kernel.deployer.core.DeployerConfiguration;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.internal.event.DeploymentListener;
import org.eclipse.virgo.kernel.deployer.model.DuplicateDeploymentIdentityException;
import org.eclipse.virgo.kernel.deployer.model.DuplicateFileNameException;
@@ -79,9 +80,14 @@ final class PipelinedApplicationDeployer implements ApplicationDeployer, Applica
private final int deployerConfiguredTimeoutInSeconds;
- public PipelinedApplicationDeployer(Pipeline pipeline, InstallArtifactTreeInclosure installArtifactTreeInclosure,
- InstallEnvironmentFactory installEnvironmentFactory, RuntimeArtifactModel ram, DeploymentListener deploymentListener,
- EventLogger eventLogger, DeployUriNormaliser normaliser, DeployerConfiguration deployerConfiguration) {
+ public PipelinedApplicationDeployer(Pipeline pipeline,
+ InstallArtifactTreeInclosure installArtifactTreeInclosure,
+ InstallEnvironmentFactory installEnvironmentFactory,
+ RuntimeArtifactModel ram,
+ DeploymentListener deploymentListener,
+ EventLogger eventLogger,
+ DeployUriNormaliser normaliser,
+ DeployerConfiguration deployerConfiguration) {
this.eventLogger = eventLogger;
this.installArtifactTreeInclosure = installArtifactTreeInclosure;
this.installEnvironmentFactory = installEnvironmentFactory;
@@ -283,13 +289,14 @@ final class PipelinedApplicationDeployer implements ApplicationDeployer, Applica
}
private void start(InstallArtifact installArtifact, boolean synchronous) throws DeploymentException {
- BlockingSignal blockingSignal = new BlockingSignal(synchronous);
+ BlockingAbortableSignal blockingSignal = new BlockingAbortableSignal(synchronous);
installArtifact.start(blockingSignal);
if (synchronous && this.deployerConfiguredTimeoutInSeconds > 0) {
boolean complete = blockingSignal.awaitCompletion(this.deployerConfiguredTimeoutInSeconds);
- if (!complete) {
- this.eventLogger.log(DeployerLogEvents.START_TIMED_OUT, installArtifact.getType(), installArtifact.getName(),
- installArtifact.getVersion(), this.deployerConfiguredTimeoutInSeconds);
+ if(blockingSignal.isAborted()){
+ this.eventLogger.log(DeployerLogEvents.START_ABORTED, installArtifact.getType(), installArtifact.getName(), installArtifact.getVersion(), this.deployerConfiguredTimeoutInSeconds);
+ } else if (!complete) {
+ this.eventLogger.log(DeployerLogEvents.START_TIMED_OUT, installArtifact.getType(), installArtifact.getName(), installArtifact.getVersion());
}
} else {
// Completion messages will have been issued if complete, so ignore return value.
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/event/DeploymentListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/event/DeploymentListener.java
index 38e4ca42..513bc0e0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/event/DeploymentListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/event/DeploymentListener.java
@@ -13,7 +13,7 @@ package org.eclipse.virgo.kernel.deployer.core.internal.event;
import java.net.URI;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLog.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLog.java
index 0135cc6b..cb6376ef 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLog.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLog.java
@@ -28,8 +28,8 @@ import java.util.Map.Entry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.FatalDeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
import org.eclipse.virgo.util.io.PathReference;
/**
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogDeploymentListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogDeploymentListener.java
index 048cce7c..b020d94b 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogDeploymentListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogDeploymentListener.java
@@ -13,7 +13,7 @@ package org.eclipse.virgo.kernel.deployer.core.internal.recovery;
import java.net.URI;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.internal.event.DeploymentListener;
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/RecoveryAgent.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/RecoveryAgent.java
index ebc5c641..7344db28 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/RecoveryAgent.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/RecoveryAgent.java
@@ -22,8 +22,8 @@ import org.osgi.service.event.EventHandler;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.FatalDeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.internal.ApplicationRecoverer;
import org.eclipse.virgo.medic.eventlog.EventLogger;
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/hot/HotDeploymentFileSystemListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/hot/HotDeploymentFileSystemListener.java
index 03c8299c..0df6f88b 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/hot/HotDeploymentFileSystemListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/hot/HotDeploymentFileSystemListener.java
@@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.FatalDeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
import org.eclipse.virgo.kernel.serviceability.NonNull;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.medic.eventlog.LogEvent;
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/management/StandardDeployer.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/management/StandardDeployer.java
index 54a1aa81..7492bd8e 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/management/StandardDeployer.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/deployer/management/StandardDeployer.java
@@ -20,7 +20,7 @@ import org.eclipse.virgo.kernel.deployer.Deployer;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
/**
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifact.java
index efd31909..543c533f 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifact.java
@@ -17,7 +17,7 @@ import org.osgi.framework.Version;
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.serviceability.NonNull;
import org.eclipse.virgo.util.common.Tree;
@@ -79,14 +79,14 @@ public interface InstallArtifact {
/**
* Starts this {@link InstallArtifact}. Returns before any asynchronous processing has necessarily completed.
* <p/>
- * Equivalent to calling {@link InstallArtifact#start(Signal) start(null)}.
+ * Equivalent to calling {@link InstallArtifact#start(AbortableSignal) start(null)}.
*
* @throws DeploymentException
*/
void start() throws DeploymentException;
/**
- * Starts this {@link InstallArtifact} and drives the given {@link Signal} when the start, including any
+ * Starts this {@link InstallArtifact} and drives the given {@link AbortableSignal} when the start, including any
* asynchronous processing, completes either successfully or unsuccessfully.
* <p/>
* If the start does not involve asynchronous processing, drives the given <code>Signal</code> before returning.
@@ -100,10 +100,10 @@ public interface InstallArtifact {
* Note: this method behaves as specified above when called multiple times on the same <code>InstallArtifact</code>
* with any combination of the same or distinct or <code>null</code> <code>Signals</code>.
*
- * @param signal a <code>Signal</code> that is ready to be driven or <code>null</code> if signalling is not required
+ * @param signal a <code>AbortableSignal</code> that is ready to be driven or <code>null</code> if signalling is not required
* @throws DeploymentException
*/
- void start(Signal signal) throws DeploymentException;
+ void start(AbortableSignal signal) throws DeploymentException;
/**
* Stops this {@link InstallArtifact}. If the <code>InstallArtifact</code> is already stopped, do nothing.
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListener.java
index 129a466a..eb49c9d7 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListener.java
@@ -111,6 +111,14 @@ public interface InstallArtifactLifecycleListener {
void onStartFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException;
/**
+ * Notification that the given {@link InstallArtifact} aborted while starting.
+ *
+ * @param installArtifact the <code>InstallArtifact</code> that aborted
+ * @throws DeploymentException if the listener failed to handle the event
+ */
+ void onStartAborted(InstallArtifact installArtifact) throws DeploymentException;
+
+ /**
* Notification that the given {@link InstallArtifact} has started.
*
* <p/>
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListenerSupport.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListenerSupport.java
index 52b1593d..cdb959e0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListenerSupport.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactLifecycleListenerSupport.java
@@ -70,6 +70,12 @@ public abstract class InstallArtifactLifecycleListenerSupport implements Install
/**
* {@inheritDoc}
*/
+ public void onStartAborted(InstallArtifact installArtifact) throws DeploymentException {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void onStarted(InstallArtifact installArtifact) throws DeploymentException {
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactTreeInclosure.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactTreeInclosure.java
index 4eb1314d..34aa7bdc 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactTreeInclosure.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/InstallArtifactTreeInclosure.java
@@ -16,7 +16,7 @@ import java.io.File;
import org.eclipse.virgo.kernel.artifact.ArtifactSpecification;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.util.common.Tree;
/**
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifact.java
index 1ee9d2f1..ffd7c9c1 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifact.java
@@ -18,6 +18,7 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.Signal;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
@@ -76,8 +77,7 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
* @param repositoryName the name of the source repository, or <code>null</code> if the artifact is not from a
* repository
*/
- protected AbstractInstallArtifact(@NonNull ArtifactIdentity identity, @NonNull ArtifactStorage artifactStorage,
- @NonNull ArtifactStateMonitor artifactStateMonitor, String repositoryName, EventLogger eventLogger) {
+ protected AbstractInstallArtifact(@NonNull ArtifactIdentity identity, @NonNull ArtifactStorage artifactStorage, @NonNull ArtifactStateMonitor artifactStateMonitor, String repositoryName, EventLogger eventLogger) {
this.identity = identity;
this.artifactStorage = artifactStorage;
this.artifactStateMonitor = artifactStateMonitor;
@@ -184,7 +184,7 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
/**
* {@inheritDoc}
*/
- public void start(Signal signal) throws DeploymentException {
+ public void start(AbortableSignal signal) throws DeploymentException {
// If ACTIVE, signal successful completion immediately, otherwise proceed with start processing.
if (getState().equals(State.ACTIVE)) {
if (signal != null) {
@@ -203,20 +203,20 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
}
}
- protected final void driveDoStart(Signal signal) throws DeploymentException {
- Signal stateMonitorSignal = createStateMonitorSignal(signal);
+ protected final void driveDoStart(AbortableSignal signal) throws DeploymentException {
+ AbortableSignal stateMonitorSignal = createStateMonitorSignal(signal);
doStart(stateMonitorSignal);
}
- protected Signal createStateMonitorSignal(Signal signal) {
- return new StateMonitorSignal(signal);
+ protected final AbortableSignal createStateMonitorSignal(AbortableSignal signal){
+ return new StateMonitorSignal(signal);
}
+
+ private final class StateMonitorSignal implements AbortableSignal {
- private final class StateMonitorSignal implements Signal {
+ private final AbortableSignal signal;
- private final Signal signal;
-
- public StateMonitorSignal(Signal signal) {
+ public StateMonitorSignal(AbortableSignal signal) {
this.signal = signal;
}
@@ -237,10 +237,6 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
*/
public void signalFailure(Throwable cause) {
asyncStartFailed(cause);
- handleFailure(cause);
- }
-
- private void handleFailure(Throwable cause) {
try {
stop();
} catch (DeploymentException de) {
@@ -249,6 +245,19 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
AbstractInstallArtifact.signalFailure(this.signal, cause);
}
+ /**
+ * {@inheritDoc}
+ */
+ public void signalAborted() {
+ asyncStartAborted();
+ try {
+ stop();
+ } catch (DeploymentException de) {
+ AbstractInstallArtifact.this.logger.error("Stop aborted", de);
+ }
+ AbstractInstallArtifact.signalAbortion(this.signal);
+ }
+
}
protected static void signalSuccessfulCompletion(Signal signal) {
@@ -263,6 +272,12 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
}
}
+ protected static void signalAbortion(AbortableSignal signal) {
+ if (signal != null) {
+ signal.signalAborted();
+ }
+ }
+
/**
* Perform the actual start of this {@link InstallArtifact} and drive the given {@link Signal} on successful or
* unsuccessful completion.
@@ -270,7 +285,7 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
* @param signal the <code>Signal</code> to be driven
* @throws DeploymentException if the start fails synchronously
*/
- protected abstract void doStart(Signal signal) throws DeploymentException;
+ protected abstract void doStart(AbortableSignal signal) throws DeploymentException;
private final void asyncStartSucceeded() throws DeploymentException {
pushThreadContext();
@@ -292,6 +307,17 @@ public abstract class AbstractInstallArtifact implements InstallArtifact {
}
}
+ private final void asyncStartAborted() {
+ pushThreadContext();
+ try {
+ this.artifactStateMonitor.onStartAborted(this);
+ } catch (DeploymentException e) {
+ logger.error(String.format("listener for %s threw DeploymentException", this), e);
+ } finally {
+ popThreadContext();
+ }
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitor.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitor.java
index 446fad91..84737ea0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitor.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitor.java
@@ -11,314 +11,58 @@
package org.eclipse.virgo.kernel.install.artifact.internal;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.install.artifact.ArtifactState;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
-import org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListener;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact.State;
-import org.osgi.framework.BundleContext;
-
-import org.eclipse.virgo.kernel.osgi.framework.OsgiFrameworkUtils;
-import org.eclipse.virgo.kernel.osgi.framework.OsgiServiceHolder;
/**
- * {@link ArtifactStateMonitor} logs {@link InstallArtifact} state changes and notifies
- * {@link InstallArtifactLifecycleListener InstallArtifactLifecycleListeners}.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
*
- * This class is thread safe.
+ * Implementations must be thread safe
*
*/
-public class ArtifactStateMonitor {
-
- private final BundleContext bundleContext;
-
- private final ArtifactState artifactState;
-
- private ArtifactStateMonitor(BundleContext bundleContext, ArtifactState artifactState) {
- this.bundleContext = bundleContext;
- this.artifactState = artifactState;
- }
-
- public ArtifactStateMonitor(BundleContext bundleContext) {
- this(bundleContext, new ArtifactState());
- }
+public interface ArtifactStateMonitor {
/**
* Returns the current state of the install artifact according to the events which have occurred.
*
- * @return the {@link State} of this {@link ArtifactStateMonitor}
+ * @return the {@link State} of this {@link StandardArtifactStateMonitor}
*/
- public State getState() {
- return this.artifactState.getState();
- }
-
- public void setState(State state) {
- switch (state) {
- case ACTIVE:
- this.artifactState.setActive();
- break;
- case INITIAL:
- this.artifactState.setInitial();
- break;
- case INSTALLED:
- this.artifactState.setInstalled();
- break;
- case INSTALLING:
- this.artifactState.setInstalling();
- break;
- case RESOLVED:
- this.artifactState.setResolved();
- break;
- case RESOLVING:
- this.artifactState.setResolving();
- break;
- case STARTING:
- this.artifactState.setStarting();
- break;
- case STOPPING:
- this.artifactState.setStopping();
- break;
- case UNINSTALLED:
- this.artifactState.setUninstalled();
- break;
- case UNINSTALLING:
- this.artifactState.setUninstalling();
- break;
- }
- }
-
- public void onInstalling(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setInstalling()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onInstalling(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public State getState();
- public void onInstallFailed(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setInitial()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onInstallFailed(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void setState(State state);
- public void onInstalled(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setInstalled()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onInstalled(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onInstalling(InstallArtifact installArtifact) throws DeploymentException;
- public void onResolving(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setResolving()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onResolving(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onInstallFailed(InstallArtifact installArtifact) throws DeploymentException;
- public void onResolveFailed(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setInstalled()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onResolveFailed(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onInstalled(InstallArtifact installArtifact) throws DeploymentException;
- public void onResolved(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setResolved()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onResolved(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onResolving(InstallArtifact installArtifact) throws DeploymentException;
- public boolean onStarting(InstallArtifact installArtifact) throws DeploymentException {
- boolean stateChanged = this.artifactState.setStarting();
- if (stateChanged) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStarting(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- return stateChanged;
- }
+ public void onResolveFailed(InstallArtifact installArtifact) throws DeploymentException;
- public void onStartFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStartFailed(installArtifact, cause);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
+ public void onResolved(InstallArtifact installArtifact) throws DeploymentException;
- public void onStarted(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setActive()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStarted(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public boolean onStarting(InstallArtifact installArtifact) throws DeploymentException;
- public void onStopping(InstallArtifact installArtifact) {
- if (this.artifactState.setStopping()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStopping(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStartFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException;
- public void onStopFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
- if (this.artifactState.setActive()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStopFailed(installArtifact, cause);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStartAborted(InstallArtifact installArtifact) throws DeploymentException;
- public void onStopped(InstallArtifact installArtifact) {
- if (this.artifactState.setResolved()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onStopped(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStarted(InstallArtifact installArtifact) throws DeploymentException;
- public void onUnresolved(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setInstalled()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onUnresolved(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
-
- public void onUninstalling(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setUninstalling()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onUninstalling(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStopping(InstallArtifact installArtifact);
- public void onUninstallFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
- if (this.artifactState.setResolved()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onUninstallFailed(installArtifact, cause);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStopFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException;
- public void onUninstalled(InstallArtifact installArtifact) throws DeploymentException {
- if (this.artifactState.setUninstalled()) {
- List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
- try {
- for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
- listener.onUninstalled(installArtifact);
- }
- } finally {
- ungetListeners(listenerHolders);
- }
- }
- }
+ public void onStopped(InstallArtifact installArtifact);
- private List<OsgiServiceHolder<InstallArtifactLifecycleListener>> getListenerHolders() {
- return OsgiFrameworkUtils.getServices(this.bundleContext, InstallArtifactLifecycleListener.class);
- }
+ public void onUnresolved(InstallArtifact installArtifact) throws DeploymentException;
- private List<InstallArtifactLifecycleListener> getListeners(List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders) {
- List<InstallArtifactLifecycleListener> listeners;
- listeners = new ArrayList<InstallArtifactLifecycleListener>(listenerHolders.size());
+ public void onUninstalling(InstallArtifact installArtifact) throws DeploymentException;
- for (OsgiServiceHolder<InstallArtifactLifecycleListener> listenerHolder : listenerHolders) {
- listeners.add(listenerHolder.getService());
- }
- return listeners;
- }
+ public void onUninstallFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException;
- private void ungetListeners(List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders) {
- for (OsgiServiceHolder<InstallArtifactLifecycleListener> listenerHolder : listenerHolders) {
- this.bundleContext.ungetService(listenerHolder.getServiceReference());
- }
- }
+ public void onUninstalled(InstallArtifact installArtifact) throws DeploymentException;
-}
+} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifact.java
index 9e92345e..f382de5d 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifact.java
@@ -12,7 +12,7 @@
package org.eclipse.virgo.kernel.install.artifact.internal;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
@@ -40,9 +40,14 @@ final class ConfigInstallArtifact extends AbstractInstallArtifact {
/**
* @throws DeploymentException
*/
- ConfigInstallArtifact(@NonNull ArtifactIdentity identity, @NonNull ArtifactStorage artifactStorage, @NonNull StartEngine startEngine,
- @NonNull RefreshEngine refreshEngine, @NonNull StopEngine stopEngine, @NonNull ArtifactStateMonitor artifactStateMonitor,
- String repositoryName, EventLogger eventLogger) throws DeploymentException {
+ ConfigInstallArtifact(@NonNull ArtifactIdentity identity,
+ @NonNull ArtifactStorage artifactStorage,
+ @NonNull StartEngine startEngine,
+ @NonNull RefreshEngine refreshEngine,
+ @NonNull StopEngine stopEngine,
+ @NonNull ArtifactStateMonitor artifactStateMonitor,
+ String repositoryName,
+ EventLogger eventLogger) throws DeploymentException {
super(identity, artifactStorage, artifactStateMonitor, repositoryName, eventLogger);
this.startEngine = startEngine;
@@ -78,7 +83,7 @@ final class ConfigInstallArtifact extends AbstractInstallArtifact {
* {@inheritDoc}
*/
@Override
- protected final void doStart(Signal signal) throws DeploymentException {
+ protected final void doStart(AbortableSignal signal) throws DeploymentException {
try {
this.startEngine.start(getIdentity(), getArtifactFS());
signalSuccessfulCompletion(signal);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifactTreeFactory.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifactTreeFactory.java
index 99d5d95f..dcea020d 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifactTreeFactory.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ConfigInstallArtifactTreeFactory.java
@@ -59,7 +59,7 @@ final class ConfigInstallArtifactTreeFactory implements InstallArtifactTreeFacto
public Tree<InstallArtifact> constructInstallArtifactTree(ArtifactIdentity artifactIdentity, ArtifactStorage artifactStorage,
Map<String, String> deploymentProperties, String repositoryName) throws DeploymentException {
if (PROPERTIES_TYPE.equalsIgnoreCase(artifactIdentity.getType())) {
- ArtifactStateMonitor artifactStateMonitor = new ArtifactStateMonitor(this.bundleContext);
+ ArtifactStateMonitor artifactStateMonitor = new StandardArtifactStateMonitor(this.bundleContext);
InstallArtifact configInstallArtifact = new ConfigInstallArtifact(artifactIdentity, artifactStorage, this.lifecycleEngine,
this.lifecycleEngine, this.lifecycleEngine, artifactStateMonitor, repositoryName, eventLogger);
return constructInstallTree(configInstallArtifact);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/LoggingInstallArtifactLifecycleListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/LoggingInstallArtifactLifecycleListener.java
index b2f24bd7..6048f3dc 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/LoggingInstallArtifactLifecycleListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/LoggingInstallArtifactLifecycleListener.java
@@ -87,6 +87,13 @@ final class LoggingInstallArtifactLifecycleListener implements InstallArtifactLi
/**
* {@inheritDoc}
*/
+ public void onStartAborted(InstallArtifact installArtifact) {
+ logEvent(DeployerLogEvents.START_ABORTED, installArtifact);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void onStarted(InstallArtifact installArtifact) {
logEvent(DeployerLogEvents.STARTED, installArtifact);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ParPlanInstallArtifactFactory.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ParPlanInstallArtifactFactory.java
index 947a1a5a..88ff847e 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ParPlanInstallArtifactFactory.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ParPlanInstallArtifactFactory.java
@@ -71,7 +71,7 @@ final class ParPlanInstallArtifactFactory {
}
ParPlanInstallArtifact createParPlanInstallArtifact(@NonNull ArtifactIdentity artifactIdentity, @NonNull ArtifactStorage artifactStorage, String repositoryName) throws DeploymentException {
- ArtifactStateMonitor artifactStateMonitor = new ArtifactStateMonitor(this.bundleContext);
+ ArtifactStateMonitor artifactStateMonitor = new StandardArtifactStateMonitor(this.bundleContext);
return new ParPlanInstallArtifact(artifactIdentity, artifactStorage, artifactStateMonitor, scopeServiceRepository, scopeFactory, eventLogger,
bundleInstallArtifactTreeFactory, refreshHandler, repositoryName, this.configInstallArtifactTreeFactory,
this.artifactStorageFactory, this.artifactIdentityDeterminer);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/PlanInstallArtifactTreeFactory.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/PlanInstallArtifactTreeFactory.java
index db8833df..d120b1f0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/PlanInstallArtifactTreeFactory.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/PlanInstallArtifactTreeFactory.java
@@ -120,7 +120,7 @@ final class PlanInstallArtifactTreeFactory implements InstallArtifactTreeFactory
StandardPlanInstallArtifact planInstallArtifact;
planInstallArtifact = new StandardPlanInstallArtifact(artifactIdentity, planDescriptor.getAtomic(), planDescriptor.getScoped(),
- artifactStorage, new ArtifactStateMonitor(this.bundleContext), this.scopeServiceRepository, this.scopeFactory,
+ artifactStorage, new StandardArtifactStateMonitor(this.bundleContext), this.scopeServiceRepository, this.scopeFactory,
this.eventLogger, this.refreshHandler, repositoryName, planDescriptor.getArtifactSpecifications());
Tree<InstallArtifact> tree = constructInstallTree(planInstallArtifact);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStateMonitor.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStateMonitor.java
new file mode 100644
index 00000000..b2eb797e
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStateMonitor.java
@@ -0,0 +1,387 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.install.artifact.ArtifactState;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListener;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact.State;
+import org.osgi.framework.BundleContext;
+
+import org.eclipse.virgo.kernel.osgi.framework.OsgiFrameworkUtils;
+import org.eclipse.virgo.kernel.osgi.framework.OsgiServiceHolder;
+
+/**
+ * {@link StandardArtifactStateMonitor} logs {@link InstallArtifact} state changes and notifies
+ * {@link InstallArtifactLifecycleListener InstallArtifactLifecycleListeners}.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * This class is thread safe.
+ *
+ */
+public class StandardArtifactStateMonitor implements ArtifactStateMonitor {
+
+ private final BundleContext bundleContext;
+
+ private final ArtifactState artifactState;
+
+ private StandardArtifactStateMonitor(BundleContext bundleContext, ArtifactState artifactState) {
+ this.bundleContext = bundleContext;
+ this.artifactState = artifactState;
+ }
+
+ public StandardArtifactStateMonitor(BundleContext bundleContext) {
+ this(bundleContext, new ArtifactState());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public State getState() {
+ return this.artifactState.getState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setState(State state) {
+ switch (state) {
+ case ACTIVE:
+ this.artifactState.setActive();
+ break;
+ case INITIAL:
+ this.artifactState.setInitial();
+ break;
+ case INSTALLED:
+ this.artifactState.setInstalled();
+ break;
+ case INSTALLING:
+ this.artifactState.setInstalling();
+ break;
+ case RESOLVED:
+ this.artifactState.setResolved();
+ break;
+ case RESOLVING:
+ this.artifactState.setResolving();
+ break;
+ case STARTING:
+ this.artifactState.setStarting();
+ break;
+ case STOPPING:
+ this.artifactState.setStopping();
+ break;
+ case UNINSTALLED:
+ this.artifactState.setUninstalled();
+ break;
+ case UNINSTALLING:
+ this.artifactState.setUninstalling();
+ break;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstalling(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setInstalling()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onInstalling(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstallFailed(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setInitial()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onInstallFailed(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstalled(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setInstalled()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onInstalled(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolving(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setResolving()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onResolving(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolveFailed(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setInstalled()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onResolveFailed(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolved(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setResolved()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onResolved(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean onStarting(InstallArtifact installArtifact) throws DeploymentException {
+ boolean stateChanged = this.artifactState.setStarting();
+ if (stateChanged) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStarting(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ return stateChanged;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStartFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStartFailed(installArtifact, cause);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStartAborted(InstallArtifact installArtifact) throws DeploymentException {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStartAborted(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStarted(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setActive()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStarted(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopping(InstallArtifact installArtifact) {
+ if (this.artifactState.setStopping()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStopping(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+ if (this.artifactState.setActive()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStopFailed(installArtifact, cause);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopped(InstallArtifact installArtifact) {
+ if (this.artifactState.setResolved()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onStopped(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUnresolved(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setInstalled()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onUnresolved(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstalling(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setUninstalling()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onUninstalling(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstallFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+ if (this.artifactState.setResolved()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onUninstallFailed(installArtifact, cause);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstalled(InstallArtifact installArtifact) throws DeploymentException {
+ if (this.artifactState.setUninstalled()) {
+ List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders = getListenerHolders();
+ try {
+ for (InstallArtifactLifecycleListener listener : getListeners(listenerHolders)) {
+ listener.onUninstalled(installArtifact);
+ }
+ } finally {
+ ungetListeners(listenerHolders);
+ }
+ }
+ }
+
+ private List<OsgiServiceHolder<InstallArtifactLifecycleListener>> getListenerHolders() {
+ return OsgiFrameworkUtils.getServices(this.bundleContext, InstallArtifactLifecycleListener.class);
+ }
+
+ private List<InstallArtifactLifecycleListener> getListeners(List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders) {
+ List<InstallArtifactLifecycleListener> listeners;
+ listeners = new ArrayList<InstallArtifactLifecycleListener>(listenerHolders.size());
+
+ for (OsgiServiceHolder<InstallArtifactLifecycleListener> listenerHolder : listenerHolders) {
+ listeners.add(listenerHolder.getService());
+ }
+ return listeners;
+ }
+
+ private void ungetListeners(List<OsgiServiceHolder<InstallArtifactLifecycleListener>> listenerHolders) {
+ for (OsgiServiceHolder<InstallArtifactLifecycleListener> listenerHolder : listenerHolders) {
+ this.bundleContext.ungetService(listenerHolder.getServiceReference());
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosure.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosure.java
index 814dbb07..99e8c9d2 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosure.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosure.java
@@ -26,7 +26,7 @@ import org.eclipse.virgo.kernel.osgi.framework.OsgiServiceHolder;
import org.eclipse.virgo.kernel.artifact.ArtifactSpecification;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentityDeterminer;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardPlanInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardPlanInstallArtifact.java
index aee0157f..e244a213 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardPlanInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardPlanInstallArtifact.java
@@ -14,15 +14,11 @@ package org.eclipse.virgo.kernel.install.artifact.internal;
import java.util.ArrayList;
import java.util.List;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
import org.eclipse.virgo.kernel.artifact.ArtifactSpecification;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.internal.SignalJunction;
+import org.eclipse.virgo.kernel.deployer.core.internal.AbortableSignalJunction;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
@@ -34,6 +30,8 @@ import org.eclipse.virgo.kernel.shim.scope.Scope;
import org.eclipse.virgo.kernel.shim.scope.ScopeFactory;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.util.common.Tree;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* {@link StandardPlanInstallArtifact} is the standard implementation of {@link PlanInstallArtifact}.
@@ -102,20 +100,20 @@ public class StandardPlanInstallArtifact extends AbstractInstallArtifact impleme
* {@inheritDoc}
*/
@Override
- protected final void doStart(Signal signal) throws DeploymentException {
+ protected final void doStart(AbortableSignal signal) throws DeploymentException {
List<Tree<InstallArtifact>> children = getChildrenSnapshot();
int numChildren = children.size();
// The SignalJunction constructor will drive the signal if numChildren == 0.
- SignalJunction signalJunction = new SignalJunction(signal, numChildren);
+ AbortableSignalJunction signalJunction = new AbortableSignalJunction(signal, numChildren);
LOGGER.debug("Created {} that will notify {} to track start of {}", new Object[] {signalJunction, signal, this});
- List<Signal> subSignals = signalJunction.getSignals();
+ List<AbortableSignal> subSignals = signalJunction.getSignals();
for (int childIndex = 0; childIndex < numChildren && !signalJunction.failed(); childIndex++) {
InstallArtifact childArtifact = children.get(childIndex).getValue();
- Signal subSignal = subSignals.get(childIndex);
+ AbortableSignal subSignal = subSignals.get(childIndex);
LOGGER.debug("Starting {} with signal {} from {}", new Object[] {childArtifact, subSignal, signalJunction});
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
index 8a669a19..3b87f8a0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
@@ -14,6 +14,7 @@ package org.eclipse.virgo.kernel.install.artifact.internal.bundle;
import org.osgi.framework.Bundle;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.Signal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.install.artifact.ArtifactState;
@@ -52,10 +53,10 @@ public interface BundleDriver {
* Note: this method behaves as specified above when called multiple times on the same <code>InstallArtifact</code>
* with any combination of the same or distinct or <code>null</code> <code>Signals</code>.
*
- * @param signal a <code>Signal</code> that is ready to be driven or <code>null</code> if no signalling is required
+ * @param signal an <code>AbortableSignal</code> that is ready to be driven or <code>null</code> if no signalling is required
* @throws DeploymentException
*/
- void start(Signal signal) throws DeploymentException;
+ void start(AbortableSignal signal) throws DeploymentException;
/**
* Updates the bundle associated with this {@link BundleDriver} using the given {@link BundleManifest} which
@@ -100,6 +101,6 @@ public interface BundleDriver {
*/
void popThreadContext();
- void trackStart(Signal signal);
+ void trackStart(AbortableSignal signal);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriverBundleListener.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriverBundleListener.java
index a2f599fa..675eb5a4 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriverBundleListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriverBundleListener.java
@@ -22,11 +22,12 @@ import org.slf4j.LoggerFactory;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
+import org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor;
import org.eclipse.virgo.kernel.serviceability.NonNull;
import org.eclipse.virgo.util.math.ConcurrentHashSet;
/**
- * {@link BundleDriverBundleListener} listens for bundle events and notifies the bundle's {@link ArtifactStateMonitor}.
+ * {@link BundleDriverBundleListener} listens for bundle events and notifies the bundle's {@link StandardArtifactStateMonitor}.
* <p />
*
* <strong>Concurrent Semantics</strong><br />
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleInstallArtifactFactory.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleInstallArtifactFactory.java
index 110d0dae..c1a1155a 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleInstallArtifactFactory.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleInstallArtifactFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentityDeterminer;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
import org.eclipse.virgo.kernel.install.artifact.BundleInstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
+import org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor;
import org.eclipse.virgo.kernel.install.artifact.internal.InstallArtifactRefreshHandler;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.util.io.IOUtils;
@@ -69,7 +70,7 @@ final class BundleInstallArtifactFactory {
BundleInstallArtifact createBundleInstallArtifact(ArtifactIdentity identity, ArtifactStorage artifactStorage, String repositoryName) throws DeploymentException {
- ArtifactStateMonitor artifactStateMonitor = new ArtifactStateMonitor(this.kernelBundleContext);
+ ArtifactStateMonitor artifactStateMonitor = new StandardArtifactStateMonitor(this.kernelBundleContext);
StandardBundleDriver bundleDriver = this.bundleDriverFactory.createBundleDriver(identity, artifactStateMonitor);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
index 2de961df..dfb5fe14 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
@@ -19,6 +19,7 @@ import org.osgi.framework.BundleListener;
import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
import org.eclipse.virgo.kernel.osgi.framework.PackageAdminUtil;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.BundleStarter;
import org.eclipse.virgo.kernel.core.BundleUtils;
import org.eclipse.virgo.kernel.core.KernelException;
@@ -140,7 +141,7 @@ final class StandardBundleDriver implements BundleDriver {
/**
* {@inheritDoc}
*/
- public void start(Signal signal) throws DeploymentException {
+ public void start(AbortableSignal signal) throws DeploymentException {
Bundle bundle = obtainLocalBundle();
if (!BundleUtils.isFragmentBundle(bundle)) {
@@ -162,7 +163,7 @@ final class StandardBundleDriver implements BundleDriver {
}
- private void startBundle(Bundle bundle, Signal signal) throws DeploymentException {
+ private void startBundle(Bundle bundle, AbortableSignal signal) throws DeploymentException {
this.bundleListener.addSolicitedStart(bundle);
try {
this.bundleStarter.start(bundle, signal);
@@ -200,23 +201,6 @@ final class StandardBundleDriver implements BundleDriver {
}
}
- public boolean asyncStart(Signal signal) {
- Bundle bundle = obtainLocalBundle();
-
- if (!BundleUtils.isFragmentBundle(bundle)) {
- pushThreadContext();
- try {
- this.bundleStarter.start(obtainLocalBundle(), signal);
- } catch (BundleException be) {
- // ignore - the bundle starter will have already notified the signal
- } finally {
- popThreadContext();
- }
- } else
- signalSuccessfulCompletion(signal);
- return true;
- }
-
private Bundle obtainLocalBundle() {
synchronized (this.monitor) {
if (this.bundle == null) {
@@ -302,7 +286,7 @@ final class StandardBundleDriver implements BundleDriver {
/**
* {@inheritDoc}
*/
- public void trackStart(Signal signal) {
+ public void trackStart(AbortableSignal signal) {
this.bundleStarter.trackStart(obtainLocalBundle(), signal);
}
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
index 263eb14f..1a57c902 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
@@ -23,17 +23,11 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.osgi.framework.Bundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.internal.BlockingSignal;
+import org.eclipse.virgo.kernel.deployer.core.internal.BlockingAbortableSignal;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentityDeterminer;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
@@ -44,6 +38,7 @@ import org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifac
import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
import org.eclipse.virgo.kernel.install.artifact.internal.InstallArtifactRefreshHandler;
import org.eclipse.virgo.kernel.install.artifact.internal.scoping.ArtifactIdentityScoper;
+import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
import org.eclipse.virgo.kernel.serviceability.NonNull;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.util.common.Tree;
@@ -53,6 +48,9 @@ import org.eclipse.virgo.util.osgi.manifest.BundleManifest;
import org.eclipse.virgo.util.osgi.manifest.BundleManifestFactory;
import org.eclipse.virgo.util.osgi.manifest.BundleSymbolicName;
import org.eclipse.virgo.util.osgi.manifest.ExportedPackage;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* {@link StandardBundleInstallArtifact} is the default implementation of {@link BundleInstallArtifact}.
@@ -68,6 +66,8 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private static final String MANIFEST_ENTRY_NAME = "/META-INF/MANIFEST.MF";
+
+ private static final String EQUINOX_SYSTEM_BUNDLE_NAME = "org.eclipse.osgi";
private static final long REFRESH_RESTART_WAIT_PERIOD = 60;
@@ -224,15 +224,31 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
* Track the start of the bundle.
*/
void trackStart() {
- Signal signal = createStateMonitorSignal(null);
+ AbortableSignal signal = createStateMonitorSignal(null);
this.bundleDriver.trackStart(signal);
}
+ @Override
+ public void beginInstall() throws DeploymentException {
+ if (isFragmentOnSystemBundle()) {
+ throw new DeploymentException("Deploying fragments of the system bundle is not supported");
+ }
+ super.beginInstall();
+ }
+
+ private boolean isFragmentOnSystemBundle() {
+ String fragmentHost = this.bundleManifest.getFragmentHost().getBundleSymbolicName();
+ if (fragmentHost != null) {
+ return fragmentHost.equals(EQUINOX_SYSTEM_BUNDLE_NAME);
+ }
+ return false;
+ }
+
/**
* {@inheritDoc}
*/
@Override
- public void start(Signal signal) throws DeploymentException {
+ public void start(AbortableSignal signal) throws DeploymentException {
/*
* Do not call super.start(signal) as it is essential that the starting event is driven under the bundle
* lifecycle event so the listeners see a suitable bundle state.
@@ -249,7 +265,7 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
* {@inheritDoc}
*/
@Override
- protected void doStart(Signal signal) throws DeploymentException {
+ protected void doStart(AbortableSignal signal) throws DeploymentException {
this.bundleDriver.start(signal);
}
@@ -316,7 +332,7 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
boolean refreshed = this.bundleDriver.update(bundleManifest);
if (refreshed) {
if (startRequired) {
- BlockingSignal blockingSignal = new BlockingSignal(true);
+ BlockingAbortableSignal blockingSignal = new BlockingAbortableSignal(true);
start(blockingSignal);
try {
refreshed = blockingSignal.checkComplete();
@@ -403,7 +419,7 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
private void startIfNecessary(boolean bundleStopped) throws DeploymentException {
if (bundleStopped) {
- BlockingSignal signal = new BlockingSignal(true);
+ BlockingAbortableSignal signal = new BlockingAbortableSignal(true);
start(signal);
signal.awaitCompletion(REFRESH_RESTART_WAIT_PERIOD);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/resources/EventLogMessages.properties b/org.eclipse.virgo.kernel.deployer/src/main/resources/EventLogMessages.properties
index aef753b1..cfde7036 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/resources/EventLogMessages.properties
+++ b/org.eclipse.virgo.kernel.deployer/src/main/resources/EventLogMessages.properties
@@ -43,6 +43,7 @@ DE0504I = Refresh of artifact '{}' of {} '{}' version '{}' completed.
DE0505E = Refresh of artifact '{}' of {} '{}' version '{}' failed.
DE0506E = Cannot undeploy {} '{}' version '{}'. Artifact not found.
DE0507E = Cannot refresh {} '{}' version '{}'. Artifact not found.
+DE0508I = Aborted start of {} '{}' version '{}'.
DE0600E = File '{}' cannot be unpacked as a JAR.
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptionsTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptionsTests.java
index f93d26a0..0883f37e 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptionsTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/DeploymentOptionsTests.java
@@ -13,7 +13,6 @@ package org.eclipse.virgo.kernel.deployer.core;
import static org.junit.Assert.assertEquals;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
import org.junit.Test;
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/StubInstallArtifactLifecycleListener.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/StubInstallArtifactLifecycleListener.java
index dd403d20..71574cf0 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/StubInstallArtifactLifecycleListener.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/StubInstallArtifactLifecycleListener.java
@@ -36,7 +36,9 @@ public final class StubInstallArtifactLifecycleListener implements InstallArtifa
private final AtomicInteger startingCount = new AtomicInteger();
private final AtomicInteger startFailedCount = new AtomicInteger();
-
+
+ private final AtomicInteger startAbortedCount = new AtomicInteger();
+
private final AtomicInteger startedCount = new AtomicInteger();
private final AtomicInteger stoppingCount = new AtomicInteger();
@@ -115,6 +117,10 @@ public final class StubInstallArtifactLifecycleListener implements InstallArtifa
assertEquals("Incorrect start failed count", startFailed, this.startFailedCount.get());
}
+ public void assertStartAbortedCount(int startAborted) {
+ assertEquals("Incorrect start abortion count", startAborted, this.startAbortedCount.get());
+ }
+
public void assertStartedCount(int started) {
assertEquals("Incorrect started count", started, this.startedCount.get());
}
@@ -206,6 +212,13 @@ public final class StubInstallArtifactLifecycleListener implements InstallArtifa
/**
* {@inheritDoc}
*/
+ public void onStartAborted(InstallArtifact installArtifact) {
+ this.startAbortedCount.incrementAndGet();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void onStarted(InstallArtifact installArtifact) {
this.startedCount.incrementAndGet();
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunctionTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunctionTests.java
new file mode 100644
index 00000000..e6751184
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/AbortableSignalJunctionTests.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.deployer.core.internal;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.virgo.kernel.core.AbortableSignal;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ */
+public class AbortableSignalJunctionTests {
+
+ private AbortableSignal signal;
+
+ private boolean signalCompleted;
+
+ private boolean signalFailed;
+
+ private boolean signalAborted;
+
+ @Before
+ public void setUp() {
+ this.signalCompleted = false;
+ this.signalFailed = false;
+
+ this.signal = new AbortableSignal(){
+
+ public void signalFailure(Throwable cause) {
+ signalFailed = true;
+ }
+
+ public void signalSuccessfulCompletion() {
+ signalCompleted = true;
+ }
+
+ public void signalAborted() {
+ signalAborted = true;
+ }
+
+ };
+ }
+
+ @Test
+ public void testEmptyJunction() {
+ new AbortableSignalJunction(this.signal, 0);
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testUnaryJunction() {
+ AbortableSignalJunction sj = new AbortableSignalJunction(this.signal, 1);
+ sj.getSignals().get(0).signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testBinaryJunction() {
+ AbortableSignalJunction sj = new AbortableSignalJunction(this.signal, 2);
+ sj.getSignals().get(0).signalSuccessfulCompletion();
+ sj.getSignals().get(1).signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testBinaryJunctionFail() {
+ AbortableSignalJunction sj = new AbortableSignalJunction(this.signal, 2);
+ sj.getSignals().get(0).signalFailure(new RuntimeException());
+ assertFalse(this.signalCompleted);
+ assertTrue(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testBinaryJunctionAbort() {
+ AbortableSignalJunction sj = new AbortableSignalJunction(this.signal, 2);
+ sj.getSignals().get(0).signalAborted();
+ assertFalse(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertTrue(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder1() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ top1.signalSuccessfulCompletion();
+ bottom1.signalSuccessfulCompletion();
+ bottom2.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder2() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ bottom1.signalSuccessfulCompletion();
+ top1.signalSuccessfulCompletion();
+ bottom2.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder3() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ bottom1.signalSuccessfulCompletion();
+ bottom2.signalSuccessfulCompletion();
+ top1.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder4() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ top1.signalSuccessfulCompletion();
+ bottom2.signalSuccessfulCompletion();
+ bottom1.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder5() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ bottom2.signalSuccessfulCompletion();
+ top1.signalSuccessfulCompletion();
+ bottom1.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrder6() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ bottom2.signalSuccessfulCompletion();
+ bottom1.signalSuccessfulCompletion();
+ top1.signalSuccessfulCompletion();
+ assertTrue(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrderFail() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ top1.signalSuccessfulCompletion();
+ bottom1.signalFailure(new RuntimeException());
+ bottom2.signalSuccessfulCompletion();
+ assertFalse(this.signalCompleted);
+ assertTrue(this.signalFailed);
+ assertFalse(this.signalAborted);
+ }
+
+ @Test
+ public void testNestedBinaryJunctionOrderAbort() {
+ AbortableSignalJunction top = new AbortableSignalJunction(this.signal, 2);
+ AbortableSignal top1 = top.getSignals().get(0);
+ AbortableSignal top2 = top.getSignals().get(1);
+ AbortableSignalJunction bottom = new AbortableSignalJunction(top2, 2);
+ AbortableSignal bottom1 = bottom.getSignals().get(0);
+ AbortableSignal bottom2 = bottom.getSignals().get(1);
+ top1.signalSuccessfulCompletion();
+ bottom1.signalAborted();
+ bottom2.signalSuccessfulCompletion();
+ assertFalse(this.signalCompleted);
+ assertFalse(this.signalFailed);
+ assertTrue(this.signalAborted);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployerTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployerTests.java
new file mode 100644
index 00000000..d2c3d23d
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/PipelinedApplicationDeployerTests.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.kernel.deployer.core.internal;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser;
+import org.eclipse.virgo.kernel.deployer.core.DeployerConfiguration;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.deployer.core.internal.event.DeploymentListener;
+import org.eclipse.virgo.kernel.deployer.model.RuntimeArtifactModel;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifactTreeInclosure;
+import org.eclipse.virgo.kernel.install.environment.InstallEnvironmentFactory;
+import org.eclipse.virgo.kernel.install.pipeline.Pipeline;
+import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+public class PipelinedApplicationDeployerTests {
+
+ private PipelinedApplicationDeployer pipelinedApplicationDeployer;
+ private Pipeline pipeline;
+ private InstallArtifactTreeInclosure installArtifactTreeInclosure;
+ private InstallEnvironmentFactory installEnvironmentFactory;
+ private RuntimeArtifactModel ram;
+ private DeploymentListener deploymentListener;
+ private EventLogger eventLogger;
+ private DeployUriNormaliser normaliser;
+ private DeployerConfiguration deployerConfiguration;
+ private InstallArtifact installArtifact;
+
+ @Before
+ public void setup() {
+ pipeline = createMock(Pipeline.class);
+ installArtifactTreeInclosure = createMock(InstallArtifactTreeInclosure.class);
+ installEnvironmentFactory = createMock(InstallEnvironmentFactory.class);
+ ram = createMock(RuntimeArtifactModel.class);
+ deploymentListener = createMock(DeploymentListener.class);
+ eventLogger = createNiceMock(EventLogger.class);
+ normaliser = createMock(DeployUriNormaliser.class);
+ deployerConfiguration = createMock(DeployerConfiguration.class);
+ installArtifact = createMock(InstallArtifact.class);
+
+ expect(this.deployerConfiguration.getDeploymentTimeoutSeconds()).andReturn(5);
+ }
+
+ @After
+ public void tearDown() {
+ resetMocks();
+ }
+
+ private void startTests() {
+ replay(this.pipeline, this.installArtifactTreeInclosure, this.installEnvironmentFactory, this.ram, this.deploymentListener, this.eventLogger, this.normaliser, this.deployerConfiguration, this.installArtifact);
+ this.pipelinedApplicationDeployer = new PipelinedApplicationDeployer(pipeline, installArtifactTreeInclosure, installEnvironmentFactory, ram, deploymentListener, eventLogger, normaliser, deployerConfiguration);
+ }
+
+ private void verifyMocks() {
+ verify(this.pipeline, this.installArtifactTreeInclosure, this.installEnvironmentFactory, this.ram, this.deploymentListener, this.eventLogger, this.normaliser, this.deployerConfiguration, this.installArtifact);
+ }
+
+ private void resetMocks() {
+ reset(this.pipeline, this.installArtifactTreeInclosure, this.installEnvironmentFactory, this.ram, this.deploymentListener, this.eventLogger, this.normaliser, this.deployerConfiguration, this.installArtifact);
+ }
+
+ @Test
+ public void testIsdeployedFalse() throws URISyntaxException, DeploymentException {
+ URI testURI = new URI("foo");
+ expect(this.normaliser.normalise(testURI)).andReturn(null);
+ this.startTests();
+ boolean result = this.pipelinedApplicationDeployer.isDeployed(testURI);
+ this.verifyMocks();
+ assertFalse(result);
+ }
+
+ @Test
+ public void testIsdeployedFalse2() throws URISyntaxException, DeploymentException {
+ URI testURI = new URI("foo");
+ expect(this.normaliser.normalise(testURI)).andReturn(testURI);
+ expect(this.ram.get(testURI)).andReturn(null);
+ this.startTests();
+ boolean result = this.pipelinedApplicationDeployer.isDeployed(testURI);
+ this.verifyMocks();
+ assertFalse(result);
+ }
+
+ @Test
+ public void testIsdeployedSucsess() throws URISyntaxException, DeploymentException {
+ URI testURI = new URI("foo");
+ expect(this.normaliser.normalise(testURI)).andReturn(testURI);
+ expect(this.ram.get(testURI)).andReturn(this.installArtifact);
+ this.startTests();
+ boolean result = this.pipelinedApplicationDeployer.isDeployed(testURI);
+ this.verifyMocks();
+ assertTrue(result);
+ }
+
+ @Test
+ public void testIsdeployedFail() throws URISyntaxException, DeploymentException {
+ URI testURI = new URI("foo");
+ expect(this.normaliser.normalise(testURI)).andThrow(new DeploymentException("fail"));
+ this.startTests();
+ boolean result = this.pipelinedApplicationDeployer.isDeployed(testURI);
+ this.verifyMocks();
+ assertFalse(result);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunctionTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunctionTests.java
deleted file mode 100644
index d8b3fd8e..00000000
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/SignalJunctionTests.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.deployer.core.internal;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.eclipse.virgo.kernel.core.Signal;
-import org.eclipse.virgo.kernel.deployer.core.internal.SignalJunction;
-import org.junit.Before;
-import org.junit.Test;
-
-
-/**
- */
-public class SignalJunctionTests {
-
- private Signal signal;
-
- private boolean signalCompleted;
-
- private boolean signalFailed;
-
- @Before
- public void setUp() {
- this.signalCompleted = false;
- this.signalFailed = false;
- this.signal = new Signal() {
-
- public void signalFailure(Throwable cause) {
- signalFailed = true;
- }
-
- public void signalSuccessfulCompletion() {
- signalCompleted = true;
- }
-
- };
- }
-
- @Test
- public void testEmptyJunction() {
- new SignalJunction(this.signal, 0);
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testUnaryJunction() {
- SignalJunction sj = new SignalJunction(this.signal, 1);
- sj.getSignals().get(0).signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testBinaryJunction() {
- SignalJunction sj = new SignalJunction(this.signal, 2);
- sj.getSignals().get(0).signalSuccessfulCompletion();
- sj.getSignals().get(1).signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder1() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- top1.signalSuccessfulCompletion();
- bottom1.signalSuccessfulCompletion();
- bottom2.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder2() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- bottom1.signalSuccessfulCompletion();
- top1.signalSuccessfulCompletion();
- bottom2.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder3() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- bottom1.signalSuccessfulCompletion();
- bottom2.signalSuccessfulCompletion();
- top1.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder4() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- top1.signalSuccessfulCompletion();
- bottom2.signalSuccessfulCompletion();
- bottom1.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder5() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- bottom2.signalSuccessfulCompletion();
- top1.signalSuccessfulCompletion();
- bottom1.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
- @Test
- public void testNestedBinaryJunctionOrder6() {
- SignalJunction top = new SignalJunction(this.signal, 2);
- Signal top1 = top.getSignals().get(0);
- Signal top2 = top.getSignals().get(1);
- SignalJunction bottom = new SignalJunction(top2, 2);
- Signal bottom1 = bottom.getSignals().get(0);
- Signal bottom2 = bottom.getSignals().get(1);
- bottom2.signalSuccessfulCompletion();
- bottom1.signalSuccessfulCompletion();
- top1.signalSuccessfulCompletion();
- assertTrue(this.signalCompleted);
- assertFalse(this.signalFailed);
- }
-
-}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogTests.java
index 5a61bbc3..a766fefc 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/core/internal/recovery/DeployerRecoveryLogTests.java
@@ -23,8 +23,7 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Test;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.internal.recovery.DeployerRecoveryLog;
import org.eclipse.virgo.util.io.PathReference;
@@ -50,17 +49,17 @@ public class DeployerRecoveryLogTests {
// all true
URI app1 = new File("app/one").toURI();
- log.add(app1, new ApplicationDeployer.DeploymentOptions(true, true, true));
+ log.add(app1, new DeploymentOptions(true, true, true));
// all false
URI app2 = new File("app/two").toURI();
- log.add(app2, new ApplicationDeployer.DeploymentOptions(false, false, false));
+ log.add(app2, new DeploymentOptions(false, false, false));
URI app3 = new File("app/three").toURI();
- log.add(app3, new ApplicationDeployer.DeploymentOptions(false, false, true));
+ log.add(app3, new DeploymentOptions(false, false, true));
URI app4 = new File("app/four").toURI();
- log.add(app4, new ApplicationDeployer.DeploymentOptions(false, true, true));
+ log.add(app4, new DeploymentOptions(false, true, true));
log = new DeployerRecoveryLog(deployArea);
@@ -100,7 +99,7 @@ public class DeployerRecoveryLogTests {
DeployerRecoveryLog log = new DeployerRecoveryLog(deployArea);
URI app1 = new File("app/one").toURI();
for (int i = 0; i < 100; i++) {
- log.add(app1, new ApplicationDeployer.DeploymentOptions(true, true, true));
+ log.add(app1, new DeploymentOptions(true, true, true));
if (i < 99) {
log.remove(app1);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerFileSystemListenerTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerFileSystemListenerTests.java
index d2617d58..9de4975f 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerFileSystemListenerTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerFileSystemListenerTests.java
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener;
import org.eclipse.virgo.medic.test.eventlog.MockEventLogger;
import org.eclipse.virgo.util.io.FileSystemEvent;
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerTests.java
index c655585b..bc6b5285 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/deployer/hot/HotDeployerTests.java
@@ -23,9 +23,9 @@ import java.net.URI;
import java.util.Map;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
import org.eclipse.virgo.kernel.deployer.core.DeployerConfiguration;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.medic.test.eventlog.MockEventLogger;
import org.eclipse.virgo.util.io.PathReference;
import org.junit.After;
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifactTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifactTests.java
index 0c4d992b..d2f879e5 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifactTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractInstallArtifactTests.java
@@ -13,24 +13,23 @@ package org.eclipse.virgo.kernel.install.artifact.internal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import java.net.URI;
import java.util.HashSet;
import java.util.Set;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
-
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
-import org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact.State;
import org.eclipse.virgo.medic.test.eventlog.MockEventLogger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.Version;
/**
*/
@@ -42,11 +41,14 @@ public class AbstractInstallArtifactTests {
private static final String PROPERTY_VALUE_2 = "value2";
- private TestInstallArtifact installArtifact;
+ private StubInstallArtifact installArtifact;
+
+ private StubArtifactStateMonitor artifactStateMonitor;
@Before
public void setUp() throws Exception {
- installArtifact = new TestInstallArtifact();
+ this.artifactStateMonitor = new StubArtifactStateMonitor();
+ this.installArtifact = new StubInstallArtifact(artifactStateMonitor);
}
@After
@@ -77,34 +79,126 @@ public class AbstractInstallArtifactTests {
assertEquals(PROPERTY_VALUE, this.installArtifact.setProperty(PROPERTY_NAME, PROPERTY_VALUE_2));
}
- public static final class TestInstallArtifact extends AbstractInstallArtifact {
+ @Test
+ public void testStart() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.RESOLVED);
+ this.installArtifact.start(new StubAbortableSignal());
+
+ assertEquals(0, this.installArtifact.doRefreshCount);
+ assertEquals(1, this.installArtifact.doStartCount);
+ assertEquals(0, this.installArtifact.doStopCount);
+ assertEquals(0, this.installArtifact.doUninstallCount);
+ }
+
+ @Test
+ public void testStartWhenAlreadyStarted() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.ACTIVE);
+ this.installArtifact.start(new StubAbortableSignal());
+
+ assertEquals(0, this.installArtifact.doRefreshCount);
+ assertEquals(0, this.installArtifact.doStartCount);
+ assertEquals(0, this.installArtifact.doStopCount);
+ assertEquals(0, this.installArtifact.doUninstallCount);
+ }
- public TestInstallArtifact() {
- super(new ArtifactIdentity("type", "name", Version.emptyVersion, null), new StubArtifactStorage(), null, null, new MockEventLogger());
+ @Test
+ public void testStop() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.ACTIVE);
+ this.installArtifact.stop();
+
+ assertEquals(0, this.installArtifact.doRefreshCount);
+ assertEquals(0, this.installArtifact.doStartCount);
+ assertEquals(1, this.installArtifact.doStopCount);
+ assertEquals(0, this.installArtifact.doUninstallCount);
+ }
+
+ @Test
+ public void testStopWhenNotStarted() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.INSTALLED);
+ this.installArtifact.stop();
+
+ assertEquals(0, this.installArtifact.doRefreshCount);
+ assertEquals(0, this.installArtifact.doStartCount);
+ assertEquals(0, this.installArtifact.doStopCount);
+ assertEquals(0, this.installArtifact.doUninstallCount);
+ }
+
+ @Test
+ public void testRefresh() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.ACTIVE);
+ assertTrue(this.installArtifact.refresh());
+
+ assertEquals(1, this.installArtifact.doRefreshCount);
+ assertEquals(0, this.installArtifact.doStartCount);
+ assertEquals(0, this.installArtifact.doStopCount);
+ assertEquals(0, this.installArtifact.doUninstallCount);
+ }
+
+ @Test
+ public void testUninstall() throws DeploymentException {
+ this.artifactStateMonitor.setState(State.ACTIVE);
+ this.installArtifact.uninstall();
+
+ assertEquals(0, this.installArtifact.doRefreshCount);
+ assertEquals(0, this.installArtifact.doStartCount);
+ assertEquals(1, this.installArtifact.doStopCount);
+ assertEquals(1, this.installArtifact.doUninstallCount);
+ }
+
+ private final class StubInstallArtifact extends AbstractInstallArtifact {
+
+ public StubInstallArtifact(ArtifactStateMonitor artifactStateMonitor) {
+ super(new ArtifactIdentity("type", "name", Version.emptyVersion, null), new StubArtifactStorage(), artifactStateMonitor, null, new MockEventLogger());
}
+ private int doStopCount = 0;
+
+ private int doStartCount = 0;
+
+ private int doUninstallCount = 0;
+
+ private int doRefreshCount = 0;
+
+ /**
+ * {@inheritDoc}
+ */
@Override
protected void doStop() throws DeploymentException {
- throw new UnsupportedOperationException();
+ this.doStopCount++;
}
+ /**
+ * {@inheritDoc}
+ */
@Override
protected void doUninstall() throws DeploymentException {
- throw new UnsupportedOperationException();
+ this.doUninstallCount++;
}
+ /**
+ * {@inheritDoc}
+ */
@Override
- protected void doStart(Signal signal) throws DeploymentException {
- throw new UnsupportedOperationException();
+ protected void doStart(AbortableSignal signal) throws DeploymentException {
+ this.doStartCount++;
}
+ /**
+ * {@inheritDoc}
+ */
@Override
protected boolean doRefresh() throws DeploymentException {
- return false;
+ this.doRefreshCount++;
+ return true;
}
- }
- private static class StubArtifactStorage implements ArtifactStorage {
+ }
+
+
+
+
+
+ static class StubArtifactStorage implements ArtifactStorage {
public void delete() {
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitorTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitorTests.java
index 189221d5..45cc52ef 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitorTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStateMonitorTests.java
@@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.StubInstallArtifactLifecycleListener;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListener;
-import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
+import org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor;
import org.eclipse.virgo.teststubs.osgi.framework.StubBundleContext;
/**
@@ -35,7 +35,7 @@ public class ArtifactStateMonitorTests {
@Before
public void setUp() {
this.bundleContext = new StubBundleContext();
- this.asm = new ArtifactStateMonitor(this.bundleContext);
+ this.asm = new StandardArtifactStateMonitor(this.bundleContext);
this.listener = new StubInstallArtifactLifecycleListener();
this.bundleContext.registerService(InstallArtifactLifecycleListener.class.getName(), this.listener, null);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AtomicInstallArtifactLifecycleListenerTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AtomicInstallArtifactLifecycleListenerTests.java
index cf4a2f6c..d0110f63 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AtomicInstallArtifactLifecycleListenerTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/AtomicInstallArtifactLifecycleListenerTests.java
@@ -18,19 +18,16 @@ import java.util.Arrays;
import java.util.List;
import java.util.Set;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
-
import org.eclipse.virgo.kernel.artifact.ArtifactSpecification;
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.PlanInstallArtifact;
-import org.eclipse.virgo.kernel.install.artifact.internal.AtomicInstallArtifactLifecycleListener;
import org.eclipse.virgo.util.common.ThreadSafeArrayListTree;
import org.eclipse.virgo.util.common.Tree;
+import org.junit.Test;
+import org.osgi.framework.Version;
public class AtomicInstallArtifactLifecycleListenerTests {
@@ -305,7 +302,7 @@ public class AtomicInstallArtifactLifecycleListenerTests {
start(null);
}
- public void start(Signal signal) throws DeploymentException {
+ public void start(AbortableSignal signal) throws DeploymentException {
this.startCalled = true;
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosureTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosureTests.java
index 42eb1459..d9db9601 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosureTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactTreeInclosureTests.java
@@ -38,7 +38,7 @@ import org.eclipse.virgo.kernel.artifact.ArtifactSpecification;
import org.eclipse.virgo.kernel.artifact.fs.StandardArtifactFSFactory;
import org.eclipse.virgo.kernel.core.BundleStarter;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.install.artifact.BundleInstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifactTreeFactory;
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubAbortableSignal.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubAbortableSignal.java
new file mode 100644
index 00000000..a1a86e0d
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubAbortableSignal.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.kernel.core.AbortableSignal;
+
+class StubAbortableSignal implements AbortableSignal {
+
+ private volatile boolean complete = false;
+
+ private volatile boolean aborted = false;
+
+ private volatile Throwable cause = null;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalSuccessfulCompletion() {
+ this.complete = true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalFailure(Throwable t) {
+ this.complete = true;
+ this.cause = t;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void signalAborted() {
+ this.complete = true;
+ this.aborted = true;
+ }
+
+ public boolean isComplete() {
+ return this.complete;
+ }
+
+ public boolean isAborted() {
+ return this.aborted;
+ }
+
+ public Throwable getCause() {
+ return this.cause;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubArtifactStateMonitor.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubArtifactStateMonitor.java
new file mode 100644
index 00000000..aeba2105
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StubArtifactStateMonitor.java
@@ -0,0 +1,164 @@
+/*
+ * This file is part of the Eclipse Virgo project.
+ *
+ * Copyright (c) 2011 copyright_holder
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * cgfrost - initial contribution
+ */
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact.State;
+
+/**
+ * TODO Document StubArtifactStateMonitor
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * TODO Document concurrent semantics of StubArtifactStateMonitor
+ */
+public class StubArtifactStateMonitor implements ArtifactStateMonitor {
+
+ private State myState = State.RESOLVED;
+
+ /**
+ * {@inheritDoc}
+ */
+ public State getState() {
+ return this.myState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setState(State state) {
+ this.myState = state;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstalling(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstallFailed(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onInstalled(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolving(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolveFailed(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onResolved(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean onStarting(InstallArtifact installArtifact) throws DeploymentException {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStartFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStartAborted(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStarted(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopping(InstallArtifact installArtifact) {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onStopped(InstallArtifact installArtifact) {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUnresolved(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstalling(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstallFailed(InstallArtifact installArtifact, Throwable cause) throws DeploymentException {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onUninstalled(InstallArtifact installArtifact) throws DeploymentException {
+
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
index 93021072..8716c3e9 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
@@ -39,6 +39,7 @@ import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
import org.eclipse.virgo.kernel.install.artifact.BundleInstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
+import org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor;
import org.eclipse.virgo.kernel.install.artifact.internal.StubInstallArtifactRefreshHandler;
import org.eclipse.virgo.kernel.install.artifact.internal.bundle.BundleDriver;
import org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact;
@@ -65,7 +66,7 @@ public class StandardBundleInstallArtifactTests {
private final BundleContext bundleContext = new StubBundleContext();
- private final ArtifactStateMonitor artifactStateMonitor = new ArtifactStateMonitor(this.bundleContext);
+ private final ArtifactStateMonitor artifactStateMonitor = new StandardArtifactStateMonitor(this.bundleContext);
private BundleInstallArtifact createInstallArtifact(ArtifactStorage artifactStorage, ArtifactStateMonitor artifactStateMonitor)
throws IOException {
diff --git a/org.eclipse.virgo.kernel.dmfragment/.classpath b/org.eclipse.virgo.kernel.dmfragment/.classpath
index e536174b..17fc3128 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.classpath
+++ b/org.eclipse.virgo.kernel.dmfragment/.classpath
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path="src/main/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/2.5.6/org.springframework.context-sources-2.5.6.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/2.5.6/org.springframework.beans-sources-2.5.6.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.aop/3.0.0.RELEASE/org.springframework.aop-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.aop/2.5.6/org.springframework.aop-2.5.6.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
- <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar">
- <attributes>
- <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.agent.dm"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/2.5.6/org.springframework.context-sources-2.5.6.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/2.5.6/org.springframework.beans-sources-2.5.6.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.aop/3.0.0.RELEASE/org.springframework.aop-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.aop/2.5.6/org.springframework.aop-2.5.6.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-sources-1.2.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-sources-1.2.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
+ <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar">
+ <attributes>
+ <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.agent.dm"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.virgo.kernel.dmfragment/.project b/org.eclipse.virgo.kernel.dmfragment/.project
index db961688..6b117569 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.project
+++ b/org.eclipse.virgo.kernel.dmfragment/.project
@@ -1,37 +1,37 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.kernel.dmfragment</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ajdt.core.ajbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.springsource.server.ide.bundlor.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.ajdt.ui.ajnature</nature>
- <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>com.springsource.server.dev.eclipse.serverdevelopmentnature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.dmfragment</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ajdt.core.ajbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.springsource.server.ide.bundlor.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.ajdt.ui.ajnature</nature>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.springsource.server.dev.eclipse.serverdevelopmentnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.kernel.dmfragment/.settings/com.springsource.server.ide.bundlor.core.prefs b/org.eclipse.virgo.kernel.dmfragment/.settings/com.springsource.server.ide.bundlor.core.prefs
index 61ee8a9b..d4dd06e4 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.settings/com.springsource.server.ide.bundlor.core.prefs
+++ b/org.eclipse.virgo.kernel.dmfragment/.settings/com.springsource.server.ide.bundlor.core.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 06 09:06:52 BST 2009
-com.springsource.server.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
-eclipse.preferences.version=1
+#Mon Jul 06 09:06:52 BST 2009
+com.springsource.server.ide.bundlor.core.template.properties.files=../build.properties;../build.versions
+eclipse.preferences.version=1
diff --git a/org.eclipse.virgo.kernel.dmfragment/.settings/org.eclipse.wst.common.project.facet.core.xml b/org.eclipse.virgo.kernel.dmfragment/.settings/org.eclipse.wst.common.project.facet.core.xml
index 801f856c..c9a337a6 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/org.eclipse.virgo.kernel.dmfragment/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <installed facet="com.springsource.server.bundle" version="1.0"/>
-</faceted-project>
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="com.springsource.server.bundle" version="1.0"/>
+</faceted-project>
diff --git a/org.eclipse.virgo.kernel.dmfragment/.settings/org.springframework.ide.eclipse.beans.core.prefs b/org.eclipse.virgo.kernel.dmfragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
index e68da314..b8bf5a67 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
+++ b/org.eclipse.virgo.kernel.dmfragment/.settings/org.springframework.ide.eclipse.beans.core.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 06 16:49:15 BST 2009
-eclipse.preferences.version=1
-org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
+#Mon Jul 06 16:49:15 BST 2009
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
diff --git a/org.eclipse.virgo.kernel.dmfragment/.springBeans b/org.eclipse.virgo.kernel.dmfragment/.springBeans
index a151801d..9b08bae9 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.springBeans
+++ b/org.eclipse.virgo.kernel.dmfragment/.springBeans
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beansProjectDescription>
- <version>1</version>
- <pluginVersion><![CDATA[2.2.5.200906231226-RC1]]></pluginVersion>
- <configSuffixes>
- <configSuffix><![CDATA[xml]]></configSuffix>
- </configSuffixes>
- <enableImports><![CDATA[false]]></enableImports>
- <configs>
- <config>src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml</config>
- </configs>
- <configSets>
- </configSets>
-</beansProjectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.2.5.200906231226-RC1]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ <config>src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml</config>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
diff --git a/org.eclipse.virgo.kernel.dmfragment/build.xml b/org.eclipse.virgo.kernel.dmfragment/build.xml
index 70d6c23f..7ee9d516 100644
--- a/org.eclipse.virgo.kernel.dmfragment/build.xml
+++ b/org.eclipse.virgo.kernel.dmfragment/build.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.virgo.kernel.dmfragment">
-
- <property file="${basedir}/../build.properties"/>
- <property file="${basedir}/../build.versions"/>
- <import file="${basedir}/../virgo-build/weaving/default.xml"/>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.virgo.kernel.dmfragment">
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/weaving/default.xml"/>
+
+</project>
diff --git a/org.eclipse.virgo.kernel.dmfragment/ivy.xml b/org.eclipse.virgo.kernel.dmfragment/ivy.xml
index 670982dc..7c5cab03 100644
--- a/org.eclipse.virgo.kernel.dmfragment/ivy.xml
+++ b/org.eclipse.virgo.kernel.dmfragment/ivy.xml
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
-<ivy-module
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
- version="1.3">
-
- <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
-
- <configurations>
- <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
- </configurations>
-
- <publications>
- <artifact name="${ant.project.name}"/>
- <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
- </publications>
-
- <dependencies>
- <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.io" rev="${org.springframework.osgi}" conf="compile->runtime"/>
-
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="compile->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="compile->compile"/>
-
- <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="compile->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
-
- <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic" rev="${org.eclipse.virgo.medic}" conf="aspects, compile->runtime"/>
- <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic}" conf="runtime->runtime"/>
-
- <override org="org.springframework" rev="${org.springframework}"/>
- <override org="org.eclipse.virgo.util" rev="${org.eclipse.virgo.util}"/>
- </dependencies>
-</ivy-module>
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.context.support" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.io" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="compile->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="compile->compile"/>
+
+ <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="compile->runtime"/>
+ <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
+
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic" rev="${org.eclipse.virgo.medic}" conf="aspects, compile->runtime"/>
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic}" conf="runtime->runtime"/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ <override org="org.eclipse.virgo.util" rev="${org.eclipse.virgo.util}"/>
+ </dependencies>
+</ivy-module>
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/ModuleBeanFactoryPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/ModuleBeanFactoryPostProcessor.java
index 8c252b11..18c74410 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/ModuleBeanFactoryPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/ModuleBeanFactoryPostProcessor.java
@@ -1,26 +1,26 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment;
-
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-
-/**
- * <strong>Concurrent Semantics</strong><br />
- *
- * Implementations must be thread-safe.
- *
- */
-public interface ModuleBeanFactoryPostProcessor {
-
- void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory);
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment;
+
+import org.osgi.framework.BundleContext;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+
+/**
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Implementations must be thread-safe.
+ *
+ */
+public interface ModuleBeanFactoryPostProcessor {
+
+ void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory);
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBean.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBean.java
index 579c69ff..c9c992e6 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBean.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBean.java
@@ -1,58 +1,58 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.BeanFactoryUtils;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationEvent;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.ApplicationContextEvent;
-import org.springframework.context.event.ContextClosedEvent;
-import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
-
-/**
- * {@link ApplicationContextShutdownBean} manages the shutting down of application contexts in the dm Server. In
- * particular it is responsible for ensuring that Spring DM service proxies do not hold up application context shutdown.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * This class is thread safe.
- *
- */
-// Note that this class must not implement ApplicationListener<ContextClosedEvent> since it needs to work with Spring
-// 2.5.x as well as Spring 3 and beyond.
-final class ApplicationContextShutdownBean implements ApplicationListener<ApplicationEvent> {
-
- private static final Logger logger = LoggerFactory.getLogger(ApplicationContextShutdownBean.class);
-
- /**
- * {@inheritDoc}
- */
- public void onApplicationEvent(ApplicationEvent event) {
- if (event instanceof ContextClosedEvent) {
- logger.info("Processing ContextClosedEvent '{}'", event);
- ApplicationContext applicationContext = ((ApplicationContextEvent) event).getApplicationContext();
- disableServiceProxyRetry(applicationContext);
- }
- }
-
- static void disableServiceProxyRetry(ApplicationContext applicationContext) {
- for (OsgiServiceProxyFactoryBean proxyBean : BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext,
- OsgiServiceProxyFactoryBean.class, true, false).values()) {
- logger.info("Setting timeout to 0 for proxy '{}' of application context '{}'", proxyBean, applicationContext);
- proxyBean.setTimeout(0);
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanFactoryUtils;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ApplicationContextEvent;
+import org.springframework.context.event.ContextClosedEvent;
+import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
+
+/**
+ * {@link ApplicationContextShutdownBean} manages the shutting down of application contexts in the dm Server. In
+ * particular it is responsible for ensuring that Spring DM service proxies do not hold up application context shutdown.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * This class is thread safe.
+ *
+ */
+// Note that this class must not implement ApplicationListener<ContextClosedEvent> since it needs to work with Spring
+// 2.5.x as well as Spring 3 and beyond.
+final class ApplicationContextShutdownBean implements ApplicationListener<ApplicationEvent> {
+
+ private static final Logger logger = LoggerFactory.getLogger(ApplicationContextShutdownBean.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ public void onApplicationEvent(ApplicationEvent event) {
+ if (event instanceof ContextClosedEvent) {
+ logger.info("Processing ContextClosedEvent '{}'", event);
+ ApplicationContext applicationContext = ((ApplicationContextEvent) event).getApplicationContext();
+ disableServiceProxyRetry(applicationContext);
+ }
+ }
+
+ static void disableServiceProxyRetry(ApplicationContext applicationContext) {
+ for (OsgiServiceProxyFactoryBean proxyBean : BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext,
+ OsgiServiceProxyFactoryBean.class, true, false).values()) {
+ logger.info("Setting timeout to 0 for proxy '{}' of application context '{}'", proxyBean, applicationContext);
+ proxyBean.setTimeout(0);
+ }
+ }
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBeanPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBeanPostProcessor.java
index cb9e6b77..28c148e9 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBeanPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ApplicationContextShutdownBeanPostProcessor.java
@@ -1,31 +1,31 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-
-
-
-final class ApplicationContextShutdownBeanPostProcessor implements ModuleBeanFactoryPostProcessor{
-
- private static final String APPLICATION_CONTEXT_SHUTDOWN_BEAN_NAME = "org.eclipse.virgo.server.applicationContextShutdownBean";
-
- /**
- * {@inheritDoc}
- */
- public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
- beanFactory.registerSingleton(APPLICATION_CONTEXT_SHUTDOWN_BEAN_NAME, new ApplicationContextShutdownBean());
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
+import org.osgi.framework.BundleContext;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+
+
+
+final class ApplicationContextShutdownBeanPostProcessor implements ModuleBeanFactoryPostProcessor{
+
+ private static final String APPLICATION_CONTEXT_SHUTDOWN_BEAN_NAME = "org.eclipse.virgo.server.applicationContextShutdownBean";
+
+ /**
+ * {@inheritDoc}
+ */
+ public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
+ beanFactory.registerSingleton(APPLICATION_CONTEXT_SHUTDOWN_BEAN_NAME, new ApplicationContextShutdownBean());
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
index 1fc41bf8..dcc4f095 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
@@ -1,69 +1,69 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.MutablePropertyValues;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor;
-import org.springframework.osgi.service.importer.support.ImportContextClassLoader;
-import org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean;
-import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
-
-
-/**
- * {@link OsgiBeanFactoryPostProcessor} that ensures that all service references are in unmanaged mode for thread
- * context class loader propagation.<p/>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Threadsafe.
- *
- */
-final class ContextClassLoaderPostProcessor implements ModuleBeanFactoryPostProcessor {
-
- private static final String PROPERTY_CONTEXT_CLASS_LOADER = "contextClassLoader";
-
- private static final Set<String> IMPORTER_CLASS_NAMES = createImportClassNames();
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("deprecation")
- public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
- String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames();
- for (String name : beanDefinitionNames) {
- BeanDefinition beanDefinition = beanFactory.getBeanDefinition(name);
- if (isServiceImportDefinition(beanDefinition)) {
- MutablePropertyValues propertyValues = beanDefinition.getPropertyValues();
- propertyValues.addPropertyValue(PROPERTY_CONTEXT_CLASS_LOADER, ImportContextClassLoader.UNMANAGED.getLabel());
- }
- }
- }
-
- private static Set<String> createImportClassNames() {
- Set<String> names = new HashSet<String>();
- names.add(OsgiServiceProxyFactoryBean.class.getName());
- names.add(OsgiServiceCollectionProxyFactoryBean.class.getName());
- return names;
- }
-
- private boolean isServiceImportDefinition(BeanDefinition beanDefinition) {
- return IMPORTER_CLASS_NAMES.contains(beanDefinition.getBeanClassName());
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
+import org.osgi.framework.BundleContext;
+import org.springframework.beans.MutablePropertyValues;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor;
+import org.springframework.osgi.service.importer.support.ImportContextClassLoader;
+import org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean;
+import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
+
+
+/**
+ * {@link OsgiBeanFactoryPostProcessor} that ensures that all service references are in unmanaged mode for thread
+ * context class loader propagation.<p/>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Threadsafe.
+ *
+ */
+final class ContextClassLoaderPostProcessor implements ModuleBeanFactoryPostProcessor {
+
+ private static final String PROPERTY_CONTEXT_CLASS_LOADER = "contextClassLoader";
+
+ private static final Set<String> IMPORTER_CLASS_NAMES = createImportClassNames();
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("deprecation")
+ public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
+ String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames();
+ for (String name : beanDefinitionNames) {
+ BeanDefinition beanDefinition = beanFactory.getBeanDefinition(name);
+ if (isServiceImportDefinition(beanDefinition)) {
+ MutablePropertyValues propertyValues = beanDefinition.getPropertyValues();
+ propertyValues.addPropertyValue(PROPERTY_CONTEXT_CLASS_LOADER, ImportContextClassLoader.UNMANAGED.getLabel());
+ }
+ }
+ }
+
+ private static Set<String> createImportClassNames() {
+ Set<String> names = new HashSet<String>();
+ names.add(OsgiServiceProxyFactoryBean.class.getName());
+ names.add(OsgiServiceCollectionProxyFactoryBean.class.getName());
+ return names;
+ }
+
+ private boolean isServiceImportDefinition(BeanDefinition beanDefinition) {
+ return IMPORTER_CLASS_NAMES.contains(beanDefinition.getBeanClassName());
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelAnnotationMBeanExporter.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelAnnotationMBeanExporter.java
index 111b288f..f8a0b663 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelAnnotationMBeanExporter.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelAnnotationMBeanExporter.java
@@ -1,39 +1,39 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import javax.management.MBeanException;
-import javax.management.modelmbean.ModelMBean;
-
-import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
-import org.springframework.jmx.export.annotation.AnnotationMBeanExporter;
-
-
-/**
- * An extension of {@link AnnotationMBeanExporter} that exports Kernel-specific MBeans.
- *
- * <strong>Concurrent Semantics</strong><br />
- * As thread-safe as <code>MBeanExporter</code>.
- */
-final class KernelAnnotationMBeanExporter extends AnnotationMBeanExporter {
-
- private final TracingService tracingService;
-
- KernelAnnotationMBeanExporter(TracingService tracingService) {
- this.tracingService = tracingService;
- }
-
- @Override
- protected ModelMBean createModelMBean() throws MBeanException {
- return new KernelModelMBean(this.tracingService, this.tracingService.getCurrentApplicationName());
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import javax.management.MBeanException;
+import javax.management.modelmbean.ModelMBean;
+
+import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
+import org.springframework.jmx.export.annotation.AnnotationMBeanExporter;
+
+
+/**
+ * An extension of {@link AnnotationMBeanExporter} that exports Kernel-specific MBeans.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * As thread-safe as <code>MBeanExporter</code>.
+ */
+final class KernelAnnotationMBeanExporter extends AnnotationMBeanExporter {
+
+ private final TracingService tracingService;
+
+ KernelAnnotationMBeanExporter(TracingService tracingService) {
+ this.tracingService = tracingService;
+ }
+
+ @Override
+ protected ModelMBean createModelMBean() throws MBeanException {
+ return new KernelModelMBean(this.tracingService, this.tracingService.getCurrentApplicationName());
+ }
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelExtensionConfiguringOsgiPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelExtensionConfiguringOsgiPostProcessor.java
index f20252ac..0fc7c1db 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelExtensionConfiguringOsgiPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelExtensionConfiguringOsgiPostProcessor.java
@@ -1,49 +1,49 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor;
-
-
-/**
- * {@link OsgiBeanFactoryPostProcessor} implementation that plugs in Server extensions implementation when needed.<p/>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Threadsafe.
- *
- */
-final class KernelExtensionConfiguringOsgiPostProcessor implements OsgiBeanFactoryPostProcessor {
-
- private final List<ModuleBeanFactoryPostProcessor> postProcessors = new CopyOnWriteArrayList<ModuleBeanFactoryPostProcessor>();
-
- KernelExtensionConfiguringOsgiPostProcessor(List<ModuleBeanFactoryPostProcessor> defaultPostProcessors) {
- this.postProcessors.addAll(defaultPostProcessors);
-
- }
-
- /**
- * {@inheritDoc}
- */
- public void postProcessBeanFactory(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
- for (ModuleBeanFactoryPostProcessor postProcessor : this.postProcessors) {
- postProcessor.postProcess(bundleContext, beanFactory);
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
+import org.osgi.framework.BundleContext;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor;
+
+
+/**
+ * {@link OsgiBeanFactoryPostProcessor} implementation that plugs in Server extensions implementation when needed.<p/>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Threadsafe.
+ *
+ */
+final class KernelExtensionConfiguringOsgiPostProcessor implements OsgiBeanFactoryPostProcessor {
+
+ private final List<ModuleBeanFactoryPostProcessor> postProcessors = new CopyOnWriteArrayList<ModuleBeanFactoryPostProcessor>();
+
+ KernelExtensionConfiguringOsgiPostProcessor(List<ModuleBeanFactoryPostProcessor> defaultPostProcessors) {
+ this.postProcessors.addAll(defaultPostProcessors);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void postProcessBeanFactory(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
+ for (ModuleBeanFactoryPostProcessor postProcessor : this.postProcessors) {
+ postProcessor.postProcess(bundleContext, beanFactory);
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
index 0c044396..af0b804d 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
@@ -1,97 +1,97 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import java.lang.instrument.ClassFileTransformer;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.springframework.beans.factory.BeanClassLoaderAware;
-import org.springframework.instrument.classloading.LoadTimeWeaver;
-import org.springframework.osgi.util.BundleDelegatingClassLoader;
-
-import org.eclipse.virgo.kernel.osgi.framework.InstrumentableClassLoader;
-import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
-
-/**
- * {@link LoadTimeWeaver} implementation that plugs into the {@link InstrumentableClassLoader
- * InstrumentableClassLoaders} created for all installed bundles.<p/>
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Threadsafe.
- *
- */
-final class KernelLoadTimeWeaver implements LoadTimeWeaver, BeanClassLoaderAware {
-
- private volatile InstrumentableClassLoader instrumentableClassLoader;
-
- /**
- * {@inheritDoc}
- */
- public void addTransformer(ClassFileTransformer transformer) {
- this.instrumentableClassLoader.addClassFileTransformer(transformer);
- }
-
- /**
- * {@inheritDoc}
- */
- public ClassLoader getInstrumentableClassLoader() {
- return (ClassLoader) this.instrumentableClassLoader;
- }
-
- /**
- * {@inheritDoc}
- */
- public ClassLoader getThrowawayClassLoader() {
- return this.instrumentableClassLoader.createThrowAway();
- }
-
- /**
- * {@inheritDoc}
- */
- public void setBeanClassLoader(ClassLoader classLoader) {
- InstrumentableClassLoader instrumentableClassLoader = null;
- if (classLoader instanceof InstrumentableClassLoader) {
- instrumentableClassLoader = (InstrumentableClassLoader) classLoader;
- } else if (classLoader instanceof BundleDelegatingClassLoader) {
- Bundle bundle = ((BundleDelegatingClassLoader) classLoader).getBundle();
- ClassLoader bundleClassLoader = getBundleClassLoader(bundle);
- if (bundleClassLoader instanceof InstrumentableClassLoader) {
- instrumentableClassLoader = (InstrumentableClassLoader) bundleClassLoader;
- }
- }
- if (instrumentableClassLoader == null) {
- throw new IllegalStateException("ClassLoader '" + classLoader + "' is not instrumentable.");
- }
- this.instrumentableClassLoader = instrumentableClassLoader;
- }
-
- /**
- * Gets the {@link ClassLoader} for the supplied {@link Bundle}.
- *
- * @param bundle the <code>Bundle</code>.
- * @return the <code>Bundles</code> <code>ClassLoader</code>.
- */
- private ClassLoader getBundleClassLoader(Bundle bundle) {
- BundleContext bundleContext = bundle.getBundleContext();
- ServiceReference<OsgiFramework> serviceReference = bundleContext.getServiceReference(OsgiFramework.class);
- try {
- OsgiFramework framework = bundleContext.getService(serviceReference);
- return framework.getBundleClassLoader(bundle);
- } finally {
- bundleContext.ungetService(serviceReference);
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import java.lang.instrument.ClassFileTransformer;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.springframework.beans.factory.BeanClassLoaderAware;
+import org.springframework.instrument.classloading.LoadTimeWeaver;
+import org.springframework.osgi.util.BundleDelegatingClassLoader;
+
+import org.eclipse.virgo.kernel.osgi.framework.InstrumentableClassLoader;
+import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
+
+/**
+ * {@link LoadTimeWeaver} implementation that plugs into the {@link InstrumentableClassLoader
+ * InstrumentableClassLoaders} created for all installed bundles.<p/>
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Threadsafe.
+ *
+ */
+final class KernelLoadTimeWeaver implements LoadTimeWeaver, BeanClassLoaderAware {
+
+ private volatile InstrumentableClassLoader instrumentableClassLoader;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addTransformer(ClassFileTransformer transformer) {
+ this.instrumentableClassLoader.addClassFileTransformer(transformer);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ClassLoader getInstrumentableClassLoader() {
+ return (ClassLoader) this.instrumentableClassLoader;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ClassLoader getThrowawayClassLoader() {
+ return this.instrumentableClassLoader.createThrowAway();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setBeanClassLoader(ClassLoader classLoader) {
+ InstrumentableClassLoader instrumentableClassLoader = null;
+ if (classLoader instanceof InstrumentableClassLoader) {
+ instrumentableClassLoader = (InstrumentableClassLoader) classLoader;
+ } else if (classLoader instanceof BundleDelegatingClassLoader) {
+ Bundle bundle = ((BundleDelegatingClassLoader) classLoader).getBundle();
+ ClassLoader bundleClassLoader = getBundleClassLoader(bundle);
+ if (bundleClassLoader instanceof InstrumentableClassLoader) {
+ instrumentableClassLoader = (InstrumentableClassLoader) bundleClassLoader;
+ }
+ }
+ if (instrumentableClassLoader == null) {
+ throw new IllegalStateException("ClassLoader '" + classLoader + "' is not instrumentable.");
+ }
+ this.instrumentableClassLoader = instrumentableClassLoader;
+ }
+
+ /**
+ * Gets the {@link ClassLoader} for the supplied {@link Bundle}.
+ *
+ * @param bundle the <code>Bundle</code>.
+ * @return the <code>Bundles</code> <code>ClassLoader</code>.
+ */
+ private ClassLoader getBundleClassLoader(Bundle bundle) {
+ BundleContext bundleContext = bundle.getBundleContext();
+ ServiceReference<OsgiFramework> serviceReference = bundleContext.getServiceReference(OsgiFramework.class);
+ try {
+ OsgiFramework framework = bundleContext.getService(serviceReference);
+ return framework.getBundleClassLoader(bundle);
+ } finally {
+ bundleContext.ungetService(serviceReference);
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelMBeanExporter.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelMBeanExporter.java
index d6cb410b..96a9ba02 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelMBeanExporter.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelMBeanExporter.java
@@ -1,40 +1,40 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import javax.management.MBeanException;
-import javax.management.modelmbean.ModelMBean;
-
-import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
-import org.springframework.jmx.export.MBeanExporter;
-
-
-/**
- * An extension of {@link MBeanExporter} that exports Server-specific MBeans.
- *
- * <strong>Concurrent Semantics</strong><br />
- * As thread-safe as <code>MBeanExporter</code>.
- *
- */
-final class KernelMBeanExporter extends MBeanExporter {
-
- private final TracingService tracingService;
-
- KernelMBeanExporter(TracingService tracingService) {
- this.tracingService = tracingService;
- }
-
- @Override
- protected ModelMBean createModelMBean() throws MBeanException {
- return new KernelModelMBean(this.tracingService, this.tracingService.getCurrentApplicationName());
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import javax.management.MBeanException;
+import javax.management.modelmbean.ModelMBean;
+
+import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
+import org.springframework.jmx.export.MBeanExporter;
+
+
+/**
+ * An extension of {@link MBeanExporter} that exports Server-specific MBeans.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * As thread-safe as <code>MBeanExporter</code>.
+ *
+ */
+final class KernelMBeanExporter extends MBeanExporter {
+
+ private final TracingService tracingService;
+
+ KernelMBeanExporter(TracingService tracingService) {
+ this.tracingService = tracingService;
+ }
+
+ @Override
+ protected ModelMBean createModelMBean() throws MBeanException {
+ return new KernelModelMBean(this.tracingService, this.tracingService.getCurrentApplicationName());
+ }
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelModelMBean.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelModelMBean.java
index 3f357741..faae0f06 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelModelMBean.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelModelMBean.java
@@ -1,50 +1,50 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import javax.management.MBeanException;
-import javax.management.ReflectionException;
-import javax.management.RuntimeOperationsException;
-
-import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
-import org.springframework.jmx.export.SpringModelMBean;
-
-
-/**
- * An extension of {@link SpringModelMBean} that acts as a Server-specific MBeans.
- *
- * <strong>Concurrent Semantics</strong><br />
- * As thread-safe as <code>SpringModelMBean</code>.
- */
-final class KernelModelMBean extends SpringModelMBean {
-
- private final TracingService tracingService;
-
- private final String applicationName;
-
- public KernelModelMBean(TracingService tracingService, String applicationName) throws RuntimeOperationsException, MBeanException {
- this.tracingService = tracingService;
- this.applicationName = applicationName;
- }
-
- @Override
- public Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException {
- String originalApplicationName = this.tracingService.getCurrentApplicationName();
-
- try {
- this.tracingService.setCurrentApplicationName(this.applicationName);
- return super.invoke(opName, opArgs, sig);
- } finally {
- this.tracingService.setCurrentApplicationName(originalApplicationName);
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import javax.management.MBeanException;
+import javax.management.ReflectionException;
+import javax.management.RuntimeOperationsException;
+
+import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
+import org.springframework.jmx.export.SpringModelMBean;
+
+
+/**
+ * An extension of {@link SpringModelMBean} that acts as a Server-specific MBeans.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * As thread-safe as <code>SpringModelMBean</code>.
+ */
+final class KernelModelMBean extends SpringModelMBean {
+
+ private final TracingService tracingService;
+
+ private final String applicationName;
+
+ public KernelModelMBean(TracingService tracingService, String applicationName) throws RuntimeOperationsException, MBeanException {
+ this.tracingService = tracingService;
+ this.applicationName = applicationName;
+ }
+
+ @Override
+ public Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException {
+ String originalApplicationName = this.tracingService.getCurrentApplicationName();
+
+ try {
+ this.tracingService.setCurrentApplicationName(this.applicationName);
+ return super.invoke(opName, opArgs, sig);
+ } finally {
+ this.tracingService.setCurrentApplicationName(originalApplicationName);
+ }
+ }
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/LoadTimeWeaverPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/LoadTimeWeaverPostProcessor.java
index fc3efdd6..33fe91ec 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/LoadTimeWeaverPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/LoadTimeWeaverPostProcessor.java
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import static org.springframework.context.ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME;
-
-import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.beans.factory.support.AbstractBeanDefinition;
-
-
-final class LoadTimeWeaverPostProcessor implements ModuleBeanFactoryPostProcessor {
-
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
- public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
- if (beanFactory.containsBean(LOAD_TIME_WEAVER_BEAN_NAME)) {
- AbstractBeanDefinition ltwBean = (AbstractBeanDefinition) beanFactory.getBeanDefinition(LOAD_TIME_WEAVER_BEAN_NAME);
- ltwBean.setBeanClass(KernelLoadTimeWeaver.class);
- logger.info("Found load-time weaver bean for bundle '{}'. Switching to ServerLoadTimeWeaver.", bundleContext.getBundle());
- } else {
- logger.info("Load-time weaving not enabled for bundle '{}',", bundleContext.getBundle());
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import static org.springframework.context.ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME;
+
+import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+
+
+final class LoadTimeWeaverPostProcessor implements ModuleBeanFactoryPostProcessor {
+
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+ public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
+ if (beanFactory.containsBean(LOAD_TIME_WEAVER_BEAN_NAME)) {
+ AbstractBeanDefinition ltwBean = (AbstractBeanDefinition) beanFactory.getBeanDefinition(LOAD_TIME_WEAVER_BEAN_NAME);
+ ltwBean.setBeanClass(KernelLoadTimeWeaver.class);
+ logger.info("Found load-time weaver bean for bundle '{}'. Switching to ServerLoadTimeWeaver.", bundleContext.getBundle());
+ } else {
+ logger.info("Load-time weaving not enabled for bundle '{}',", bundleContext.getBundle());
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/MBeanExporterPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/MBeanExporterPostProcessor.java
index d675f043..f4dc0384 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/MBeanExporterPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/MBeanExporterPostProcessor.java
@@ -1,61 +1,61 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
-import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.beans.factory.support.AbstractBeanDefinition;
-import org.springframework.jmx.export.MBeanExporter;
-import org.springframework.jmx.export.annotation.AnnotationMBeanExporter;
-
-
-final class MBeanExporterPostProcessor implements ModuleBeanFactoryPostProcessor {
-
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
- private final TracingService tracingService;
-
- public MBeanExporterPostProcessor(TracingService tracingService) {
- this.tracingService = tracingService;
- }
-
- /**
- * {@inheritDoc}
- */
- public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
- boolean foundExporter = false;
- String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames();
- for (String beanDefinitionName : beanDefinitionNames) {
- AbstractBeanDefinition definition = (AbstractBeanDefinition) beanFactory.getBeanDefinition(beanDefinitionName);
- if (MBeanExporter.class.getName().equals(definition.getBeanClassName())) {
- definition.setBeanClass(KernelMBeanExporter.class);
- definition.getConstructorArgumentValues().addGenericArgumentValue(this.tracingService);
- foundExporter = true;
- } else if (AnnotationMBeanExporter.class.getName().equals(definition.getBeanClassName())) {
- definition.setBeanClass(KernelAnnotationMBeanExporter.class);
- definition.getConstructorArgumentValues().addGenericArgumentValue(this.tracingService);
- foundExporter = true;
- }
- }
- if (foundExporter) {
- logger.info("Found MBean exporter bean for bundle '{}'. Switching to ServerMBeanExporter or ServerAnnotationMBeanExporter.",
- bundleContext.getBundle());
- } else {
- logger.info("MBean exporting not enabled for bundle '{}',", bundleContext.getBundle());
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import org.eclipse.virgo.kernel.dmfragment.ModuleBeanFactoryPostProcessor;
+import org.eclipse.virgo.kernel.shim.serviceability.TracingService;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.jmx.export.MBeanExporter;
+import org.springframework.jmx.export.annotation.AnnotationMBeanExporter;
+
+
+final class MBeanExporterPostProcessor implements ModuleBeanFactoryPostProcessor {
+
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+ private final TracingService tracingService;
+
+ public MBeanExporterPostProcessor(TracingService tracingService) {
+ this.tracingService = tracingService;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
+ boolean foundExporter = false;
+ String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames();
+ for (String beanDefinitionName : beanDefinitionNames) {
+ AbstractBeanDefinition definition = (AbstractBeanDefinition) beanFactory.getBeanDefinition(beanDefinitionName);
+ if (MBeanExporter.class.getName().equals(definition.getBeanClassName())) {
+ definition.setBeanClass(KernelMBeanExporter.class);
+ definition.getConstructorArgumentValues().addGenericArgumentValue(this.tracingService);
+ foundExporter = true;
+ } else if (AnnotationMBeanExporter.class.getName().equals(definition.getBeanClassName())) {
+ definition.setBeanClass(KernelAnnotationMBeanExporter.class);
+ definition.getConstructorArgumentValues().addGenericArgumentValue(this.tracingService);
+ foundExporter = true;
+ }
+ }
+ if (foundExporter) {
+ logger.info("Found MBean exporter bean for bundle '{}'. Switching to ServerMBeanExporter or ServerAnnotationMBeanExporter.",
+ bundleContext.getBundle());
+ } else {
+ logger.info("MBean exporting not enabled for bundle '{}',", bundleContext.getBundle());
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
index 5b02a000..7b09d1c9 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
@@ -1,63 +1,63 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.dmfragment.internal;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.SynchronousBundleListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
-
-/**
- * A {@link SynchronousBundleListener} that reacts to a {@link BundleEvent#STOPPING STOPPING} event for the system
- * bundle. Upon such an event being received the listener retrieves all {@link ApplicationContext ApplicationContexts}
- * from the service registry and disables retry on any {@link OsgiServiceProxyFactoryBean OsgiServiceProxyFactoryBeans}
- * which they contain.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- *
- * Thread-safe.
- *
- *
- * @see ApplicationContextShutdownBean#disableServiceProxyRetry(ApplicationContext)
- */
-class ServiceProxyRetryDisablingBundleListener implements SynchronousBundleListener {
-
- private final Logger logger = LoggerFactory.getLogger(this.getClass());
-
- ServiceProxyRetryDisablingBundleListener(BundleContext bundleContext) {
- bundleContext.addBundleListener(this);
- }
-
- public void bundleChanged(BundleEvent event) {
- if (event.getBundle().getBundleId() == 0 && event.getType() == BundleEvent.STOPPING) {
- BundleContext bundleContext = event.getBundle().getBundleContext();
- try {
- ServiceReference<?>[] applicationContextServiceReferences = event.getBundle().getBundleContext().getAllServiceReferences(
- ApplicationContext.class.getName(), null);
-
- for (ServiceReference<?> applicationContextServiceReference : applicationContextServiceReferences) {
- ApplicationContext applicationContext = (ApplicationContext) bundleContext.getService(applicationContextServiceReference);
- ApplicationContextShutdownBean.disableServiceProxyRetry(applicationContext);
- bundleContext.ungetService(applicationContextServiceReference);
- }
- } catch (InvalidSyntaxException ise) {
- logger.error("Failed to retrieve all application contexts from service registry", ise);
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.dmfragment.internal;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.SynchronousBundleListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean;
+
+/**
+ * A {@link SynchronousBundleListener} that reacts to a {@link BundleEvent#STOPPING STOPPING} event for the system
+ * bundle. Upon such an event being received the listener retrieves all {@link ApplicationContext ApplicationContexts}
+ * from the service registry and disables retry on any {@link OsgiServiceProxyFactoryBean OsgiServiceProxyFactoryBeans}
+ * which they contain.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Thread-safe.
+ *
+ *
+ * @see ApplicationContextShutdownBean#disableServiceProxyRetry(ApplicationContext)
+ */
+class ServiceProxyRetryDisablingBundleListener implements SynchronousBundleListener {
+
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+ ServiceProxyRetryDisablingBundleListener(BundleContext bundleContext) {
+ bundleContext.addBundleListener(this);
+ }
+
+ public void bundleChanged(BundleEvent event) {
+ if (event.getBundle().getBundleId() == 0 && event.getType() == BundleEvent.STOPPING) {
+ BundleContext bundleContext = event.getBundle().getBundleContext();
+ try {
+ ServiceReference<?>[] applicationContextServiceReferences = event.getBundle().getBundleContext().getAllServiceReferences(
+ ApplicationContext.class.getName(), null);
+
+ for (ServiceReference<?> applicationContextServiceReference : applicationContextServiceReferences) {
+ ApplicationContext applicationContext = (ApplicationContext) bundleContext.getService(applicationContextServiceReference);
+ ApplicationContextShutdownBean.disableServiceProxyRetry(applicationContext);
+ bundleContext.ungetService(applicationContextServiceReference);
+ }
+ } catch (InvalidSyntaxException ise) {
+ logger.error("Failed to retrieve all application contexts from service registry", ise);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml b/org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml
index 93ceda9a..1d1a1dff 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:osgi="http://www.springframework.org/schema/osgi"
- xsi:schemaLocation="http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
- <osgi:reference id="tracingService" interface="org.eclipse.virgo.kernel.shim.serviceability.TracingService"/>
-
- <bean id="serverExtensionConfigurer" class="org.eclipse.virgo.kernel.dmfragment.internal.KernelExtensionConfiguringOsgiPostProcessor">
- <constructor-arg>
- <list>
- <bean class="org.eclipse.virgo.kernel.dmfragment.internal.ContextClassLoaderPostProcessor"/>
- <bean class="org.eclipse.virgo.kernel.dmfragment.internal.LoadTimeWeaverPostProcessor"/>
- <bean class="org.eclipse.virgo.kernel.dmfragment.internal.MBeanExporterPostProcessor">
- <constructor-arg ref="tracingService"/>
- </bean>
- <bean class="org.eclipse.virgo.kernel.dmfragment.internal.ApplicationContextShutdownBeanPostProcessor"/>
- </list>
- </constructor-arg>
- </bean>
-
- <osgi:service ref="serverExtensionConfigurer" interface="org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor" />
-
- <bean id="taskExecutor" class="org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor">
- <constructor-arg value="region-dm-" />
- <constructor-arg value="15" />
- <constructor-arg ref="bundleContext"/>
- </bean>
-
- <alias alias="shutdownTaskExecutor" name="taskExecutor"/>
-
- <bean id="serviceProxyRetryDisabler" class="org.eclipse.virgo.kernel.dmfragment.internal.ServiceProxyRetryDisablingBundleListener">
- <constructor-arg ref="bundleContext"/>
- </bean>
-
-</beans>
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <osgi:reference id="tracingService" interface="org.eclipse.virgo.kernel.shim.serviceability.TracingService"/>
+
+ <bean id="serverExtensionConfigurer" class="org.eclipse.virgo.kernel.dmfragment.internal.KernelExtensionConfiguringOsgiPostProcessor">
+ <constructor-arg>
+ <list>
+ <bean class="org.eclipse.virgo.kernel.dmfragment.internal.ContextClassLoaderPostProcessor"/>
+ <bean class="org.eclipse.virgo.kernel.dmfragment.internal.LoadTimeWeaverPostProcessor"/>
+ <bean class="org.eclipse.virgo.kernel.dmfragment.internal.MBeanExporterPostProcessor">
+ <constructor-arg ref="tracingService"/>
+ </bean>
+ <bean class="org.eclipse.virgo.kernel.dmfragment.internal.ApplicationContextShutdownBeanPostProcessor"/>
+ </list>
+ </constructor-arg>
+ </bean>
+
+ <osgi:service ref="serverExtensionConfigurer" interface="org.springframework.osgi.extender.OsgiBeanFactoryPostProcessor" />
+
+ <bean id="taskExecutor" class="org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor">
+ <constructor-arg value="region-dm-" />
+ <constructor-arg value="15" />
+ <constructor-arg ref="bundleContext"/>
+ </bean>
+
+ <alias alias="shutdownTaskExecutor" name="taskExecutor"/>
+
+ <bean id="serviceProxyRetryDisabler" class="org.eclipse.virgo.kernel.dmfragment.internal.ServiceProxyRetryDisablingBundleListener">
+ <constructor-arg ref="bundleContext"/>
+ </bean>
+
+</beans>
diff --git a/org.eclipse.virgo.kernel.dmfragment/template.mf b/org.eclipse.virgo.kernel.dmfragment/template.mf
index c8544a8f..71660657 100644
--- a/org.eclipse.virgo.kernel.dmfragment/template.mf
+++ b/org.eclipse.virgo.kernel.dmfragment/template.mf
@@ -1,21 +1,21 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Virgo Kernel User Region OSGi Spring DM Fragment
-Fragment-Host: org.springframework.osgi.extender
-Bundle-SymbolicName: org.eclipse.virgo.kernel.dmfragment
-Bundle-Version: 2.2.0
-Import-Package:
- org.eclipse.virgo.kernel.agent.dm;version="${version:[=.=.=, =.+1)}",
- org.eclipse.virgo.kernel.shim.serviceability;version="${version:[=.=.=, =.+1)}"
-Import-Template:
- org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
- org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
- org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
- org.aspectj.*;version="${org.aspectj:[=.=.=.=, +1)}",
- javax.management.*;version="0",
- org.osgi.framework.*;version="0",
- org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}"
-Excluded-Imports:
- org.springframework.osgi.*
-Excluded-Exports:
- org.eclipse.virgo.kernel.dmfragment.internal.*
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Kernel User Region OSGi Spring DM Fragment
+Fragment-Host: org.springframework.osgi.extender
+Bundle-SymbolicName: org.eclipse.virgo.kernel.dmfragment
+Bundle-Version: 2.2.0
+Import-Package:
+ org.eclipse.virgo.kernel.agent.dm;version="${version:[=.=.=, =.+1)}",
+ org.eclipse.virgo.kernel.shim.serviceability;version="${version:[=.=.=, =.+1)}"
+Import-Template:
+ org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
+ org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
+ org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
+ org.aspectj.*;version="${org.aspectj:[=.=.=.=, +1)}",
+ javax.management.*;version="0",
+ org.osgi.framework.*;version="0",
+ org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}"
+Excluded-Imports:
+ org.springframework.osgi.*
+Excluded-Exports:
+ org.eclipse.virgo.kernel.dmfragment.internal.*
diff --git a/org.eclipse.virgo.kernel.kerneldmfragment/.classpath b/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
index 9e3be488..c4a17ace 100644
--- a/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
+++ b/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
@@ -29,7 +29,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.io/1.2.1/org.springframework.osgi.io-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
diff --git a/org.eclipse.virgo.kernel.model/.classpath b/org.eclipse.virgo.kernel.model/.classpath
index 9571c523..f5e6056f 100644
--- a/org.eclipse.virgo.kernel.model/.classpath
+++ b/org.eclipse.virgo.kernel.model/.classpath
@@ -25,16 +25,16 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
diff --git a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/deployer/DeployerArtifact.java b/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/deployer/DeployerArtifact.java
index 2a880e68..b107b529 100644
--- a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/deployer/DeployerArtifact.java
+++ b/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/deployer/DeployerArtifact.java
@@ -17,17 +17,16 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
-import org.eclipse.virgo.kernel.core.BlockingSignal;
+import org.eclipse.virgo.kernel.core.BlockingAbortableSignal;
import org.eclipse.virgo.kernel.core.FailureSignalledException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.serviceability.NonNull;
-import org.osgi.framework.BundleContext;
-
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
import org.eclipse.virgo.kernel.install.artifact.InstallArtifact.State;
import org.eclipse.virgo.kernel.model.Artifact;
import org.eclipse.virgo.kernel.model.ArtifactState;
import org.eclipse.virgo.kernel.model.internal.AbstractArtifact;
+import org.eclipse.virgo.kernel.serviceability.NonNull;
+import org.osgi.framework.BundleContext;
/**
* Implementation of {@link Artifact} that delegates to a Kernel {@link InstallArtifact}
@@ -59,11 +58,15 @@ class DeployerArtifact extends AbstractArtifact {
*/
public final void start() {
try {
- BlockingSignal signal = new BlockingSignal();
+ BlockingAbortableSignal signal = new BlockingAbortableSignal();
this.installArtifact.start(signal);
try {
if (!signal.awaitCompletion(5, TimeUnit.MINUTES)) {
- throw new RuntimeException("Started failed");
+ if(signal.isAborted()){
+ throw new RuntimeException("Started aborted");
+ } else {
+ throw new RuntimeException("Started failed");
+ }
}
} catch (FailureSignalledException fse) {
throw new RuntimeException(fse.getCause());
diff --git a/org.eclipse.virgo.kernel.osgi/.classpath b/org.eclipse.virgo.kernel.osgi/.classpath
index b6b8bb2a..56e57fb6 100644
--- a/org.eclipse.virgo.kernel.osgi/.classpath
+++ b/org.eclipse.virgo.kernel.osgi/.classpath
@@ -22,28 +22,28 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.extensions.equinox-2.2.0.D-20101207145732.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090921150251/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090921150251.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.extensions.equinox-3.0.0.D-20110201141222.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090921150251/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090921150251.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-2.2.0.D-20101207145732.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-sources-2.2.0.D-20101207145732.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.launcher-3.0.0.D-20110201141222.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.launcher-sources-3.0.0.D-20110201141222.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.osgi/ivy.xml b/org.eclipse.virgo.kernel.osgi/ivy.xml
index c983ce6c..f40e1336 100644
--- a/org.eclipse.virgo.kernel.osgi/ivy.xml
+++ b/org.eclipse.virgo.kernel.osgi/ivy.xml
@@ -18,6 +18,7 @@
<dependency org='org.eclipse.virgo.medic' name='org.eclipse.virgo.medic' rev='${org.eclipse.virgo.medic}' conf='aspects, compile->runtime'/>
<dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.test" rev="${org.eclipse.virgo.medic}" conf="test->runtime"/>
<dependency org='org.eclipse.osgi' name='org.eclipse.osgi' rev='${org.eclipse.osgi}' conf='compile->compile'/>
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<dependency org='org.slf4j' name='com.springsource.slf4j.api' rev='${org.slf4j}' conf='compile->runtime'/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="compile->compile"/>
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/resources/.gitignore b/org.eclipse.virgo.kernel.osgi/src/test/resources/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/org.eclipse.virgo.kernel.osgi/src/test/resources/.gitignore
+++ /dev/null
diff --git a/org.eclipse.virgo.kernel.osgi/template.mf b/org.eclipse.virgo.kernel.osgi/template.mf
index 8dc08b08..a5003bad 100644
--- a/org.eclipse.virgo.kernel.osgi/template.mf
+++ b/org.eclipse.virgo.kernel.osgi/template.mf
@@ -19,5 +19,6 @@ Import-Template:
org.eclipse.osgi.*;version="0",
org.osgi.framework.*;version="0",
org.osgi.service.*;version="0",
+ org.osgi.util.*;version="0",
org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}"
diff --git a/org.eclipse.virgo.kernel.osgicommand/.classpath b/org.eclipse.virgo.kernel.osgicommand/.classpath
index 1266f149..56b07cfb 100644
--- a/org.eclipse.virgo.kernel.osgicommand/.classpath
+++ b/org.eclipse.virgo.kernel.osgicommand/.classpath
@@ -10,7 +10,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.shell"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
index bf37e9d2..90735ded 100644
--- a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
+++ b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
@@ -108,7 +108,6 @@ public class ClassLoadingHelperTests {
verify(bundle);
}
- @SuppressWarnings("rawtypes")
@Test
public void testTryToLoadMissingBundle() throws Exception {
assertNull("Class [" + CLASS_NAME + "] found, while no bundle is specified",
@@ -129,7 +128,8 @@ public class ClassLoadingHelperTests {
verify(bundle);
}
- @Test
+ @SuppressWarnings("rawtypes")
+ @Test
public void testTryToLoadExistingClass() throws Exception {
Bundle bundle = createMock(Bundle.class);
diff --git a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/internal/commands/classloading/ClassLoadingCommandProviderTests.java b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/internal/commands/classloading/ClassLoadingCommandProviderTests.java
index 47bfdf17..53846482 100644
--- a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/internal/commands/classloading/ClassLoadingCommandProviderTests.java
+++ b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/internal/commands/classloading/ClassLoadingCommandProviderTests.java
@@ -221,7 +221,7 @@ public class ClassLoadingCommandProviderTests {
verify(bundle, bundleContext, packageAdmin, packageAdminServiceReference);
}
- @SuppressWarnings({ "rawtypes", "unchecked" })
+ @SuppressWarnings("rawtypes")
@Test
public void testClLoadWithBundleIdAndExistingClass() throws Exception {
Bundle bundle = createMock(Bundle.class);
diff --git a/org.eclipse.virgo.kernel.services/.classpath b/org.eclipse.virgo.kernel.services/.classpath
index 565d6c65..747e5da2 100644
--- a/org.eclipse.virgo.kernel.services/.classpath
+++ b/org.eclipse.virgo.kernel.services/.classpath
@@ -24,29 +24,29 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.shell/.classpath b/org.eclipse.virgo.kernel.shell/.classpath
index c724cae5..30d172d5 100644
--- a/org.eclipse.virgo.kernel.shell/.classpath
+++ b/org.eclipse.virgo.kernel.shell/.classpath
@@ -21,30 +21,32 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/2.2.0.D-20110113044904/org.eclipse.virgo.medic.core-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.D-20110201142122/org.eclipse.virgo.medic.core-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-sources-2.2.0.D-20101207145338.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-sources-3.0.0.D-20110201140958.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.model"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.shell/ivy.xml b/org.eclipse.virgo.kernel.shell/ivy.xml
index c010b461..7bef316c 100644
--- a/org.eclipse.virgo.kernel.shell/ivy.xml
+++ b/org.eclipse.virgo.kernel.shell/ivy.xml
@@ -19,6 +19,7 @@
<dependencies>
<!-- RUNTIME -->
<dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
<dependency org="org.eclipse.virgo.repository" name="org.eclipse.virgo.repository" rev="${org.eclipse.virgo.repository}" conf="compile->compile"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.model" rev="latest.integration" conf="compile->compile"/>
@@ -31,7 +32,7 @@
<dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org='org.apache.felix' name='org.apache.felix.eventadmin' rev='${org.apache.felix.eventadmin}' conf='compile->compile'/>
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<!-- COMPILE -->
<dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic}" conf="runtime->runtime"/>
<!-- TEST -->
diff --git a/org.eclipse.virgo.kernel.shell/template.mf b/org.eclipse.virgo.kernel.shell/template.mf
index 00c4a5b2..deb3727b 100644
--- a/org.eclipse.virgo.kernel.shell/template.mf
+++ b/org.eclipse.virgo.kernel.shell/template.mf
@@ -17,6 +17,8 @@ Import-Template:
org.ietf.jgss.*;version="0",
org.eclipse.osgi.*;version="0",
org.osgi.framework.*;version="0",
+ org.osgi.service.*;version="0",
+ org.osgi.util.*;version="0",
org.osgi.service.cm.*;version="0",
org.osgi.service.event.*;version="0",
javax.management.*;version="0"
diff --git a/org.eclipse.virgo.kernel.smoketest/.classpath b/org.eclipse.virgo.kernel.smoketest/.classpath
index d9e2517f..ba19060b 100644
--- a/org.eclipse.virgo.kernel.smoketest/.classpath
+++ b/org.eclipse.virgo.kernel.smoketest/.classpath
@@ -5,6 +5,6 @@
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.stubs/.classpath b/org.eclipse.virgo.kernel.stubs/.classpath
index 05ed686c..93754696 100644
--- a/org.eclipse.virgo.kernel.stubs/.classpath
+++ b/org.eclipse.virgo.kernel.stubs/.classpath
@@ -24,8 +24,8 @@
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry kind="output" path="target/classes"/>
diff --git a/org.eclipse.virgo.kernel.stubs/src/main/java/org/eclipse/virgo/kernel/stubs/StubInstallArtifact.java b/org.eclipse.virgo.kernel.stubs/src/main/java/org/eclipse/virgo/kernel/stubs/StubInstallArtifact.java
index bc69b5d6..fd9de683 100644
--- a/org.eclipse.virgo.kernel.stubs/src/main/java/org/eclipse/virgo/kernel/stubs/StubInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.stubs/src/main/java/org/eclipse/virgo/kernel/stubs/StubInstallArtifact.java
@@ -17,16 +17,14 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.osgi.framework.Version;
-
-import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
-
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
+import org.eclipse.virgo.kernel.install.artifact.InstallArtifact;
import org.eclipse.virgo.kernel.serviceability.NonNull;
import org.eclipse.virgo.util.common.ThreadSafeArrayListTree;
import org.eclipse.virgo.util.common.Tree;
+import org.osgi.framework.Version;
public class StubInstallArtifact implements InstallArtifact {
@@ -142,7 +140,7 @@ public class StubInstallArtifact implements InstallArtifact {
start(null);
}
- public void start(Signal signal) throws DeploymentException {
+ public void start(AbortableSignal signal) throws DeploymentException {
if (signal != null) {
signal.signalSuccessfulCompletion();
}
diff --git a/org.eclipse.virgo.kernel.test/.classpath b/org.eclipse.virgo.kernel.test/.classpath
index 3ea3edc6..21dc25b3 100644
--- a/org.eclipse.virgo.kernel.test/.classpath
+++ b/org.eclipse.virgo.kernel.test/.classpath
@@ -9,17 +9,17 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/2.2.0.D-20110113044811/org.eclipse.virgo.test.framework-2.2.0.D-20110113044811.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/2.2.0.D-20110113044811/org.eclipse.virgo.test.framework-sources-2.2.0.D-20110113044811.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.0.0.D-20110201141918/org.eclipse.virgo.test.framework-3.0.0.D-20110201141918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.0.0.D-20110201141918/org.eclipse.virgo.test.framework-sources-3.0.0.D-20110201141918.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.0.RELEASE/org.springframework.context-sources-3.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.0.RELEASE/org.springframework.core-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-2.2.0.D-20101207145732.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.launcher-3.0.0.D-20110201141222.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-3.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.0.RELEASE/org.springframework.beans-sources-3.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgicommand"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
index 8502aef5..747c5786 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
@@ -22,22 +22,20 @@ import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import org.junit.Assert;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.ServiceReference;
-
+import org.eclipse.virgo.kernel.core.AbortableSignal;
+import org.eclipse.virgo.kernel.core.BundleStarter;
import org.eclipse.virgo.kernel.osgi.framework.OsgiFrameworkUtils;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiFramework;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory;
import org.eclipse.virgo.kernel.test.AbstractKernelIntegrationTest;
import org.eclipse.virgo.kernel.test.ManifestUtils;
-
-import org.eclipse.virgo.kernel.core.BundleStarter;
-import org.eclipse.virgo.kernel.core.Signal;
import org.eclipse.virgo.util.osgi.manifest.BundleManifest;
import org.eclipse.virgo.util.osgi.manifest.BundleManifestFactory;
+import org.junit.Assert;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
/**
*/
@@ -60,7 +58,7 @@ public class ApplicationContextDependencyMonitorIntegrationTests extends Abstrac
final CountDownLatch latch = new CountDownLatch(1);
- bundleStarter.start(quickConsumer, new Signal() {
+ bundleStarter.start(quickConsumer, new AbortableSignal() {
public void signalFailure(Throwable cause) {
cause.printStackTrace();
}
@@ -68,6 +66,10 @@ public class ApplicationContextDependencyMonitorIntegrationTests extends Abstrac
public void signalSuccessfulCompletion() {
latch.countDown();
}
+
+ public void signalAborted() {
+ new RuntimeException("Start aborted").printStackTrace();
+ }
});
assertTrue(latch.await(20, TimeUnit.SECONDS));
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
index 3e63d5c8..588d3675 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
@@ -11,21 +11,21 @@
package org.eclipse.virgo.kernel.test;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.BundleStarter;
-import org.eclipse.virgo.kernel.core.Signal;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
-
/**
*/
public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrationTest {
@@ -48,6 +48,7 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
while (!ts.isComplete()) {
Thread.sleep(100);
}
+ assertFalse(ts.isAborted());
assertNull(ts.getCause());
}
@@ -61,6 +62,7 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
while (!ts.isComplete()) {
Thread.sleep(100);
}
+ assertFalse(ts.isAborted());
assertNull(ts.getCause());
}
@@ -73,10 +75,28 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
while (!ts.isComplete()) {
Thread.sleep(100);
}
+ assertFalse(ts.isAborted());
assertNotNull(ts.getCause());
}
@Test
+ public void signalAbort() throws Exception {
+ Bundle bundle = installBundle(new File("src/test/resources/monitor/lazy"));
+ assertNotNull(bundle);
+ TestSignal ts = new TestSignal();
+ this.monitor.start(bundle, ts);
+ while (bundle.getState() != Bundle.STARTING) {
+ Thread.sleep(100);
+ }
+ bundle.stop();
+ while (!ts.isComplete()) {
+ Thread.sleep(100);
+ }
+ assertNull(ts.getCause());
+ assertTrue(ts.isAborted());
+ }
+
+ @Test
public void signalNonDm() throws Exception {
Bundle bundle = installBundle(new File("src/test/resources/monitor/nondm"));
assertNotNull(bundle);
@@ -84,6 +104,7 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
this.monitor.start(bundle, ts);
waitForComplete(ts, 1000);
assertTrue(ts.isComplete());
+ assertFalse(ts.isAborted());
assertNull(ts.getCause());
}
@@ -269,15 +290,16 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
return this.context.installBundle(bundleFile.toURI().toString());
}
- private static class TestSignal implements Signal {
-
+ private static class TestSignal implements AbortableSignal {
+
private volatile boolean complete = false;
+ private volatile boolean aborted = false;
+
private volatile Throwable cause = null;
public void signalSuccessfulCompletion() {
this.complete = true;
-
}
public void signalFailure(Throwable t) {
@@ -285,10 +307,19 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
this.cause = t;
}
+ public void signalAborted() {
+ this.complete = true;
+ this.aborted = true;
+ }
+
public boolean isComplete() {
return this.complete;
}
+ public boolean isAborted() {
+ return this.aborted;
+ }
+
public Throwable getCause() {
return this.cause;
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/TestSignal.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/TestSignal.java
index 570e118e..8105d27d 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/TestSignal.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/TestSignal.java
@@ -19,10 +19,9 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.virgo.kernel.core.Signal;
+import org.eclipse.virgo.kernel.core.AbortableSignal;
-
-public final class TestSignal implements Signal {
+public final class TestSignal implements AbortableSignal {
private final AtomicReference<Throwable> causeReference = new AtomicReference<Throwable>(null);
@@ -34,7 +33,6 @@ public final class TestSignal implements Signal {
public void signalFailure(Throwable cause) {
causeReference.set(cause);
completionLatch.countDown();
-
}
/**
@@ -43,6 +41,10 @@ public final class TestSignal implements Signal {
public void signalSuccessfulCompletion() {
completionLatch.countDown();
}
+
+ public void signalAborted() {
+ completionLatch.countDown();
+ }
public void assertSuccessfulCompletionSignalled(long msTimeout) throws InterruptedException {
assertTrue(completionLatch.await(msTimeout, TimeUnit.MILLISECONDS));
@@ -52,5 +54,10 @@ public final class TestSignal implements Signal {
public void assertFailureSignalled(long msTimeout) throws InterruptedException {
assertTrue(completionLatch.await(msTimeout, TimeUnit.MILLISECONDS));
assertNotNull(causeReference.get());
- }
+ }
+
+ public void assertsignalAborted(long msTimeout) throws InterruptedException {
+ assertTrue(completionLatch.await(msTimeout, TimeUnit.MILLISECONDS));
+ assertNull(causeReference.get());
+ }
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
index c4148e44..b7b55ab5 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
@@ -18,15 +18,17 @@ Bundle-Name: Virgo Kernel Test
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.virgo.kernel.test
Import-Package: javax.management;version="0",org.eclipse.virgo.kernel.
- core;version="[2.2.0,3)",org.eclipse.virgo.kernel.deployer.core;versi
- on="[2.2.0,3)",org.eclipse.virgo.kernel.osgi.framework;version="[2.2.
- 0,3)",org.eclipse.virgo.kernel.osgi.quasi;version="[2.2.0,3)",org.ecl
- ipse.virgo.kernel.osgi.region;version="[2.2.0,3)",org.eclipse.virgo.k
- ernel.osgicommand.helper;version="[2.2.0,3)",org.eclipse.virgo.util.i
- o;version="[2.2.0,3)",org.eclipse.virgo.util.osgi.manifest;version="[
- 2.2.0,3)",org.junit;version="[4.7.0,5)",org.junit.runner;version="[4.
- 7.0,5)",org.osgi.framework;version="0",org.springframework.context;ve
- rsion="[2.5.6,3.1)",org.springframework.jmx.export;version="[2.5.6,3.
- 1)",org.springframework.osgi.context.support;version="[1.2.1,2)",org.
- springframework.osgi.service.importer.support;version="[1.2.1,2)"
+ core;version="[3.0.0,4)",org.eclipse.virgo.kernel.deployer.core;versi
+ on="[3.0.0,4)",org.eclipse.virgo.kernel.osgi.framework;version="[3.0.
+ 0,4)",org.eclipse.virgo.kernel.osgi.quasi;version="[3.0.0,4)",org.ecl
+ ipse.virgo.kernel.osgi.region;version="[3.0.0,4)",org.eclipse.virgo.k
+ ernel.osgicommand.helper;version="[3.0.0,4)",org.eclipse.virgo.util.i
+ o;version="[2.2.0,3.3)",org.eclipse.virgo.util.osgi.manifest;version=
+ "[2.2.0,3.3)",org.junit;version="[4.7.0,5)",org.junit.runner;version=
+ "[4.7.0,5)",org.osgi.framework;version="0",org.osgi.service.framework
+ ;version="0",org.osgi.service.packageadmin;version="0",org.springfram
+ ework.context;version="[2.5.6,3.1)",org.springframework.jmx.export;ve
+ rsion="[2.5.6,3.1)",org.springframework.osgi.context.support;version=
+ "[1.2.1,2)",org.springframework.osgi.service.importer.support;version
+ ="[1.2.1,2)"
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/test.config.properties b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/test.config.properties
index 62ec979f..7cf66608 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/test.config.properties
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/test.config.properties
@@ -7,7 +7,7 @@ launcher.bundles =\
file:../ivy-cache/repository/org.eclipse.equinox/org.eclipse.equinox.cm/${org.eclipse.equinox.cm}/org.eclipse.equinox.cm-${org.eclipse.equinox.cm}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/${org.eclipse.virgo.medic}/org.eclipse.virgo.medic.core-${org.eclipse.virgo.medic}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/${org.eclipse.virgo.util}/org.eclipse.virgo.util.osgi-${org.eclipse.virgo.util}.jar@start,\
- file:../ivy-cache/repository/org.apache.felix/org.apache.felix.eventadmin/${org.apache.felix.eventadmin}/org.apache.felix.eventadmin-${org.apache.felix.eventadmin}.jar@start,\
+ file:../ivy-cache/repository/org.eclipse/equinox-event/${org.eclipse.equinox.event}/equinox-event-${org.eclipse.equinox.event}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.common/${org.eclipse.virgo.util}/org.eclipse.virgo.util.common-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.io/${org.eclipse.virgo.util}/org.eclipse.virgo.util.io-${org.eclipse.virgo.util}.jar@start,\
file:../ivy-cache/repository/org.eclipse.virgo.util/org.eclipse.virgo.util.jmx/${org.eclipse.virgo.util}/org.eclipse.virgo.util.jmx-${org.eclipse.virgo.util}.jar,\
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties b/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
index 4886ea5f..126a02b7 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
@@ -41,6 +41,9 @@ packageImports =\
org.eclipse.osgi.*;version="0",\
javax.management;version="0",\
javax.management.*;version="0",\
+ org.osgi.service.cm;version="0",\
+ org.osgi.service.log;version="0",\
+ org.osgi.service.event;version="0",\
org.slf4j;version="[1.6.1,2)",\
org.slf4j.spi;version="[1.6.1,2)"
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/initial-artifact-plan/com.springsource.kernel.test.userregion.springdm.plan b/org.eclipse.virgo.kernel.test/src/test/resources/initial-artifact-plan/com.springsource.kernel.test.userregion.springdm.plan
index 0e5d15f3..9c7f8b0c 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/initial-artifact-plan/com.springsource.kernel.test.userregion.springdm.plan
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/initial-artifact-plan/com.springsource.kernel.test.userregion.springdm.plan
@@ -1,10 +1,10 @@
-<plan name="org.eclipse.virgo.kernel.test.userregion.springdm" version="2.1" scoped="false" atomic="false"
+<plan name="org.eclipse.virgo.kernel.test.userregion.springdm" version="3.0" scoped="false" atomic="false"
xmlns="http://www.springsource.org/schema/dm-server/plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springsource.org/schema/dm-server/plan
http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">
- <artifact type="bundle" name="com.springsource.kernel.agent.dm" version="[2.2, 3.0)"/>
- <artifact type="bundle" name="org.eclipse.virgo.kernel.deployer.dm" version="[2.2, 3.0)"/>
+ <artifact type="bundle" name="com.springsource.kernel.agent.dm" version="[3.0, 4.0)"/>
+ <artifact type="bundle" name="org.eclipse.virgo.kernel.deployer.dm" version="[3.0, 4.0)"/>
</plan>
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..0188db8d
--- /dev/null
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: monitor.lazy
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/spring/context.xml b/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/spring/context.xml
new file mode 100644
index 00000000..974f02f2
--- /dev/null
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/monitor/lazy/META-INF/spring/context.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+
+</beans:beans>
diff --git a/org.eclipse.virgo.kernel.test/template.mf b/org.eclipse.virgo.kernel.test/template.mf
index cea124eb..8fb8cf9f 100644
--- a/org.eclipse.virgo.kernel.test/template.mf
+++ b/org.eclipse.virgo.kernel.test/template.mf
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.virgo.kernel.test
Bundle-Version: 2.2.0
Import-Template:
org.eclipse.virgo.kernel.*;version="${version:[=.=.=, +1)}",
- org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, +1)}",
+ org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, +1.+1)}",
javax.management.*;version="0",
org.easymock.*;version="${org.easymock:[=.=.=, +1)}",
org.junit.*;version="${org.junit:[=.=.=, +1)}",
diff --git a/org.eclipse.virgo.kernel.userregion/.classpath b/org.eclipse.virgo.kernel.userregion/.classpath
index 16d69e9b..250eca35 100644
--- a/org.eclipse.virgo.kernel.userregion/.classpath
+++ b/org.eclipse.virgo.kernel.userregion/.classpath
@@ -22,27 +22,27 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/2.2.0.D-20110113044904/org.eclipse.virgo.medic-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.D-20110201142122/org.eclipse.virgo.medic-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-3.7.0.v20101022.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-2.2.0.D-20110113045118.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/2.2.0.D-20110113045118/org.eclipse.virgo.repository-sources-2.2.0.D-20110113045118.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/2.2.0.D-20101207150035/org.eclipse.virgo.util.common-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/2.2.0.D-20101207150035/org.eclipse.virgo.util.math-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.extensions.equinox-2.2.0.D-20101207145732.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090913205430/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090913205430.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/2.2.0.D-20101207150035/org.eclipse.virgo.util.io-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-2.2.0.D-20101207150035.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-3.0.0.D-20110201142541.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.D-20110201142541/org.eclipse.virgo.repository-sources-3.0.0.D-20110201142541.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.D-20110201141522/org.eclipse.virgo.util.osgi-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.D-20110201141522/org.eclipse.virgo.util.common-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.D-20110201141522/org.eclipse.virgo.util.math-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.D-20110201141222/org.eclipse.virgo.osgi.extensions.equinox-3.0.0.D-20110201141222.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090913205430/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090913205430.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.D-20110201141522/org.eclipse.virgo.util.io-sources-3.0.0.D-20110201141522.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-3.0.0.D-20110201141522.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.D-20110201141522/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.D-20110201141522.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.2.0.D-20101207145338/org.eclipse.virgo.teststubs.osgi-2.2.0.D-20101207145338.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-2.2.0.D-20110113044904.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/2.2.0.D-20110113044904/org.eclipse.virgo.medic.test-sources-2.2.0.D-20110113044904.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.D-20110201140958/org.eclipse.virgo.teststubs.osgi-3.0.0.D-20110201140958.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-3.0.0.D-20110201142122.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.D-20110201142122/org.eclipse.virgo.medic.test-sources-3.0.0.D-20110201142122.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-sources-1.0.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-3.3.0.v20101018.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20101018/org.eclipse.osgi.services-sources-3.3.0.v20101018.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse/equinox-event/1.2.100.v20101208/equinox-event-1.2.100.v20101208.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.userregion/ivy.xml b/org.eclipse.virgo.kernel.userregion/ivy.xml
index 85b109b6..9a786347 100644
--- a/org.eclipse.virgo.kernel.userregion/ivy.xml
+++ b/org.eclipse.virgo.kernel.userregion/ivy.xml
@@ -18,6 +18,7 @@
<dependency org="org.eclipse.virgo.medic" name='org.eclipse.virgo.medic' rev='${org.eclipse.virgo.medic}' conf='aspects, compile->runtime' />
<dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.test" rev="${org.eclipse.virgo.medic}" conf="test->runtime"/>
<dependency org="org.eclipse.osgi" name='org.eclipse.osgi' rev='${org.eclipse.osgi}' conf='compile->compile' />
+ <dependency org="org.eclipse" name="equinox-event" rev="${org.eclipse.equinox.event}"/>
<dependency org="org.slf4j" name='com.springsource.slf4j.api' rev='${org.slf4j}' conf='compile->runtime' />
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="latest.integration" conf="compile->compile"/>
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployer.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployer.java
index 7dda4a26..4c02d416 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployer.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployer.java
@@ -25,7 +25,7 @@ import org.eclipse.virgo.kernel.core.Shutdown;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.util.common.StringUtils;
diff --git a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployerTests.java b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployerTests.java
index c4ea92bc..d83b3bcb 100644
--- a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployerTests.java
+++ b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/InitialArtifactDeployerTests.java
@@ -31,7 +31,7 @@ import org.eclipse.virgo.kernel.core.Shutdown;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer.DeploymentOptions;
+import org.eclipse.virgo.kernel.deployer.core.DeploymentOptions;
import org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer;
import org.eclipse.virgo.kernel.userregion.internal.KernelStartedAwaiter;
import org.eclipse.virgo.medic.test.eventlog.MockEventLogger;
diff --git a/org.eclipse.virgo.kernel.userregion/template.mf b/org.eclipse.virgo.kernel.userregion/template.mf
index 08736486..749c9daf 100644
--- a/org.eclipse.virgo.kernel.userregion/template.mf
+++ b/org.eclipse.virgo.kernel.userregion/template.mf
@@ -18,6 +18,7 @@ Import-Template:
org.eclipse.osgi.*;version="0",
org.osgi.framework.*;version="0",
org.osgi.service.*;version="0",
+ org.osgi.util.*;version="0",
org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}"
Bundle-Activator: org.eclipse.virgo.kernel.userregion.internal.Activator

Back to the top