Answering my own question, I *think* the log message means one should do this when setting up the standalone server:

restletComponent = new Component();
restletComponent.getServers().add(Protocol.HTTP, 8182);
Context context = restletComponent .getContext().createChildContext(); <<<<<<<<< diff this
restletComponent.getDefaultHost().attach(new MyApplication(context));

instead of (as in the tutorial) this:

restletComponent = new Component();
restletComponent.getServers().add(Protocol.HTTP, 8182);
Context context = restletComponent .getContext (); <<<<<<<<<< diff this
restletComponent.getDefaultHost().attach(new MyApplication(context));


Can someone please confirm this?

Thanks.

On Sep 29, 2008, at 10:07 AM, Mark Petrovic wrote:

Good day.

I've been following the "first resource" example as I teach myself restlet 1.1 programming, in the context of using the simple standalone server:

http://www.restlet.org/documentation/1.1/firstSteps

However, doing so in the 1.1-RC2 release leads to what I assume are new deprecation-like messages

Sep 29, 2008 9:48:44 AM com.noelios.restlet.Engine fireContextChanged
SEVERE: For security reasons, don't pass the component context to child Restlets anymore. Use the Context#createChildContext() method instead.class com.noelios.restlet.application.TunnelFilter

Can someone illustrate this new recommendation with a simple code example?


Thanks.

Reply via email to