Hi Stephan, I've read the thread again and don't see the issue here. You could just do:
public class MyJaxRsApplication extends JaxRsApplication { public MyJaxRsApplication(Context context) { super(context); attach(new MyAppConfig()); this.setGuard(...); // if needed this.setRoleChecker(...); // if needed } } Best regards, Jerome -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : lundi 16 juin 2008 11:14 À : discuss@restlet.tigris.org Objet : JAX-RS Application design Hi Jerome, hi Thierry until now the JAX-RS extension uses the class JaxRsApplication as main class, which derived from the org.restlet.Application. But after the question of sbyonge, how to use JAX-RS in a Servet container (http://restlet.tigris.org/servlets/ReadMsg?list=discuss&msgNo=5489) I'm not sure if this was not the best idea, because I have to subclass JaxRsApplication and override the createRoot() method with the need to call super.createMethod(). I'm subclassing the org.restlet.Application here, to re-use some of its services. Another possibility is to rename the JaxRsApplication to JaxRsRestlet, so that it is not an Application by name, and a developer implements an Applicaion itself to attach the JAX-RS ApplicationConfigs etc. to the JaxRsRestet. But than we have 2 Application interleaved, which seems also not good to me, and the subclass of the org.restlet.Application seems to be directly extended from org.restlet.Restlet. This could raise problems with double processing of virtual file extensions. Jerome, Thierry or some one else, it would be nice, if you could give a statement to the ideas behind the Application class in this context, especially if it is a non-good design, if the developer must call super.createRoot() in its own implementation of createRoot(). best regards Stephan