Let me explain more whatI am trying to perform.

I'm trying to create the MyProtectedApplication describe in the oauth page of 
Restlet site 
http://wiki.restlet.org/docs_2.1/13-restlet/28-restlet/392-restlet.html

This is the code :

public class MyProtectedApplication extends Application{

  public synchronized Restlet createInboundRoot(){
    Router root = new Router(getContext());
    OAuthAuthorizer auth = new OAuthAuthorizer("yourServerValidateURI", 
"yourServerAuthURI);
    List <Roles> roles = new ArrayList <Role> ();
    roles.add(new Role("status", null));
    auth.addAuthorizedRoles(roles);
    auth.setNext(MyResource.class);
    root.attachRoute("/status", auth);
  }
}

My question is how can I inject MyResource into MyProtectedApplication knowing 
that MyResource also have a Dao Bean, which in my case is null.

I'm using Spring, Restlet 2.1, Restlet Oauth extension
and hibernate 3

Thank for you answer

Best regards


Thierry LAU

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2993160

Reply via email to