Re: ApplicationConfig and OSGi

  • From: Reto Bachmann-Gmür <reto@...>
  • To: users@...
  • Subject: Re: ApplicationConfig and OSGi
  • Date: Thu, 24 Jul 2008 16:26:34 +0200
  • Mailing-list: contact users-help@...; run by ezmlm

Paul Sandoz wrote:
Hi Reto,

Reto Bachmann-Gmür wrote:
Hello

Trying to use jax-rs in an OSGi environment we imagine bundles providing web applications by exposing instances of ApplicationConfig. However the jsr311 implementation residing in another bundle cannot instantiate the classes of the bundle providing the application.


I know very little about the technical aspects of OSGi but would not the same problem occur for a web application bundle referring to a servlet class in the web.xml that needs to be instantiated by servlet implementation residing in a different bundle?
you're right the problem would be the same, the OSGi approach would not be to load classes according to a web.xml but having bundles registering their servlets to the OSGi registry or to a service. We don't care about servlets, but would like OSGi bundles to be able to register jsr-311 applications and have another bundle (or bundles) rendering this accessible over the web.

OSGi and afaict JSR277 do not allow a bundle to create instances of classes for which they do not import the respective packages.


And also for Web service endpoints, EJBs and JAXB beans when unmarshalling.
could be.
Could ApplicationConfig be fixed to return factories instead of instances of Class?

To allow the jsr311 implementation to create instances of classes provided by other bundles and access the annotations in the class without creating unnecessary instances the factories returned by Application should provide a method to return an instance as well as one to return the Class.

reto

Attachment: signature.asc
Description: OpenPGP digital signature



ApplicationConfig and OSGi

Reto Bachmann-Gmür 07/24/2008

Re: ApplicationConfig and OSGi

Paul Sandoz 07/24/2008

Re: ApplicationConfig and OSGi

Bill Burke 07/24/2008

Re: ApplicationConfig and OSGi

Reto Bachmann-Gmür 07/28/2008

Re: ApplicationConfig and OSGi

Reto Bachmann-Gmür 07/24/2008
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close