I have a design question I'm guessing someone has already tackled:
Description:
I'm developing an application that runs within Tomcat. All the JARs for
that application are in it's webapp/WEB-INF/lib, except for a few classes
that implement a Realm which referenced in server.xml. Because these
classes are referenced in server.xml, they need to be in
{catalina_home}/common/lib. The problem I have is that my Realm need to use
my database code, but my database JARs are defined in my webapp lib. I
could put everything in common/lib except that I'd like to be able to
control (start/stop/re-load) my application using the Tomcat manager.
Question:
How can my code in common/lib reference objects in webapp/lib? Do I have to
do this using JNDI by defining common interfaces in common/lib and returning
webapp/lib objects from my factories? Any guidances is appreciated.
Thanks,
-Mark