Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] JVM 1.4 LTW with concrete-aspect

It is perhaps a FAQ, but i don’t find the answer …

 

I run perfectly AspectJ on a small demo app with a JVM 1.5 and the javaagent.

But I can run this weaving in JVM 1.4 Sun HotSpot ( Aspect and app are compiled in target byte code 1.4).

 

Here is my modified aj.bat :

 

REM @echo off

REM This file generated by AspectJ installer

REM Created on Sat Nov 11 19:24:10 CET 2006 by JEYP5516

set JAVA_HOME=C:\Program Files\Java\j2re1.4.2_13

SET ASPECTJ_HOME=C:\opt\perfStats

if "%JAVA_HOME%" == "" set JAVA_HOME=C:\Program Files\Java\j2re1.4.2_13

if "%ASPECTJ_HOME%" == "" set ASPECTJ_HOME=c:\aspectj1.5

SET ASPECTPATH=C:\opt\perfStats\perfAspects.jar

SET PERFSTAT_ROOT=C:\opt\perfStats

SET CLASSPATH=C:\opt\perfStats;C:\opt\perfStats\exemple1.jar;C:\opt\perfStats\perfAspects.jar;

 

if exist "%JAVA_HOME%\bin\java.exe" goto haveJava

if exist "%JAVA_HOME%\bin\java.bat" goto haveJava

if exist "%JAVA_HOME%\bin\java" goto haveJava

echo java does not exist as %JAVA_HOME%\bin\java

echo please fix the JAVA_HOME environment variable

:haveJava

"%JAVA_HOME%\bin\java" -classpath "%ASPECTJ_HOME%\lib\aspectjweaver.jar" "-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader" "-Daj.class.path=%ASPECTPATH%;%CLASSPATH%" -DrootPerfStat=%PERFSTAT_ROOT% "-Daj.aspect.path=%ASPECTPATH%" %*

 

And my aop.xml  ( located in : C:\opt\perfStats\META-INF\aop.xml in the classpath)

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<aspectj>

 

            <aspects>

                       

                        <concrete-aspect name="iep.perf.jvm14.IntrospectionClass14"

                                   extends="iep.perf.jvm14.AbstractIntrospectionClass14">

                                   <pointcut name="introspection"

                                               _expression_="within(jlp..*) AND  call(public * jlp..*(..))" />

                        </concrete-aspect>

             <!-- aspect name="iep.perf.ConcreteDurationMethod"/-->

           

            </aspects>

 

           

 

            <weaver options="-verbose">

           

           

            <include within="jlp..*"/>

            <include within="iep..*"/>

            </weaver>

 

</aspectj>

 

With JVM 1.4 , app is launched without weaving with no error , it seam that the System Classloader is not override by -Djava.system.class.loader

 

What did I miss ?

 

Cordialement / Best regards

Jean-Louis Pasturel
ft/rosi/dps/iep/p-m
Expertise WAS tél. 05 61 30 83 39 mob: 06 75 96 34 98
jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx

 

*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration.
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************

Back to the top