Detecting Comet capabilities

View: New views
2 Messages — Rating Filter:   Alert me  

Detecting Comet capabilities

by Eirik Bjørsnøs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello there,

What's the "good" way of checking if your app is running in a Comet
friendly environment?

I recently added Comet features to a product I'm working on. Although
my default way of distribution will be as a Jetty bundle, I can't
really control the run time environment. Some customers will take the
war and run it in their Tomcat or some other container.

So I need a way to check that we're in Cometland. (We're running on
Jetty and the request comes in through a SelectChannelConnector). If
that's not the case I can simply disable the features that depend on
Comet support.

Running with a debugger I see that I could probably figure this out
peeking at the HttpServletRequest with some reflection, but that seems
a bit brittle. And I don't really want to add dependencies to Jetty
implementation classes in my webapp.

What I'd like to do is just to check some request attribute or
something as simple as that.

Any ideas?

Eirik.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Detecting Comet capabilities

by Eirik Bjørsnøs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ouch, outsmarted by Gmail!

That one was meant for Jetty, not Plexus.

Eirik :-)

On Thu, Apr 17, 2008 at 9:10 PM, Eirik Bjørsnøs <eirbjo@...> wrote:

> Hello there,
>
>  What's the "good" way of checking if your app is running in a Comet
>  friendly environment?
>
>  I recently added Comet features to a product I'm working on. Although
>  my default way of distribution will be as a Jetty bundle, I can't
>  really control the run time environment. Some customers will take the
>  war and run it in their Tomcat or some other container.
>
>  So I need a way to check that we're in Cometland. (We're running on
>  Jetty and the request comes in through a SelectChannelConnector). If
>  that's not the case I can simply disable the features that depend on
>  Comet support.
>
>  Running with a debugger I see that I could probably figure this out
>  peeking at the HttpServletRequest with some reflection, but that seems
>  a bit brittle. And I don't really want to add dependencies to Jetty
>  implementation classes in my webapp.
>
>  What I'd like to do is just to check some request attribute or
>  something as simple as that.
>
>  Any ideas?
>
>  Eirik.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email