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.