• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the best way for session management in enterprise applications  RSS feed

 
sandhya mridul
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello...

we are planning out a design for an enterprise application to

be implemented using J2EE. We have thought of implementing the business logic using stateless session

beans. Hence the session management would be done on the web tier using servlet API.

Could you please help me understand the impact of this on scalability? As the number of users is large,

and state of each client would be saved in the session, will this load the server memory? Is there a

feasible solution for this?

thanks in advance...
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saving state anywhere is a challenge. Here are some possibilities:

1. In Java objects in memory
2. In server "session" storage
3. In a cookie
4. In hidden fields on the HTML page
5. In an XML data island on the page
6. Encoded on the URL
7. In temporary session storage on a database
8. On the real database of record

I describe the pros and cons of each near the bottom of this page.

But in short you have identified the issues correctly. How much memory can you afford to use? How much time can you afford to move data out of memory to something else? And one more - will a user appear to have the same state on any server in a cluster?

My current system keeps a very small amount of HTTP session data backed by WebSphere's session persistance to database for failover within the cluster. We write other important data - think of it like a bulky shopping cart - to the database in an "incomplete" status, then mark it "complete" when the user "saves" his work.

Any of those ideas help?
 
sandhya mridul
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Stan

thank u for ur reply... i'll need to explore the different options and come to a conclusion depending on the architectural issues that we have. scalability is one such issue.

thanks again...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!