Hello Tomcat users, I have a need that I believe Tomcat's pluggable session manager facility can satisfy, but I am having trouble getting it configured.
BTW, I have googled and searched the mail archives on this topic and have not found anything useful yet. My application requires a modular architecture in which pluggable modules can be added a removed. We would like to use the web container's ability to deploy, undeploy, and redeploy WAR files as a means to install, uninstall, and upgrade the modules within our system. However, there is also a need to share session state between these modules which is not allowed in the servlet specification. I have researched a few solutions (such as using a Singleton in a common/lib/ package), but these solutions appear to require a non- trivial amount of infrastructure (and configuration of filters and/or session listeners) for every webapp. I would like to avoid all of that explicit infrastructure and hide the complexity by using a custom session manager. Before I proceed with my question, does anyone have any other suggestions for solving the above problem? OK, here is the test case that I am trying. I have created a very simple decorator which implements the org.apache.catalina.Manager interface. It simply delegates all calls to an instance of StandardManager and prints a message to System.out. Attached is the Tomcat config file that I am trying to use to configure my custom session manager. I am trying to use the <DefaultContext> tag to setup the manager on all webapps. Unfortunately, when I run a simple webapp (after restarting Tomcat, of course) I am not seeing any output in any log file (nor to the console) from my test manager. Is my configuration invalid? What am I missing? Sincere thanks, Bryan -- *StillSecure* Bryan Basham Senior Software Engineer (UI Development) F 303.381.3881 C 303.917.4546 www.stillsecure.com <http://www.stillsecure.com> /The information transmitted is intended only for the person to whom it is addressed and may contain confidential material. Review or other use of this information by persons other than the intended recipient is prohibited. If you've received this in error, please contact the sender and delete from any computer. /
<Server port="8005" shutdown="SHUTDOWN"> <GlobalNamingResources> <!-- Used by Manager webapp --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <Service name="Catalina"> <Connector port="8080" /> <!-- This is here for compatibility only, not required --> <Connector port="8009" protocol="AJP/1.3" /> <Engine name="Catalina" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> <Host name="localhost" appBase="webapps"> <DefaultContext> <Manager className="com.example.tomcat.TestSessionManager" /> </DefaultContext> </Host> </Engine> </Service> </Server>
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]