Re: SessionManager

Marco Leal <[email protected]>
Newsgroups gmane.comp.java.enhydra.general
Organization MobiComp
Message-ID <[email protected]>
Hi,

You have to rewrite the method createSessionManager(Config 
sessionMgrConfig) in your application class. This method is inherited 
from StandardApplication. Take a look at the API.

A very simple version could be (I didn't test this!):

protected SessionManager createSessionManager(Config sessionMgrConfig)
     throws ApplicationException {

     if (sessionMgrConfig == null) {
       sessionMgrConfig = new Config();
     }
     try {
       return new MySessionManager(this, sessionMgrConfig, logChannel);
     } catch (Exception except) {
       throw new ApplicationException(except);
     }
}

Note: MySessionManager extends StandardSessionManager.

Hope this gets you started.

Marco.

Joe Osburn wrote:
> Hi,
> 
> Could anyone tell me how I specify an alternative SessionManager for an
> application?  I couldn't find any documentation listing all the
> configuration options for an app (unless adminguide.pdf is it - I think it's
> missing a lot of fields though).  I'm planning on extending the existing
> session manager so calls to deleteSession() can be logged to my database.
> If anyone knows of a better way to handle the tracking of sessions via
> detecting when the session is deleted, please let me know.
> 
> Thanks!
> 
> --
> Joe Osburn
> Internet Exposure, Inc.
> http://www.iexposure.com
> [email protected]
> 
> Web Development - Web Marketing - ISP Services
> (612) 676-1946 x12
> 
> _______________________________________________
> Enhydra mailing list
> [email protected]
> http://www.enhydra.org/mailman/listinfo.cgi/enhydra
> 
> 

-- 
Marco Leal
MobiComp - Mobile Computing & Wireless Solutions
http://www.mobicomp.com/

"Enjoy your job, make lots of money, work within the law. Choose any two."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.