tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Holme <rho...@roadrunner.com>
Subject Tomcat 6 on Linux - session - DB connections and other shared resources
Date Sun, 01 Feb 2009 22:55:16 GMT
I have a few web applications being moved to tomcat. They all share some
commonality - I use Firebird not MySQL; I built my own ConnectionManager
long ago; and all three have an Application wide bean for shared
resources. Each user has a "UserInfo" bean (whether or not they log in
is important and can be found, but all functions require the common
resources and it is a VERY convenient place to put them) from which
hangs a DB-Connection bean and an Application bean. This enables
resources to be pooled (connections) and shared (Application).

Perhaps due to lack of knowledge, I try get the session's UserInfo
(getAttribute(..)) and on failure intstantiate a new one in hundreds of
servlets and/or JSP servlet codes sets (adding resources as needed).

I am sure that there must be some reasonable way to have all of the
servlets (no matter what form) go through some preliminary code, and
some post processing in order not to write the same code into hundreds
of places (and be sure the post processing routine which frees up
resources is ALWAYS executed).

I have tried to do this with filterchains but am failing so far - due to
ignorance or whatever. I realize that I could modify the source and do
it, but that seems counter productive as this seems like a fairly common
need.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message