You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Leon Rosenberg <ro...@googlemail.com> on 2006/09/06 21:59:57 UTC

[SOLVED] Replacing servlet impls on the fly (was: Implementing own Loader)

Hi Mark,

thanx for your help. I actually managed to replace all loaded servlets
with own wrapper via the classloader. Really cool you guys added this
option (special thanx to remy and craig here).

The code here:
https://moskito.dev.java.net/source/browse/moskito/moskito-tomcat/src/net/java/dev/moskito/tomcat/MoskitoWebappClassLoader.java?view=markup

Now it's possible for me to monitor servlets in any webapp tomcat
without modifying the code :-)

thanx again
Leon


On 9/6/06, Leon Rosenberg <ro...@googlemail.com> wrote:
> Hello Mark,
>
> > Each servlet is invoked via the StandardWrapperValve (accessible via
> > JMX) that includes basic performance stats. Is this sufficient?
>
> could you explain your statement a little bit? As far as I see the
> Servlet is invoked by the StandardWrapper by Class.newInstance()?
> (line 1055).
>
> Maybe I got something wrong?
>
> The basic performance stats aren't sufficent (for me) since they do
> not support time-intervals. And I'm usually interested in what my
> servlet is doing now. I mean, if my webapp is running for 3 weeks and
> the servlet suddenly needs double execution time, i will never see it
> in the basic performance stats, since the 3 weeks of running will
> level everything (statistically).
>
> Leon
>
> On 9/6/06, Mark Thomas <ma...@apache.org> wrote:
> > Leon Rosenberg wrote:
> > > However, what I am trying to achieve is to create a wrapper
> > > (reflection.Proxy) around each servlet to be able to monitor and
> > > measure its performance. The problem is that tomcat provides very nice
> > > plugability concepts for the ClassLoader (many thanx for that, guys)
> > > but no concept for servlet creation itself.
> >
> >
> > Mark
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org