Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » equinox http with whiteboard model?
equinox http with whiteboard model? [message #80423] Mon, 08 January 2007 18:46 Go to next message
John J. Barton is currently offline John J. BartonFriend
Messages: 311
Registered: July 2009
Senior Member
I'm trying to sip on the osgi kool-aid by using the whiteboard model
for HTTP servlets:
http://www.knopflerfish.org/osgi_service_tutorial.html#white
I have my servlets registering and now I need a server to run them.

I guess the way to proceed is to create an http.whiteboard plugin
that tracks the servlets then uses an existing server to run them. For
example that server could be org.eclipse.equinox.http.

Any hints or suggestions...like it already exists or won't be a good idea?

Thanks,
John.
Re: equinox http with whiteboard model? [message #80494 is a reply to message #80423] Tue, 09 January 2007 02:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

Hi John,

That's a good tutorial any I'd be interested to hear your experience running
it on Equinox.
For what you're trying it sounds like org.eclipse.equinox.http should be
fine.

If after you decide to experiment with your own servlets one thing to keep
in mind is that it supports Servlet 2.1 only.
If you're using Servlet 2.3 or higher functionaility you should use the
Jetty based implementation (e.g.org.eclipse.equinox.http.jetty)
There's more info here --
http://www.eclipse.org/equinox/server/http_in_equinox.php

-Simon

"JOHN J. BARTON" <johnjbarton@johnjbarton.com> wrote in message
news:enu3j5$7rg$1@utils.eclipse.org...
> I'm trying to sip on the osgi kool-aid by using the whiteboard model
> for HTTP servlets:
> http://www.knopflerfish.org/osgi_service_tutorial.html#white
> I have my servlets registering and now I need a server to run them.
>
> I guess the way to proceed is to create an http.whiteboard plugin
> that tracks the servlets then uses an existing server to run them. For
> example that server could be org.eclipse.equinox.http.
>
> Any hints or suggestions...like it already exists or won't be a good idea?
>
> Thanks,
> John.
Re: equinox http with whiteboard model? [message #80630 is a reply to message #80494] Wed, 10 January 2007 21:23 Go to previous message
John J. Barton is currently offline John J. BartonFriend
Messages: 311
Registered: July 2009
Senior Member
Hi Simon. Here's my experience:

- registering services was pretty easy once I wrote a user interface to
see what was going in. I guess Equinox Framework console serves that
purpose for you but I am running under eclipse. Really a UI is critical
for these kind of non-determinisitic APIs.

- whiteboard was also easy because the tutorial was fairly clear. Main
confusion was trying to distinguish ServiceTracker from ServiceListener.
Now I think the ServiceTracker should not be in the tutorial. The
whiteboard example is really two listeners, one for services (content in
the tut, servlets for me) and one for service consumers (display in the
tut, Http in my case). The whiteboard is listening for both, sitting
in the middle forwarding service registrations in the framework to
service consumers. One small class is the whole adapter plugin.

- The tutorial was missing one key aspect: modification. If I register
services I have to keep a list of them in my code so that I can tell
which ones to unregister if my config changes. This accounting work is
an unexpected drawback.

- Class loading screwed me once again as I mention on the other thread.

- Once I got my configuration update logic correct, I discovered that
"something else" was also listening for servlet registrations. So when
I register my servlet I get two ServiceEvents. Or something, frankly I
don't know what is going on. My code seems all ok and after a few hours
of looking at framework listener code I was not any closer to solving
it. So I just decided to ignore it.

John.

Simon Kaegi wrote:
> Hi John,
>
> That's a good tutorial any I'd be interested to hear your experience running
> it on Equinox.
> For what you're trying it sounds like org.eclipse.equinox.http should be
> fine.
>
> If after you decide to experiment with your own servlets one thing to keep
> in mind is that it supports Servlet 2.1 only.
> If you're using Servlet 2.3 or higher functionaility you should use the
> Jetty based implementation (e.g.org.eclipse.equinox.http.jetty)
> There's more info here --
> http://www.eclipse.org/equinox/server/http_in_equinox.php
>
> -Simon
>
> "JOHN J. BARTON" <johnjbarton@johnjbarton.com> wrote in message
> news:enu3j5$7rg$1@utils.eclipse.org...
>
>>I'm trying to sip on the osgi kool-aid by using the whiteboard model
>>for HTTP servlets:
>> http://www.knopflerfish.org/osgi_service_tutorial.html#white
>>I have my servlets registering and now I need a server to run them.
>>
>>I guess the way to proceed is to create an http.whiteboard plugin
>>that tracks the servlets then uses an existing server to run them. For
>>example that server could be org.eclipse.equinox.http.
>>
>>Any hints or suggestions...like it already exists or won't be a good idea?
>>
>>Thanks,
>>John.
>
>
>
Previous Topic:Embedding Equinox in a Standalone Application
Next Topic:bundle class loaders caching issues?
Goto Forum:
  


Current Time: Thu Apr 25 14:22:15 GMT 2024

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

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

Back to the top