On 12/29/06, Fabio Fagundes Silveira <[EMAIL PROTECTED]> wrote:
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: [EMAIL PROTECTED] ~/app/classes]$ java main.Main But if I try to run it using LTW: [EMAIL PROTECTED] ~/app/classes]$ aj5 main.Main I get: [EMAIL PROTECTED] 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
Your pointcut is not restricted to your code only, so when using LTW, any 3rd party code gets weaved - including the JDBC driver - where it might internally use those calls. ./alex -- .w( the_mindstorm )p. _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
