Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] AspectJ with aspectwerkz

Mohan,

You are and'ing together two disjoint execution join points: I think you
wanted cflow(trackLifeCycle()) in your before advice instead.

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Mohan Radhakrishnan
Sent: Sunday, July 15, 2007 8:32 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] AspectJ with aspectwerkz

Hi,
         I am not sure which one is the proper forum to ask about
using AOP LTW with websphere 6. It is a combination of aspectj and
aspectwerkz and websphere.

I have done the following for the boot classpath approach. java.lang
ClassLoader is patched to preprocess the classes using aspectwerkz and
is inside awaj-boot.jar.

Bootclasspath

-Xbootclasspath/a:C:\tools\aspectwerkz-2.0\lib\aspectwerkz-core-2.0.jar
-Xbootclasspath/p:C:\tools\aspectwerkz-2.0\ltw13\_boot\awaj-boot.jar

C:\tools\aspectwerkz-2.0\lib\aspectwerkz-2.0.jar;C:\tools\aspectwerkz-2.0\li
b\jrexx-1.1.1.jar;C:\tools\aspectwerkz-2.0\lib\dom4j-1.4.jar;C:\tools\aspect
werkz-2.0\lib\concurrent-1.3.1.jar;C:\tools\aspectwerkz-2.0\lib\trove-1.0.2.
jar;C:\tools\aspectwerkz-2.0\lib\qdox-1.4.jar;C:\tools\aspectwerkz-2.0\lib\a
spectwerkz-jdk14-2.0.jar;C:\tools\aspectwerkz-2.0\lib\aspectwerkz-extensions
-2.0.jar;C:\tools\aspectwerkz-2.0\lib\aspectwerkz-core-2.0.jar;C:\tools\aspe
ctj1.5\lib\aspectjweaver.jar

-Daj5.def=C:\test\META-INF\aop.xml
-Daspectwerkz.classloader.preprocessor=org.aspectj.ext.ltw13.ClassPreProcess
orAdapter


My aop.xml looks like this

<aspectj>
<aspects>
<aspect name="com.faces.tracker.FacesGenericPortletAspect"/>
</aspects>
</aspectj>

I don't see verbose class loading feature print anything related to my
aspect or aspectwerkz or aspectj classes. What is wrong here ? AJDT
itself shows that my aspect is successfully
applied.


public aspect FacesGenericPortletAspect {
	
	pointcut init() : initialization(FacesGenericPortlet.new(..));

	pointcut portletTracker() :
		execution (*
com.facesportlet.tracker.FacesPortletTracker.*(..)
	
throws PortletException );
	pointcut trackLifeCycle() :
		execution (* com.ibm.faces.webapp.FacesGenericPortlet.*(..)
	
throws PortletException );
	
	before():trackLifeCycle() && portletTracker(){
		System.out.println( "Life cycle tracked");
	}

}

Thanks,
Mohan
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top