Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » The Missing HttpService
The Missing HttpService [message #671650] Wed, 18 May 2011 15:06 Go to next message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
How is it that Virgo is a web server but doesn't provide an OSGi HttpService? It was quite a shock to find that there isn't one and that the mentions of it I've found on the web are all along the lines of, "There isn't one, there won't be one, just figure out how to install one yourself."

Really? Really??? Is that still how things stand with Virgo and HttpService? If so, where should I be looking for how to get an HttpService?
Re: The Missing HttpService [message #671715 is a reply to message #671650] Wed, 18 May 2011 19:05 Go to previous messageGo to next message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
After some searching, it seems the options are something like 1) use Virgo Jetty Server, which is still experimental, and still have to install the Jetty HttpService bundle yourself, 2) start with the Virgo Kernel and install all of Jetty, including the HttpService, yourself, or 3) start with the Virgo Kernel and install the Equinox http bundle. Do those sound right? I tried 3), but it complains that Import-Package: org.osgi.service.log is unavailable. The Equinox log bundle also requires this package, and I can't figure out where to find it. Any help? Is there another forum/mailing list I should be posting to? This place seems pretty dead.
Re: The Missing HttpService [message #671782 is a reply to message #671715] Thu, 19 May 2011 01:02 Go to previous messageGo to next message
rshelley  is currently offline rshelley Friend
Messages: 59
Registered: April 2010
Member
Checkout the downloads page:

http://www.eclipse.org/virgo/download/

There's a "Virgo Webserver" that comes with Tomcat. That's what I'm using.
Re: The Missing HttpService [message #671796 is a reply to message #671782] Thu, 19 May 2011 03:02 Go to previous messageGo to next message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
Yes, the Virgo Web Server uses Tomcat but doesn't provide an OSGi HttpService, as per my original post in this thread. It's kind of hard to imagine that a web server based on Tomcat doesn't provide a service to let you register servlets, but it doesn't.
Re: The Missing HttpService [message #672107 is a reply to message #671796] Thu, 19 May 2011 22:28 Go to previous messageGo to next message
rshelley  is currently offline rshelley Friend
Messages: 59
Registered: April 2010
Member
Virgo doesn't directly give you a servlet container, it does it through Tomcat. So to get a servlet running you need to deploy a WAR that contains your servlet.
Re: The Missing HttpService [message #672285 is a reply to message #672107] Fri, 20 May 2011 14:27 Go to previous messageGo to next message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
Yes, that's true when you don't have an HttpService, but the point is that sometimes you just want to register a servlet when a bundle is installed, and that's what the HttpService is for.
Re: The Missing HttpService [message #672349 is a reply to message #672285] Fri, 20 May 2011 19:01 Go to previous messageGo to next message
rshelley  is currently offline rshelley Friend
Messages: 59
Registered: April 2010
Member
I've been working on something like that with Virgo and RESTEasy... not quite there yet though.
Re: The Missing HttpService [message #672383 is a reply to message #672349] Fri, 20 May 2011 21:29 Go to previous messageGo to next message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
I'm a fingernail away from having a setup where I can drop in a bundle that contains a Jersey app configured with Spring such that the Spring extender will start the application context, then another extender will deploy the Jersey app to the HttpService, but I'm running into classloader problems where Jersey, loaded in one bundle, doesn't recognize that instances created in another bundle are valid resource classes, because the @Path annotation class is different in the two bundles. I can't think of a way around this other than changing the way the resource classes get loaded, which is an undesirable option for my use case. It's quite maddening because I think if I could overcome this, I'd be done with my proof-of-concept for this situation, but instead I seem to be completely blocked.
Re: The Missing HttpService [message #672391 is a reply to message #672383] Fri, 20 May 2011 21:57 Go to previous messageGo to next message
rshelley  is currently offline rshelley Friend
Messages: 59
Registered: April 2010
Member
Can you just make Jersey an OSGI bundle exporting all of the packages and then the other bundles import the Jersey bundle packages so they all share the same Path annotation class? I had to do that with RESTEasy. I took the original library and OSGI-ified it by updating the manifest file.
Re: The Missing HttpService [message #672429 is a reply to message #672391] Sat, 21 May 2011 02:01 Go to previous message
Ryan  is currently offline Ryan Friend
Messages: 17
Registered: May 2011
Junior Member
Jersey is already an OSGi bundle (since version 1.4 I think?). I don't think that's the answer, and I think your CCE in that other thread is caused by this exact same problem, but I'll answer that one over there.
Previous Topic:Spring Bean Scope in Bundles
Next Topic:volatile variable to propagate event between bundles
Goto Forum:
  


Current Time: Thu Dec 26 10:55:37 GMT 2024

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

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

Back to the top