Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Kapukaranov2011-01-28 13:17:45 -0500
committerBorislav Kapukaranov2011-01-28 13:17:45 -0500
commitdd712f40db92a3256d908435f6b310672ba80fbc (patch)
tree6f4f53e1b089c9abf840ec45d30358dceac2af55
parent060401af2bbbee65fa7902b8b9e883f3a71f06dd (diff)
downloadorg.eclipse.virgo.kernel-dd712f40db92a3256d908435f6b310672ba80fbc.tar.gz
org.eclipse.virgo.kernel-dd712f40db92a3256d908435f6b310672ba80fbc.tar.xz
org.eclipse.virgo.kernel-dd712f40db92a3256d908435f6b310672ba80fbc.zip
bug330506 Fixed the severe failure when deploying fragments of the
system bundle. Now deployment of such artifacts is forbidden.
-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/resources/bug330506.parbin0 -> 1194 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java18
-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
25 files changed, 857 insertions, 833 deletions
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/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/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 c793e19e..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
@@ -66,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;
@@ -226,6 +228,22 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
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}
*/
diff --git a/org.eclipse.virgo.kernel.dmfragment/.classpath b/org.eclipse.virgo.kernel.dmfragment/.classpath
index 7607272d..16263f41 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-20110128105114/org.eclipse.virgo.medic-2.2.0.D-20110128105114.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/2.2.0.D-20110128105114/org.eclipse.virgo.medic-2.2.0.D-20110128105114.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.*

Back to the top