Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Aspectj with WAS 6.1

Hi,

 

I am trying to write a aspect for javax.servelet.jsp.JspWriter to inject my code before the data gets written to the stream.  My code is working fine in JBoss 4.3, but the same is not working in WAS 6.1, My aspect is not being called.

 

Below is my aspect.

 

public aspect JspWriterAspect {

     

      pointcut print(String entry) : execution(public * javax.servlet.jsp.JspWriter.print(String)) && args(entry);

     

    void around(String entry) : print(entry) {

      String message = “ Hello “ + entry;

      proceed(message);

    }

}

 

Below is aop.xml

 

<aspectj>

      <weaver options="-Xset:weaveJavaxPackages=true  -showWeaveInfo -verbose -debug">

              <include within="javax.servlet.jsp.JspWriter+"/>

      </weaver>

      <aspects>

            <!-- declare two existing aspects to the weaver -->

            <aspect name="com.manh.javalib.aspect.jsp.JspWriterAspect" />

      </aspects>

</aspectj>

 

 

I am using aspectjweaver 1.6.3

 

I have also taken care of adding security policy

 

// needed by weaver for byte code loading       

      permission java.io.FilePermission "<>", "read";       

     

      // Needed by BCEL       

      permission java.util.PropertyPermission "java.class.path", "read";       

      permission java.util.PropertyPermission "java.ext.dirs", "read";       

      permission java.util.PropertyPermission "JavaClass.*", "read";       

      permission java.util.PropertyPermission"org.aspectj.apache.bcel.useSharedCache", "read";       

     

      // Needed by org.aspectj.weaver.tools.WeavingAdaptor       

      permission java.util.PropertyPermission "sun.boot.class.path", "read";       

      permission java.util.PropertyPermission "org.aspectj.weaver.*", "read";       

     

     

      // Needed to configure org.aspectj.weaver.WeavingURLClassLoader       

      permission java.util.PropertyPermission "aj.*", "read";       

     

      // Needed to configure org.aspectj.weaver.tools.TraceFactory       

      permission java.util.PropertyPermission "org.aspectj.tracing.*","read";       

     

      // Needed by weaving class loader       

      permission java.lang.RuntimePermission "createClassLoader";       

      permission java.lang.RuntimePermission "getClassLoader";       

     

      // Needed by Java15ReflectionBasedReferenceTypeDelegate       

      permission java.lang.RuntimePermission "accessDeclaredMembers";

 

Please help me in this regard.

 

 

 

 

 

Regards,

Prasad Kulkarni | Principal Software Engineer
Manhattan Associates Inc.
Mobile +91-9448441673
Phone +91-80-40418080 (4378)
Fax +1 770.308.0177
prkulkarni@xxxxxxxx
http://www.manh.com/

_____________________________________________

The Supply Chain People™
Manhattan Associates

 


Back to the top