Putting a database connection into each session is a very bad idea. If you get 10 users with open sessions, this means you'll have 10 open, idle database connections most of the time. If you have 20 sessions...I'll put it this way -- I have an application that has been running for months with tons of users, and it has never gone above 3 database connections in its pool. This keeps the stress on the application AND the database nice and low.
Mr. Everman is right -- you might want to consider the application scope, and also be careful with your synchronization logic. fillup On 5/24/02 8:03 AM, "Eric Everman" <[EMAIL PROTECTED]> wrote: > If the connection (or other object) is to be shared by the entire > application, use the application scope. As always, you must be aware of > threading issues because any JSP or servlet can access these objects at any > time. > > Eric > > At 08:11 AM 5/24/2002, you wrote: >> Hi, >> >> Does it must use JavaBeans in order to use session among several jsp >> files? Is there any simpler solution? >> >> I want to maintain a persistent database connection in all jsp files. >> For example: >> >> "Create a database object in first jsp file and retrieve it in other jsp >> files" >> >> Regards, >> >> Mauricio Lin >> >> -- >> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>