users@glassfish.java.net

Re: Multiple OSGI web services in same context

From: Sanjeeb Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 31 May 2010 21:09:18 +0530

No, currently it is not supported. I think with the dynamic registration
support of servlets, we should be able to do something here. Let's get
some feedback from GlassFish web technology experts. I have copied Rajiv
here who is the Servlet 3.0 spec lead.

Thanks,
Sahoo


glassfish_at_javadesktop.org wrote:
> Hi all (and Sahoo in particular!),
>
> I have been reading Sahoo's series of blogs on OSGI web applications, and have a few queries about how this may work in the real world. My main query is in regards to packaging and sharing web-contextpath
>
> It would seem that OSGI web applications need a Web-ContextPath in the manifest for Glassfish to recognise the bundle. Therefore it seems impossible to deploy an application consisting of multiple Web Service endpoints (or EJB endpoints for that matter) as a collection of OSGI bundles. This seems like quite a drawback to me!
>
> For example, say I have an application that provides common java code, JPA entities, etc and CoreServices as a web service, in the context myapp:
>
> <host>/myapp/
> - CoreServices
>
> Is it possible to add a new OSGI bundle that adds an additional Web Service endpoint to myapp, sharing existing sessions/resources/JPA Entities/etc available in myapp? You would then see the following Web Services
>
> <host>/myapp/
> - CoreServices
> - ExtendedServices
>
> As far as I can tell, this is not possible? Does it seem to be a valid use case?
>
> Furthermore, with the programmatic registration of servlets and such this same idea could also be extended to web applications that do support a UI. It would seem to be a similar (if not identical) approach that is being taken by Spring Slices.
>
> Do I have the wrong idea here? It is causing me some confusion!
>
> Cheers
> Cameron
> [Message sent by forum member 'cameronr']
>
> http://forums.java.net/jive/thread.jspa?messageID=472102
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>