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: Thu, 26 Jun 2008 23:21:09 -0700 (PDT)

Hey thanks folks, the new stop method works perfectly. Servlet is up and
running with grizzly in osgi env



Jeanfrancois Arcand-2 wrote:
>
> Salut,
>
> I've filled:
>
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=175
>
> and fixed it. Mainly, I've added a ServletLauncher.stop() which
> internally invoke the SelectorThread.stopEndpoint(). I've uploaded a new
> grizzly-servlet-webcontainer-1.8.1-SNAPSHOT.jar here:
>
> http://download.java.net/maven/2/com/sun/grizzly/grizzly-servlet-webserver/1.8.1-SNAPSHOT/
>
> Download the one with the date 20080625 :-)
>
> I'm planning to propose a release of 1.8.0.1 tomorrow or Monday (Shing
> Wai added good fixes recently), so you should have an official release
> pretty soon.
>
> Let us know how it goes with OSGi...I've just didn't yet have time to
> play with the BundleActivator stuff yet :-)
>
> Thanks!
>
> -- Jeanfrancois
>
> Jeanfrancois Arcand wrote:
>> Salut,
>>
>> techi_amol wrote:
>>> Hi All,
>>>
>>> i am pretty new to grizzly. And we are evaluation the option of using
>>> grizzly in our osgi env. I am able to successfully run my servlet
>>> using the standalone mode of
>>> grizzly-servlet-webserver-1.8.0.jar.
>>> Now i want to the same in equinox OSGI env.
>>
>> Great!
>>
>>>
>>> The way i was planning to do it was to write a BundleActivator and
>>> call the
>>> ServletLauncher class from the Activator.start() method with the right
>>> parameters set to start the framework. However, if the osgi framework
>>> uninstalls my bundle or stops it i need to gracefully shutdown the
>>> grizzly
>>> framework. Whats the way to so that? Any sample code will be appreciated
>>
>> This is simple. For starting Grizzly, the ServletLaucher does:
>>
>> SelectorThread.listen() [1]
>>
>> To stop it, just invoke
>>
>> SelectorThread.stopEndpoint();
>>
>> Now if you want to re-use the ServletLaucher class as it is without
>> having to interact with the SelectorThread class, I can add a method on
>> that class, which is:
>>
>> ServletLauncher.stop()
>>
>> I suspect it will be easier for you, right? Let me know and I will add
>> it.
>>
>> Thanks!
>>
>> -- Jeanfrancois
>>
>> [1]
>> https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/standalone/StandaloneMainUtil.html
>>
>>
>>
>>
>>>
>>> cheers
>>> a.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>
> ---------------------------------------------------------------------
> 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-tp18142353p18148810.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.