Author: musachy
Date: Mon Aug 10 17:40:46 2009
New Revision: 802870
URL: http://svn.apache.org/viewvc?rev=802870&view=rev
Log:
Add a class loader interface (bundle based) to the ServletContext so it cann be
used by other plugins to lookup resources
Modified:
struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
Modified:
struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java?rev=802870&r1=802869&r2=802870&view=diff
==============================================================================
---
struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
(original)
+++
struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
Mon Aug 10 17:40:46 2009
@@ -71,6 +71,11 @@
bundleAccessor.setBundleContext(bundleContext);
bundleAccessor.setOsgiHost(osgiHost);
this.configuration = configuration;
+
+ //this class loader interface can be used by other plugins to lookup
resources
+ //from the bundles. A temporary class loader interface is set during
other configuration
+ //loading as well
+
servletContext.setAttribute(ClassLoaderInterface.CLASS_LOADER_INTERFACE, new
BundleClassLoaderInterface());
}
public synchronized void loadPackages() throws ConfigurationException {