Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] LTW problem ...

Hello,

   I have the following code on a aspect transaction manager:

	pointcut illegalConnectionManagement()
	:(call(void Connection.close())
		|| call(void Connection.commit())
		|| call(void Connection.rollback())
		|| call(void Connection.setAutoCommit(boolean)))
		&& 		
		!within(persistence.TransactionControlAspect);

	declare error:illegalConnectionManagement():
	 "Transaction and connection control must be make" +
	 "only by TransactionControlAspect." ;

   Ok, everything works fine just I run this application using:

	[ffs@aston ~/app/classes]$ java main.Main

   But if I try to run it using LTW:

    	[ffs@aston ~/app/classes]$ aj5 main.Main

   I get:

[AppClassLoader@18e3e60] error at com/mysql/jdbc/Connection.java:2712::0
Transaction and connection control must be makeonly by
TransactionControlAspect. see also:
persistence/app/src/persistence/TransactionControlAspect.aj:79::0

    Why I am getting my own the declared error above? I have a correct
aop.xml to use LTW ...

    Anyway, If a delete META-INF directory and aop.xml file and rerun
aj5 again, everything works fine as before ... :-(

    Any hint?

Regards,
Fabio








Back to the top