I'm looking for a way to set the socketTimeout parameter when using the OData
extension. I tried setting the parameter through the Client object obtained
through the ClientResource:
Client client = (Client) cr.getNext();
client.setContext(new Context());
client.getContext().getParameters().add("socketTimeout", "1");
by overriding org.restlet.ext.odata.Service.createResource(), but it seems the
Service constructor has already created the Client instance in the constructor
so this parameter has no effect.
I've also tried setting and modifying the current Context before even creating
the Service instance:
Context.setCurrent(new Context());
Context.getCurrent().getParameters().add("socketTimeout", "1");
but that's not working either
Is there a way to do this without having to modify the
org.restlet.ext.odata.Service constructor where I guess I would pass an
appropriate Context object at the time of instantiation?
Thanks,
Jeremy
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2916968