Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Creating a custom session manager

Creating a custom session manager

2007-01-09       - By Bryan Basham

 Back
Reply:     1     2  

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 Source code of 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. /


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Tomcat users,<br>
<br>
I have a need that I believe Tomcat's pluggable session manager<br>
facility can satisfy, but I am having trouble getting it configured.<br>
<br>
BTW, I have googled and searched the mail archives on this topic<br>
and have not found anything useful yet.<br>
<br>
My application requires a modular architecture in which pluggable<br>
modules can be added a removed.&nbsp; We would like to use the web<br>
container's ability to deploy, undeploy, and redeploy WAR files as<br>
a means to install, uninstall, and upgrade the modules within our<br>
system.&nbsp; However, there is also a need to share session state between<br>
these modules which is not allowed in the servlet specification.<br>
<br>
I have researched a few solutions (such as using a Singleton in a<br>
common/lib/ package), but these solutions appear to require a non-<br>
trivial amount of infrastructure (and configuration of filters and/or<br>
session listeners) for every webapp.&nbsp; I would like to avoid all of that<br>
explicit infrastructure and hide the complexity by using a custom<br>
session manager.<br>
<br>
Before I proceed with my question, does anyone have any other<br>
suggestions for solving the above problem?<br>
<br>
OK, here is the test case that I am trying.&nbsp; I have created a very
simple<br>
decorator which implements the org.apache.catalina.Manager Source code of org.apache.catalina.Manager interface.<br>
It simply delegates all calls to an instance of StandardManager and<br>
prints a message to System.out.&nbsp; Attached is the Tomcat config file<br>
that I am trying to use to configure my custom session manager.&nbsp; I am<br>
trying to use the &lt;DefaultContext&gt; tag to setup the manager on all<br>
webapps.<br>
<br>
Unfortunately, when I run a simple webapp (after restarting Tomcat, of<br>
course) I am not seeing any output in any log file (nor to the console)
from<br>
my test manager.<br>
<br>
Is my configuration invalid?&nbsp; What am I missing?<br>
<br>
Sincere thanks,<br>
Bryan<br>
<br>
<div class="moz-signature">-- <br>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<p><font color="#000000" face="verdana, arial, sans serif" size="1"><strong
>StillSecure</strong></font><br>
<font color="#000000" face="verdana, arial, sans serif" size="1">Bryan
Basham<br>
Senior Software Engineer (UI Development)<br>
<br>
<font color="#ff8000">F</font> 303.381.3881<br>
<font color="#ff8000">C</font> 303.917.4546<br>
</font> <font color="#666666" face="verdana, arial, sans serif"
size="1"><a href="http://www.stillsecure.com">www.stillsecure.com</a></font>
<font
color="#006633" face="verdana, arial, sans serif" size="1"><br>
</font> <font color="#666666" face="verdana, arial, sans serif"
size="1"><i>The information transmitted is intended only for the person<br>
to whom it is addressed and may contain confidential material.<br>
Review or other use of this information by persons other than<br>
the intended recipient is prohibited. If you've received<br>
this in error, please contact the sender and delete<br>
from any computer.
</i></font></p>
</div>
</body>
</html>

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.