• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet and stateful session bean maintain user session(C app calls Java servlet more than once)

 
nis siv
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One C app(same user multiple times)is calling a servlet,this sevlet will call stateful session bean (EJB3).
need to save the results from the DB operatins in session.
How can I maintain each user session in this scenario.
same user may send more than one requests while finalizing the transaction needs to fetch all these details from the session ,save to DB.
send a response to C app too.

How can I track the each user session from the C app.

please help me with sample code

Thanks in advance
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nis,
Welcome to JavaRanch!

This sounds like a design problem. When you say you have a C app that calls a servlet, I assume you mean a URL that calls a servlet? The only way for that servlet to remember who you are is to pass credentials with the URL request. Such as a cookie or user id. (watch out for security with both of these - especially the later.)
 
nis siv
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne,


Is it possible to track the usersession by using stateful session beans ?



Thanks,

nis
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!