Joe did you get a chance to look at implementing JDBCRealmhttp://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#JDBCRealm
Martin ______________________________________________ Place longwinded disclaimer here > Subject: Wish to use an independent class module in Tomcat > Date: Tue, 26 Jun 2012 11:07:33 -0400 > From: bcot...@dpscs.state.md.us > To: users@tomcat.apache.org > > My question may be covered by the Tomcat documentation and I am just > confused by all the new terminology. I have spent hours in reading and > still I am looking to an answer. > > We wish to have a class running on Tomcat that contains system wide info > and multiple database connections into DB2 on the mainframe. All other > apps runing on Tomcat will open an instance of this class to access the > static info and one of five open connections. Opening and closing > database connections is very slow and we wish to leave open the > connections and just reuse them as needed. > > We wrote the class and it runs ok. Yet to get it to run with an app, we > need to load the class jar file into the app and references in > context.xml and web.xml as listed in the documentation. But that defeats > the purpose of the global app because then there are multiple instances > of the class. > > We tried to insert a reference in <GlobalNamingResources> of server.xml. > It doesn't seem to work for us. > > Or are we off base with this design? Is app to app communication > allowed? Can I call a class from one app to another without first > loading the called class into the calling class? > > I am using NetBeans IDE 7.1.1, Apache Tomcat 7.0.22 and Java 6.23 > (build 1.6.0_23-b05). Java 7 is not an option in our shop yet because > we are supporting a commercial package that breaks when run under Java > 7. > > I would appreciate if the group could point me to the correct > documentation to do what we are looking for, and perhaps a translation > of the Tomcat specific terminology and jargon. > > Thanks > > Joe > > >