Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-10-17 07:25:53 -0400
committerGlyn Normington2011-10-17 07:25:53 -0400
commit7c7c26987a56cbd812eaa098a513d0be211636a6 (patch)
treee1ffb692b5df7b272adf9f72e4ccefd463c5147b
parenteb755392828f2ee66b107abdd4c52ceb88bfda3c (diff)
downloadorg.eclipse.virgo.kernel-7c7c26987a56cbd812eaa098a513d0be211636a6.tar.gz
org.eclipse.virgo.kernel-7c7c26987a56cbd812eaa098a513d0be211636a6.tar.xz
org.eclipse.virgo.kernel-7c7c26987a56cbd812eaa098a513d0be211636a6.zip
bug 360965: introduce OsgiApplicationContextCreator for user region
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelOsgiApplicationContextCreator.java36
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/resources/META-INF/spring/extender/kernel-dmfragment-context.xml2
2 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelOsgiApplicationContextCreator.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelOsgiApplicationContextCreator.java
new file mode 100644
index 00000000..c4724b46
--- /dev/null
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelOsgiApplicationContextCreator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext;
+import org.springframework.osgi.extender.support.DefaultOsgiApplicationContextCreator;
+
+/**
+ * {@link KernelOsgiApplicationContextCreator} creates user region application contexts.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * Thread safe.
+ */
+final class KernelOsgiApplicationContextCreator extends DefaultOsgiApplicationContextCreator {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DelegatedExecutionOsgiBundleApplicationContext createApplicationContext(BundleContext bundleContext) throws Exception {
+ DelegatedExecutionOsgiBundleApplicationContext applicationContext = super.createApplicationContext(bundleContext);
+ return applicationContext;
+ }
+
+}
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 1d1a1dff..090fb809 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
@@ -35,5 +35,7 @@
<bean id="serviceProxyRetryDisabler" class="org.eclipse.virgo.kernel.dmfragment.internal.ServiceProxyRetryDisablingBundleListener">
<constructor-arg ref="bundleContext"/>
</bean>
+
+ <bean id="applicationContextCreator" class="org.eclipse.virgo.kernel.dmfragment.internal.KernelOsgiApplicationContextCreator" />
</beans>

Back to the top