Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugues Malphettes2010-03-07 08:29:32 +0000
committerHugues Malphettes2010-03-07 08:29:32 +0000
commitfb1befb69d337be568977f2df999fd37d9139893 (patch)
tree21f28d2ebb91fe1ea960efd54356bd84757c9da4
parente8d649bac59abc225f0caa2bbd01725f634528a3 (diff)
downloadorg.eclipse.jetty.project-fb1befb69d337be568977f2df999fd37d9139893.tar.gz
org.eclipse.jetty.project-fb1befb69d337be568977f2df999fd37d9139893.tar.xz
org.eclipse.jetty.project-fb1befb69d337be568977f2df999fd37d9139893.zip
compatibility with spring-DM's webmvc
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1364 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/WebappRegistrationHelper.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/WebappRegistrationHelper.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/WebappRegistrationHelper.java
index 096cf54bf3..b33417efb9 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/WebappRegistrationHelper.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/internal/webapp/WebappRegistrationHelper.java
@@ -779,6 +779,14 @@ public class WebappRegistrationHelper
{
// rfc66
wah.setAttribute(OSGiWebappConstants.RFC66_OSGI_BUNDLE_CONTEXT,contributor.getBundleContext());
+
+ //spring-dm-1.2.1 looks for the BundleContext as a different attribute.
+ //not a spec... but if we want to support
+ //org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
+ //then we need to do this to:
+ wah.setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(),
+ contributor.getBundleContext());
+
}
/**
@@ -842,6 +850,12 @@ public class WebappRegistrationHelper
// rfc-66:
context.setAttribute(OSGiWebappConstants.RFC66_OSGI_BUNDLE_CONTEXT,bundle.getBundleContext());
+ //spring-dm-1.2.1 looks for the BundleContext as a different attribute.
+ //not a spec... but if we want to support
+ //org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext
+ //then we need to do this to:
+ context.setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(),
+ bundle.getBundleContext());
return context;
}
catch (FileNotFoundException e)

Back to the top