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

2006-09-06 Thread Leon Rosenberg
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/m

Re: Implementing own Loader

2006-09-06 Thread Leon Rosenberg
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). Ma

Re: Implementing own Loader

2006-09-06 Thread Mark Thomas
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) > bu

Re: Implementing own Loader

2006-09-05 Thread Leon Rosenberg
Hello Mark, thank you for the reply. Meanwhile I found out that replacing the webappClassLoader in the default webapploader via loader configuration in context.xml is sufficent to what I need. However, what I am trying to achieve is to create a wrapper (reflection.Proxy) around each servlet to

Re: Implementing own Loader

2006-09-05 Thread Mark Thomas
Leon Rosenberg wrote: > ok, now i added Lifecycle to the implemented interfaces and am proxing > the method calls to webapp loader... success is still another thing: Looks like the associated container hasn't been set. In your shoes I would get a debugger out and step through the initialisation of

Re: Implementing own Loader

2006-09-05 Thread Leon Rosenberg
ok, now i added Lifecycle to the implemented interfaces and am proxing the method calls to webapp loader... success is still another thing: SEVERE: Error deploying configuration descriptor moskitodemo.xml java.lang.NullPointerException at org.apache.catalina.loader.WebappLoader.start(Webap

Implementing own Loader

2006-09-05 Thread Leon Rosenberg
Hi, I'm trying to implement an own Loader wraped around the WebappLoader. My goal is to modify the classloader and to substitute all created servlets by own proxies. However, I started creating an own loader and proxying requests to the WebappLoader but failed :-) My context.xml contains: