• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to handle user sessions using EJB?

Chandrashekhar Kotekar
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am learning EJB and I want to build toy shopping cart appplication. I am stuck up at session management.
Can we use EJB for session management of users?
I want to develop simple website in which user enters his/her name, password and logs into the system.
After logging into the system, whatever action user performs like adding item into shopping cart or changing his own profile information etc. I want to log all those actions under the name of that particular user.

Can we do this using EJBs?

Till now I have developed an entity bean called User and one statuful bean called LogInBean. I am able to force user to login, logout with these two beans. But now problem is, how to check which action has been performed by which user?

In EJB container there might be multiple beans present at a time. So does EJB container handles all this mapping?
Does anyone knows some book or tutorial which explains all these things?

Many thanks,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic