Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] LTW: Aspect weaves without set in aop.xml

I have packaged several Aspects ( Concrete and Abstract) in a jar, with the
core aspectjweaver.jar in one jar. 
The name is myaspectjweaver.jar and contains also a class test :
jlp.aspectj.test.MainC3P0test
I put my file aop.xml under META-INF/aop.xml of the jar myaspectjweaver.jar
 
my aop.xml is like this :
 
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<aspectj>
<aspects>
	<concrete-aspect
extends="jlp.aspectsJMX.abstractAspects.AbstractGenericMBean"
name="jlp.aspectsJMX.abstractAspects.AbstractGenericMBeanImpl">
		<pointcut expression="execution(public *
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(..))"
name="classes"/>
	</concrete-aspect>

</aspects>
<!-- Foot Mode Normal -->
<weaver options=" -Xlint:ignore
-Xset:overWeaving=true,typeDemotion=true,weaveJavaPackages=true,weaveJavaxPa
ckages=true">
	<exclude within="jlp.perf..*"/>
	<exclude within="org.ow2.util..*"/>
	<exclude within="jlp.aspectsJMX..*"/>
	<exclude within="jlp.aspects..*"/>
	<exclude within="org.hibernate.type.ComponentType"/>
	<exclude within="*..*EnhancerByCGLIB*..*"/>
	<exclude within="*..*.*$$EnhancerByCGLIB$$*"/>
	<exclude within="*..*.*$$FastClassByCGLIB$$*"/>
	<exclude within="*..*$Proxy*"/>
	<exclude within="$Proxy*"/>
	<exclude within="org.apache.juli..*"/>
</weaver>

</aspectj>

The command line is :
java -Xms128M -Xmx128M
-javaagent:E:\eclipse\workspace\aspectsPerf\workspace\monProjet\myaspectjwea
ver.jar \
 -classpath
E:\eclipse\workspace\aspectsPerf\lib\c3p0-0.9.2-pre6.jar;E:\eclipse\workspac
e\aspectsPerf\lib\mysql-connector-java-5.1.22-bin.jar \
jlp.aspectj.test.MainC3P0test 20

The concrete-aspect set in aop.xml runs fine, but another aspect ( not set
in aop.xml, and elsewhere), of the package, weaves also according correctly
with his pointcut.
The other Aspect is
jlp.perf.aspects.concreteAspects.ConcreteCounterJDBCConnexions not set in
aop.xml

JDK 1.6.0_31
AspectJ : AspectJ Compiler 1.7.1 (DEVELOPMENT - Built: Sunday Nov 18, 2012
at 20:26:15 GMT) - Eclipse Compiler 0.B79_R37x, 3.7 

It seems that there is an auto-detection for weaving ? Am i right? If so,
how to deactivate it ?
 
Cordialement / Best regards

Jean-Louis Pasturel





_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorization.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange shall not be liable if this message was modified, changed or falsified.
Thank you.



Back to the top