Hello,
for security reasons, the component's context is not transmitted to its
children, having in mind, for example, that an application should not have
access to the component, then to the other applications.
In your case, you can, for example, have your own virtualHost that transmits
the component to each attached Restlet:
VirtualHost proxyHost = new VirtualHost(component.getContext()) {
@Override
public Route attach(String pathTemplate, Restlet target, int matchingMode) {
target.getContext().getAttributes().put("component", component);
return super.attach(pathTemplate, target, matchingMode);
}
};
Best regards,
Thierry Boileau
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2590153