users@grizzly.java.net

Re: Running grizzly-servlet-webserver-1.8.0.jar in nOSGI environment

From: techi_amol <techi_amol_at_yahoo.com>
Date: Fri, 27 Jun 2008 13:34:40 -0700 (PDT)

Hi,

Here is something more info.

I changed the packaging so now i deployed
grizzly-servlet-webserver_1.8.1.SNAPSHOT.jar as an independent osgi bundle,
and i modified my the Manifest my osgi archive to remove Bundle-Classpath
attribute and use "Import-Package: com.sun.grizzly.standalone.servlet" to
reference the ServletLauncher.
This works. I am able to deploy me war and test the servlet. But i really
want to understand why did this work

The GrizzlyClassloader does something different than the osgi's
BundleClassloader. Specially with regards to system packages. But what?

Does the above sentence even make sense?

cheers
a.




Jeanfrancois Arcand-2 wrote:
>
> Salut,
>
> techi_amol wrote:
>> Hi all,
>>
>> No rule change as far as i know. To make sure I checked using the
>> "packages"
>> command on the osgi prompt, it did recognize javax.management as a system
>> package. Below is the detail that the packages command printed out
>>
>> javax.management; version="0.0.0"<System Bundle [0]>
>> System Bundle [0] imports
>>
>> initial_at_reference:file:plugins/org.eclipse.update.configurator_3.2.100.v20070322.jar/
>> [15] imports
>>
>> Maybe you can try to reproduce this. I am running osgi using
>> org.eclipse.osgi_3.3.0.200704022148.jar. My dir structure looks like this
>> equinox-osgi-runtime
>> \configuration\config.ini
>> \plugins\org.eclipse.equinox.common_3.3.0.200704022148.jar
>> \plugins\org.eclipse.equinox.registry_3.3.0.v20070318.jar
>> \plugins\org.eclipse.osgi.services_3.1.100.200704022148.jar
>> \plugins\org.eclipse.update.configurator_3.2.100.v20070322.jar
>>
>>
>> ################################################
>> #############contents in the config.ini ##################
>> ################################################
>> #Eclipse Equinox Runtime Configuration File
>> osgi.bundles=./plugins/org.eclipse.equinox.common_at_2:start,
>> ./plugins/org.eclipse.update.configurator_at_3:start,
>> ./plugins/org.eclipse.equinox.registry_at_start,
>> ./plugins/org.eclipse.osgi.services_at_start
>> osgi.bundles.defaultStartLevel=4
>> eclipse.ignoreApp=true
>> # End of file marker - must be here
>> eof=eof
>>
>> Also i should mention this, the way i have created my osgi bundle is by
>> including the grizzly-servlet-webserver-1.8.0.jar inside the bundle
>> archive
>> and using Bundle-Classpath attribute in the manifest.
>
>
> OK I will try that. It's an holiday here so I will not be able to try it
> until next Tuesday. But your information help...Grizzly classloader is
> build using:
>
>> ClassLoader urlClassloader = new URLClassLoader(urls,
>> Thread.currentThread().getContextClassLoader());
>> Thread.currentThread().setContextClassLoader(urlClassloader);
>
> It looks like the ClassLoader starting the application doesn't have
> javax.management.* in its list. I guess it needs to be explicitly
> listed....that's really strange. If you add to the Bundle-Classpath the
> location of the jdk rt.jar, does it make a difference (it doesn't make
> any sense, but just to see...)
>
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>
>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>
>

-- 
View this message in context: http://www.nabble.com/Running-grizzly-servlet-webserver-1.8.0.jar-in-nOSGI-environment-tp18142353p18163339.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.