THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
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.