tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angus Mezick" <>
Subject RE: InstanceListener
Date Thu, 26 Jun 2003 17:07:06 GMT
Yup, saw that message.  I also found one written by Craig that had the
syntax I was expecting.  As for why I am using it, I am writing a JDBC
session manager.  The sessions are only in memory when actively being
used and then stored in the DB.  I figure that 1 network transaction per
page to the DB affecting 1 server is better that 1 multicast per page to
ALL 6 servers in a cluster.  Also a bit nicer on memory usage.  I have
NO real limit on how many sessions I can support.  I need the instance
listener to catch the AFTER_SERVICE event.  This allows me to update my
session once the servlet/jsp processing has completed.  I just need to
filter out all non/servlet traffic (just remove the default servlet
entries) and I am all set!  Right now I just dislike the fact that the
manager app gets the whole session array and then does a count on it
instead of asking the manager for a count.  Makes things a bit messy.

> -----Original Message-----
> From: Shapira, Yoav [] 
> Sent: Thursday, June 26, 2003 9:04 AM
> To: Tomcat Users List
> Subject: RE: InstanceListener
> Howdy,
> >Turns out I had two problems:
> >1) <InstanceListener className=""/> DOESN'T work!!!  I had to use
> ><InstanceListener>class-name</InstanceListener>.  This gets 
> a BIG WTF!
> >Should EVERY server.xml element that takes a class work the same way?
> It'd be nice if they were consistent, yes.  Of course, searching the
> archives would have revealed this, e.g.:
> I have to say I was very surprised to see anyone using 
> InstanceListener.
> Given all the listeners that are part of the servlet 
> specification, and
> how little traffic there is about this tomcat-specific listener.  Why
> are you using it?
> If you really care about the XML syntax, submit a patch.
> >2) I needed to put my classes in a jar (untested, I made these two
> >changes at the same time so I could be wrong about this one.
> Probably not.  But that should be easy to test.
> Yoav Shapira
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message