Hi Dig, This attribute should indeed have been set early by the Application itself. This bug is now fixed in SVN.
Let me know if the ConverterService now works as expected without you custom Finder. BTW, calling setConnectorService() is sufficient. Best regards, Jerome > -----Message d'origine----- > De : news [mailto:[EMAIL PROTECTED] De la part de Dig > Envoyé : vendredi 20 avril 2007 17:02 > À : [email protected] > Objet : ConnectorService implementation > > > Hi, > > What is the definitive technique for adding a > ConnectorService implementation to > an application? > > I have previously used my own ConnectorService implementation > and this used to > work but at some point it stopped working. I used to implement > getConnectorService() in my Application classes. I've also > found that simply > calling setConnectorService (as below) is not sufficient. > > Application myApplication = new MyApplication(container.getContext()); > myApplication.setConnectorService(myConnectorSevice); > > After rummaging around in the Restlet source for a while I > worked out that if I > used a custom Finder with a handle implementation like below then my > ConnectorService starts to work. > > public class myComponentFinder extends Finder { > public void handle(Request request, Response response) { > // next two lines copied from a Restlet source file > request.getAttributes().put(Application.KEY, application); > response.getAttributes().put(Application.KEY, application); > super.handle(request, response); > } > } > > This workaround is not ideal but it does work. Is there a > bug? Am I doing > something wrong? > > Thanks in advance, > > Dig. > >

