• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple connections

 
Jay Faluk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have an applet creating a jdbc connection in the init function. what happens when multiple uses login? is a separate connection object created for each of them or do i have to create threads and a connection for each?
also, if i open a dialog box, and need the connection object again, is the best way to do it is to pass the connection object to the dialog class.
thanks all.
 
Fred Abbot
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you willonly have one connection as the init is only performed once
try connection pooling(servlets)
 
Jay Faluk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred, thanks, what if i remove it from the init and put it in another function - say a button clicked, then is there a new connection every time a new person logs in.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic