Practical AOP woes – Part II

I have managed to make AspectJ LTW work in WebSphere Portal with the help of GlassBox 2.0. Installation of the GlassBox Inspector was easy

Generic JVM arguments are

-Xbootclasspath/p:C:\IBM\glassbox\java14Adapter.jar -Xbootclasspath/a:C:\IBM\glassbox\createJavaAdapter.jar;
C:\IBM\glassbox\aspectjweaver.jar ${WPS_JVM_ARGUMENTS_EXT} -Daspectwerkz.classloader.preprocessor=
-Ddb2j.system.home=${WPS_HOME}/cloudscape -Xp128k,64k -Xk40000


Classpath is


portlettracker.jar contains my aspect class and aop.xml

My aspect looks like this


import javax.portlet.PortletException;
import com.facesportlet.tracker.FacesPortletTracker;
public aspect FacesGenericPortletAspect {
pointcut portletTracker() :
execution (* com.facesportlet.tracker.FacesPortletTracker.*(..)

	  throws PortletException );
	before(): portletTracker(){
	 System.out.println( "Faces Portlet tracked");

GlassBox expects the aop.xml to be like this.

	<weaver options="-showWeaveInfo -verbose -debug">
		<include within="com.facesportlet.tracker.FacesPortletTracker"/>
		<aspect name="com.faces.tracker.FacesGenericPortletAspect"/>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: