servletbridge and org.osgi.framework.system.packages.extra [message #1222460] |
Fri, 20 December 2013 08:30  |
Eclipse User |
|
|
|
Hi,
I wonder if the property org.osgi.framework.system.packages.extra can be
used in a servletbridge WAR to provide javax.servlet to the OSGi
container without using the servletbridge.extensionbundle. This would
simplify WAR builds because the extensionbundle would not have to be
added to the config.
I've added the last line to WEB-INF/launch.ini:
----
osgi.*=@null
org.osgi.*=@null
eclipse.*=@null
osgi.parentClassloader=app
osgi.contextClassLoaderParent=app
org.osgi.framework.system.packages.extra=javax.servlet
----
but that doesn't work. Am I missing something or is this approach not
going to work at all?
Thanks,
Ralf
|
|
|
|
Re: servletbridge and org.osgi.framework.system.packages.extra [message #1228294 is a reply to message #1222473] |
Mon, 06 January 2014 17:27   |
Eclipse User |
|
|
|
Sorry, I've lost sight of this, but I'd like to follow-up.
On 20.12.2013 15:14, Thomas Watson wrote:
> If you don't have an extension bundle I would have expected the method
> org.eclipse.equinox.servletbridge.FrameworkLauncher.deployExtensionBundle(File)
> to create one automatically for you.
The extensionbundle is created, but unless it's listed in the
config.ini, it won't be installed. My naive idea was that if the
packages I need are specified in the packages.extra property, the
extension bundle would not be needed anymore.
The problem with the extensionbundle is that it is not added to the
config.ini/bundles.info by build tools (because they don't know about
this thing) and it has to be added manually later.
> Would you be able to tell at runtime if the system bundle is exporting
> the packages you are specifying?
I've enabled the equinox console, and indeed the system bundle exports
the extra packages. I found that I have to add explicit version numbers
to the packages.extra property to satisfy my application bundle's
imports, now it's starting. However, the servletbridge bundle doesn't
start whithout the extensionbundle because of:
osgi> start 6
gogo: BundleException: Could not resolve module:
org.eclipse.equinox.http.servletbridge [6]
Unresolved requirement: osgi.wiring.package;
filter:="(&(osgi.wiring.package=org.eclipse.equinox.servletbridge)(version>=1.0.0))"
So I guess my question comes down to: why is the extensionbundle needed
at all, and is there a way to do without?
Thanks,
Ralf
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04481 seconds