• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom session management

 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any way out to have our own session management technique expect from present available session management options...??? interview hit me again
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can create your own "session" management approach, keeping in mind the following:

1. Unique ID - you must create a unique ID which gets carried through all client interactions. While the obvious approach is to use Cookies to carry the unique Id, if the client has cookies turned off you can use hidden values in forms.

2. Serializability - your class implementing your sessions should be serializable for ease of storage on disk or database.

3. Life cycle management - you will need a way to clean up after a session life is ended.

Bill
 
Kaustubh G Sharma
Ranch Hand
Posts: 1283
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks william..I'll try it for sure
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic