Cudabean
Apr 11th, 2002, 06:18 PM
Hi,
I think I can probably figure out to do this, but wanted some implementation opinions. I need to set up a 'secure' system that maintains a temporary connection to a database via a servlet. I think it would be a neat design where when a user succesfully logs on, a JDBC connection is created with a specified inactivity time-out. In this way several users could be logged on and can interact with the database independently.
How do I implement this?
I suppose one way to go would be to set up a session variable that has a connection, then when other classes, servlets and jsp's need to use the connection, they could consult the session variable based on the users "sessionid" or whatever they call it in the Servlet realm. I kind of like that because each session has a built in inactivity time-out.
Opinions?
Many Thanks,
cudabean
I think I can probably figure out to do this, but wanted some implementation opinions. I need to set up a 'secure' system that maintains a temporary connection to a database via a servlet. I think it would be a neat design where when a user succesfully logs on, a JDBC connection is created with a specified inactivity time-out. In this way several users could be logged on and can interact with the database independently.
How do I implement this?
I suppose one way to go would be to set up a session variable that has a connection, then when other classes, servlets and jsp's need to use the connection, they could consult the session variable based on the users "sessionid" or whatever they call it in the Servlet realm. I kind of like that because each session has a built in inactivity time-out.
Opinions?
Many Thanks,
cudabean