Nothing special in Tapestry ... most likely it's a classloader conflict
between AspectJ and Tomcat. Tomcat must not be loading the bytecode enhanced
version of TapestryFilter, instead loading the standard version.

On Thu, Sep 3, 2009 at 10:51 AM, Neo Anderson
<javadeveloper...@yahoo.co.uk>wrote:

>
> I try a simall test using aspectj to capture the doFilter() execution of
> TapestryFilter.java. The pointcut intends to caputre the doFilter method
> and
> prints out some information in the e.g. catalina.out log file. The code
> looks as below:
>
> public aspect Test{
>    pointcut intercept(): execution(*
> org.apache.tapestry5.services.TapestryFilter.doFilter(..));
>
>    void around() : intercept(){
>        System.out.println(" ...... test info ");
>        logger.debug(" ..... test info using slf4j"); // configure log
> properties already.
>        proceed();
>    }
> }
>
> If I copy TapestryFilter.java to my own folder e.g. myproject/pkg/web/ and
> rename it to e.g. MyTapestryFilter.java. When accessing from the brwoswer
> http://localhost:8080/myproject. The log will show the debug information
> printed in the catalina.out log file. However, if the web.xml filter class
> switch back using TapestryFilter.java, then nothing happens.
>
> I am just curious if Tapestry5 add any contract that prevents bytecode
> level
> weaving? Or is there any source code as entry point I can start to have a
> look (TapestryFilter.java looks like a normal Filter calss)?
>
> I appreciate any help.
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://n2.nabble.com/TapestryFilter-question-tp3574931p3574931.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

Reply via email to