Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
public class MySession extends WebSession {
   public MySession(WebApplicationRequest applicationrequest) {
      super(applicationrequest);
   }
   private String myAttribute;
   // ... getters and setters
}

and override either of the following methods on your Application class:

Code Block

@Override
protectedpublic ISessionFactorySession getSessionFactory(newSession(Request request, Response response) {
   return return this.sessionFactorynew MySession(request);
}
public Session newSession() {
    return new MySession(WebApplication.this);
}

retreive the Session by

Code Block

MySession session = (MySession )WebSession.get();

Custom RequestCycles

Describe how to use custom request cycles.