You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using a different platform then gwt (e.g. jse) getHelpedParameters() returns an empty Series.
This is because there is an empty Context in the TemplateDispatcher.
A working patch is to set the ClientResource Context on the Creation of the TemplateDispatcher so add dispatcher.setContext(getContext()); just after the dispatcher instantiation in the org.restlet.resource.ClientResource.createNext() method.
Hello,
thanks a lot for the patch which has been applied to the master and 2.1 branch.
However, we should add a little bit more details here.
When defining a server side application, we usually create an instance of Component.
The Component defines a set of server connectors (usually http, https), and client connectors (http, file, clap, etc).
A Component shares a single instance of all these connectors and allow all client calls issued from the application and theirs resources to be handled by these few connectors.
When instantiating ClientResource outside a Component, each new instance of ClientResource embeds its own client connector, which, in case, of the internal connector leads to create several pools of threads, etc. This is not optimized.
It's better to instantiate the client connector once and call ClientResource#setNext for each new instance of ClientResource.
By doing so, you can set up the client connector context and parameters, instead of setting up the clientresource context and shares this with the client connector.
However, we recognize this is quite unusual, and not very well documented...
I've entered an issue (#608) in order to magically create this underlying Component.
Activity
Fixed Client context parameters (issue restlet#606)
Merge pull request #607 from alepac/patch-1
thboileau commentedon Jun 13, 2012
Hello,
thanks a lot for the patch which has been applied to the master and 2.1 branch.
However, we should add a little bit more details here.
When defining a server side application, we usually create an instance of Component.
The Component defines a set of server connectors (usually http, https), and client connectors (http, file, clap, etc).
A Component shares a single instance of all these connectors and allow all client calls issued from the application and theirs resources to be handled by these few connectors.
When instantiating ClientResource outside a Component, each new instance of ClientResource embeds its own client connector, which, in case, of the internal connector leads to create several pools of threads, etc. This is not optimized.
It's better to instantiate the client connector once and call ClientResource#setNext for each new instance of ClientResource.
By doing so, you can set up the client connector context and parameters, instead of setting up the clientresource context and shares this with the client connector.
However, we recognize this is quite unusual, and not very well documented...
I've entered an issue (#608) in order to magically create this underlying Component.