Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How should one use a ServletContextListener when running under serverside OSGI?
How should one use a ServletContextListener when running under serverside OSGI? [message #59873] Mon, 06 February 2006 19:29 Go to next message
Jim DAnjou is currently offline Jim DAnjouFriend
Messages: 25
Registered: July 2009
Junior Member
I am wondering how to accomplish the equivalent of a
ServletContextListener when running under serverside OSGI? The context
listener class needs to be visible in the web container to avoid a class
not found exception. However when running under serverside OSGI the
listener class will likely have dependencies on classes that reside in
plug-in jars managed by OSGI. I have such a situation. The listener class
can't be in an OSGI plug-in and it dependencies can't NOT be in an OSGI
plugin. Thanks.

Jim D'Anjou
Re: How should one use a ServletContextListener when running under serverside OSGI? [message #59902 is a reply to message #59873] Mon, 06 February 2006 21:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

Hi Jim,

With the current bridge (and the current OSGi HttpService) you can't.
What's required here is a new spec.

An API to support this stuff (listeners and filters) dynamically is
definitely still a work in progress. I'm experimenting with re-alignment
with something resembling a java-binding of the Servlet API deployment
descriptor. For implementation, which is perhaps what you're asking, I've
been thinking that a similar approach to the ServletBridge could be used to
bridge and "simulate" the various listeners (and filters) although I haven't
had a chance to experiment yet.

-Simon


A new specification
----- Original Message -----
From: "Jim D'Anjou" <danjou@us.ibm.com>
Newsgroups: eclipse.technology.equinox
Sent: Monday, February 06, 2006 2:29 PM
Subject: How should one use a ServletContextListener when running under
serverside OSGI?


> I am wondering how to accomplish the equivalent of a
> ServletContextListener when running under serverside OSGI? The context
> listener class needs to be visible in the web container to avoid a class
> not found exception. However when running under serverside OSGI the
> listener class will likely have dependencies on classes that reside in
> plug-in jars managed by OSGI. I have such a situation. The listener class
> can't be in an OSGI plug-in and it dependencies can't NOT be in an OSGI
> plugin. Thanks.
>
> Jim D'Anjou
>
Re: How should one use a ServletContextListener when running under serverside OS [message #59921 is a reply to message #59902] Mon, 06 February 2006 22:16 Go to previous messageGo to next message
Jim DAnjou is currently offline Jim DAnjouFriend
Messages: 25
Registered: July 2009
Junior Member
I was not surprised at your reply, Simon. I would have been elated if you
had this worked out. We might be able to delegate to the servlet bundle's
Activator.start (and stop) methods though though they don't quite run in
the same sequence of a context listener's event event notification.

Jim
Re: How should one use a ServletContextListener when running under serverside OSGI? [message #59946 is a reply to message #59902] Tue, 07 February 2006 02:29 Go to previous messageGo to next message
Binyan is currently offline BinyanFriend
Messages: 23
Registered: July 2009
Junior Member
Has thought been given to simply creating a new service that is not OSGi
blessed, but does something like embed Tomcat? I'm really interested in
using the equinox technology on the server-side, but am I wrong in
thinking that it is a little under baked at this moment in time?

Binyan

Simon Kaegi wrote:
> Hi Jim,
>
> With the current bridge (and the current OSGi HttpService) you can't.
> What's required here is a new spec.
>
> An API to support this stuff (listeners and filters) dynamically is
> definitely still a work in progress. I'm experimenting with re-alignment
> with something resembling a java-binding of the Servlet API deployment
> descriptor. For implementation, which is perhaps what you're asking, I've
> been thinking that a similar approach to the ServletBridge could be used to
> bridge and "simulate" the various listeners (and filters) although I haven't
> had a chance to experiment yet.
>
> -Simon
>
>
> A new specification
> ----- Original Message -----
> From: "Jim D'Anjou" <danjou@us.ibm.com>
> Newsgroups: eclipse.technology.equinox
> Sent: Monday, February 06, 2006 2:29 PM
> Subject: How should one use a ServletContextListener when running under
> serverside OSGI?
>
>
>
>>I am wondering how to accomplish the equivalent of a
>>ServletContextListener when running under serverside OSGI? The context
>>listener class needs to be visible in the web container to avoid a class
>>not found exception. However when running under serverside OSGI the
>>listener class will likely have dependencies on classes that reside in
>>plug-in jars managed by OSGI. I have such a situation. The listener class
>>can't be in an OSGI plug-in and it dependencies can't NOT be in an OSGI
>>plugin. Thanks.
>>
>>Jim D'Anjou
>>
>
>
>
Re: How should one use a ServletContextListener when running under serverside OSGI? [message #59970 is a reply to message #59946] Tue, 07 February 2006 12:48 Go to previous message
Peter Neubauer is currently offline Peter NeubauerFriend
Messages: 7
Registered: July 2009
Junior Member
Hi,
we have been experimenting with using Wicket with OSGi and got quite
encouraging results. not sure it fits you but I think it might work out
nicely.
http://wiki.ops4j.org/dokuwiki/doku.php?id=pax:wicket

/peter
Binyan wrote:
> Has thought been given to simply creating a new service that is not OSGi
> blessed, but does something like embed Tomcat? I'm really interested in
> using the equinox technology on the server-side, but am I wrong in
> thinking that it is a little under baked at this moment in time?
>
> Binyan
>
> Simon Kaegi wrote:
>
>> Hi Jim,
>>
>> With the current bridge (and the current OSGi HttpService) you can't.
>> What's required here is a new spec.
>>
>> An API to support this stuff (listeners and filters) dynamically is
>> definitely still a work in progress. I'm experimenting with re-alignment
>> with something resembling a java-binding of the Servlet API deployment
>> descriptor. For implementation, which is perhaps what you're asking,
>> I've
>> been thinking that a similar approach to the ServletBridge could be
>> used to
>> bridge and "simulate" the various listeners (and filters) although I
>> haven't
>> had a chance to experiment yet.
>>
>> -Simon
>>
>>
>> A new specification
>> ----- Original Message ----- From: "Jim D'Anjou" <danjou@us.ibm.com>
>> Newsgroups: eclipse.technology.equinox
>> Sent: Monday, February 06, 2006 2:29 PM
>> Subject: How should one use a ServletContextListener when running under
>> serverside OSGI?
>>
>>
>>
>>> I am wondering how to accomplish the equivalent of a
>>> ServletContextListener when running under serverside OSGI? The context
>>> listener class needs to be visible in the web container to avoid a class
>>> not found exception. However when running under serverside OSGI the
>>> listener class will likely have dependencies on classes that reside in
>>> plug-in jars managed by OSGI. I have such a situation. The listener
>>> class
>>> can't be in an OSGI plug-in and it dependencies can't NOT be in an OSGI
>>> plugin. Thanks.
>>>
>>> Jim D'Anjou
>>>
>>
>>
>>
Previous Topic:How do you set dependencies on services?
Next Topic:use with tapestry/hivemind
Goto Forum:
  


Current Time: Sat Aug 17 22:28:59 GMT 2024

Powered by FUDForum. Page generated in 0.03938 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top