Skip to main content

AspectJ with JSF1.2

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2011-10-14

HI All,

I want to profile war module controllers. so i want to make use of AspectJ. my application server is glassfish v2.x, IDE is netbeans 6.9.1 and Framework is JSF1.2. i didnot integrate my application with spring. could anyone provide some sample code with configuration details. I have written some smaple for tracing the method calls nbut i dont know how to configure in my aplication. My application file is EAR (EJB + WAR). Here my requirement is need to get the WAR module managed-beans execution time. For EJB's I am using the default Interceptor. so This is the sample code to get the execution time of WAR module managed-beans. So if anybody give some information it could be much helpful to me. so please kindly provide some information on it.

public class LogInterceptor {
private static final long serialVersionUID = 1L;

public LogInterceptor() {

@Pointcut("execution (* *.*(..))")
public void profile() {


public Object invoke(ProceedingJoinPoint thisJoinPoint) throws Throwable {
System.out.println("test start");
Object obj = thisJoinPoint.proceed();
System.out.println("test end");
return obj;

Thanks & regards,

Sridhar Kosna.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-05-14

what is this for? am i in the wrong forum? :confused: seems all of the questions here are for professionals :sad:

Joined: 2011-10-14

I configured this by creating a target in my buil.xml file so now each and every method has been waeving out with aspectJ

<taskdef classpath="C:/Users/s.kosna/Downloads/aspectj-1.6.11/lib/aspectjtools.jar"

<target name="aspectj">
<echo level="info">--- aspectj (start) ---</echo>
<condition property="targetos" value="windows" else="unix">
<os family="windows"/>
<pathconvert targetos="${targetos}" property="javac.convertedClasspath" >
<path path="${javac.classpath}" />
<iajc source="1.6" target="1.6" showweaveinfo="true" verbose="true" destdir="${build.classes.dir}" >
<pathelement location="${build.classes.dir}"/>
<pathelement location="${javac.convertedClasspath}" />
<echo level="info">Converis BRUTAL TEST ---</echo>

<target name="-post-compile" depends="aspectj"></target>