tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sangalee <>
Subject Re: bean scope
Date Sun, 03 Sep 2000 13:37:09 GMT
On Sun, 3 Sep 2000, Zsolt Koppany wrote:

The short answer is don't tie the database connection into the session,
but instead hold some kind of user id. Then using a connection pool,
obtain a database connection, so some db stuff, and release the connection
to the pool.

This way, your bean can stay in the "request" scope, meaning that it's
instantiated at the beginning of each page request, and lives only until
that request has been satisfied.

> My application has a top page where a user must login into a database.
> After the user logged in, it would be for me nice if I my application
> could you the JDBC connection everywhere (I mean all pages the user
> visit after he logged in), but I need a separated (not shared)
> connection for every user. Do I need "scope=session"?

View raw message