• Post Reply Bookmark Topic Watch Topic
  • New Topic

session tracking in JSP  RSS feed

 
dasan t
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
i need a help. i don't know how to maintain
different session for different users in JSP.
sametime many users access the database. for that
create each user with new session and each session
can i create new connection for database is possible?? how i do that. pls help me with sample codings.i think same type of question asked by someone.
Thanks,
Jack Dasan.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could but, don't! Use connection pooling. When ever a client needs a connection, get it from the pool, use it imediately and return it to the pool. The cost of a single connection is too expensive to create one for each user. A good example of connection pooling servlet is at JavaExchange
[ February 18, 2002: Message edited by: Carl Trusiak ]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dasan,
JavaRanch has a Naming Policy Please read and follow.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!