[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
It had a problem in a aspect, that was defined as a private class. I believed the validity of this construction. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3994375#3994375 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3994375 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
The empoloyee shouldn't be converted. You are intercepting the call, and the call to the constructor is inside HealthWatcherFacade. So, this is step is ok. Next test (this may seem a silly question, but we need to check everything): are you sure doPost is being called? Use a System.out.println to verify that. And, is the constructor of HealthWatcherFacede being called too? And, finally, put a print inside of the constructor of EmployeeRecord. Something is wrong here, and we need to find out which step is messing your example. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992997#3992997 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992997 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
I changed the way of packaging, with loadtime weaving activated, without success. The instantiations are not intercepted if they occur of indirect way. I already tried to use keywords execution, call and construction. What it can be happening? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992765#3992765 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992765 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
I changed file jboss-aop.xml. The shown error is abnormal because the class is present in jar of the WEB-INF/lib directory. | aspect class=aspects.dataManagement.nonpersistent.DataCollectionNonPersistent scope=PER_VM / | | | pointcut name=recordsCreation expr=execution(*-new(..)) / | | | bind pointcut=recordsCreation | advice aspect=aspects.dataManagement.nonpersistent.DataCollectionNonPersistent name=aroundRecordsCreation / | /bind | Result: | 11:10:00,068 ERROR [STDERR] [warn] AOP Instrumentor failed to transform aspects.dataManagement.nonpersistent.DataCollectionNonPersistent | 11:10:00,080 ERROR [STDERR] java.lang.RuntimeException: javassist.NotFoundException: healthGuide.IHealthUnitRepository | 11:10:00,081 ERROR [STDERR] at org.jboss.aop.pointcut.FieldMatcher.visit(FieldMatcher.java:113) | 11:10:00,081 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTField.jjtAccept(ASTField.java:43) | 11:10:00,081 ERROR [STDERR] at org.jboss.aop.pointcut.Util.has(Util.java:464) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.Util.has(Util.java:453) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.ExecutionConstructorMatcher.visit(ExecutionConstructorMatcher.java:95) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTHasField.jjtAccept(ASTHasField.java:37) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:127) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTAnd.jjtAccept(ASTAnd.java:37) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:118) | 11:10:00,082 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTSub.jjtAccept(ASTSub.java:37) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:98) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTBoolean.jjtAccept(ASTBoolean.java:37) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:88) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:191) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.instrument.JoinpointClassifier$3.matches(JoinpointClassifier.java:99) | 11:10:00,083 ERROR [STDERR] at org.jboss.aop.instrument.JoinpointSimpleClassifier.classifyJoinpoint(JoinpointSimpleClassifier.java:65) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.instrument.JoinpointClassifier.classifyConstructorExecution(JoinpointClassifier.java:160) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.instrument.ConstructorExecutionTransformer.classifyConstructor(ConstructorExecutionTransformer.java:484) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.instrument.ConstructorExecutionTransformer.transform(ConstructorExecutionTransformer.java:141) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:660) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.AspectManager.translate(AspectManager.java:908) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.AspectManager.transform(AspectManager.java:820) | 11:10:00,084 ERROR [STDERR] at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:88) | 11:10:00,085 ERROR [STDERR] at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75) | 11:10:00,085 ERROR [STDERR] at sun.instrument.TransformerManager.transform(TransformerManager.java:122) | 11:10:00,085 ERROR [STDERR] at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155) | 11:10:00,085 ERROR [STDERR] at java.lang.ClassLoader.defineClass1(Native Method) | 11:10:00,085 ERROR [STDERR] at java.lang.ClassLoader.defineClass(ClassLoader.java:620) | 11:10:00,085 ERROR [STDERR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) | 11:10:00,085 ERROR [STDERR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) | 11:10:00,086 ERROR [STDERR] at java.net.URLClassLoader.access$100(URLClassLoader.java:56) | 11:10:00,086 ERROR [STDERR] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) | 11:10:00,086 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method) | 11:10:00,086 ERROR [STDERR] at java.net.URLClassLoader.findClass(URLClassLoader.java:188) | 11:10:00,086 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672) | 11:10:00,086 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652) | 11:10:00,086 ERROR [STDERR] at
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
I've just run an example and it works to me, no matter whether the servlet calls directly the constructor, or the private constructor of HealthWatcherFacade does it. Please, run your servlet only with the pontcut: | pointcut name=recordsCreation | expr=call(employee.EmployeeRecord-new(..)) / | and the binding: | | | bind pointcut=recordsCreation | advice | aspect=aspects.dataManagement.nonpersistent.DataCollectionNonPersistent | name=aroundRecordsCreation / | /bind | | And tell me if you can see on the aopc log something like: | [aopc] [debug] was HealthWatcherFacade converted: true | This line will appear either way. The only thing is that JBoss AOP should instrument it. If it doesn't, this line will appear with a false instead of true. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992823#3992823 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992823 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
but | [aopc] [debug] was employee.EmployeeRecord converted: false | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992934#3992934 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992934 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
return true: | ... | [aopc] [debug] was controllers.HealthWatcherFacade converted: true | [aopc] [compiled] /home/fabio/workspace/HealthWatcher_AO_JBossAOP/bin/controllers/HealthWatcherFacade.class | [aopc] [trying to transform] exceptions.ExceptionMessages | [aopc] [debug] [EMAIL PROTECTED] ExceptionMessages ()V] matches no pointcuts | [aopc] [debug] was exceptions.ExceptionMessages converted: false | [aopc] [no comp needed] /home/fabio/workspace/HealthWatcher_AO_JBossAOP/bin/exceptions/ExceptionMessages.class | [aopc] [trying to transform] gui.servlets.ServletInsertSpecialComplaint | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc] [debug] MethodCall does not match: recordsCreation | [aopc] [debug] MethodCall does not match: call(employee.EmployeeRecord-new(..)) | [aopc]
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
Somebody has some suggestion? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992438#3992438 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992438 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
Which version of JBoss AOP are you using? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992484#3992484 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992484 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
JBoss Application Server: 4.05 GA JBoss AOP:1.5.2 The standalone mode run correctly. I make tests using a class with the method main. The problem only occurs when the system is in application server. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992490#3992490 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992490 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
essage of log when using keyword all | aroundRecordsCreation:class employee.EmployeeRecord$employeeRepository_Set | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992258#3992258 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992258 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
I have no clue on what is going on with your example. Could you please send me your jboss-aop.xml file, and tell me the weaving mode you are using (aopc compiler, loadtime weaving or hotswap)? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3992135#3992135 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3992135 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss AOP] - Re: probleam in granularity of interception
Weaving mode: compile-time jboss-aop.xml: | | | ?xml version=1.0 encoding=UTF-8 standalone=yes? | aop | | aspect class=aspects.distribution.HealthWatcherServerSideAspect | scope=PER_VM / | | aspect class=aspects.distribution.HealthWatcherClientSideAspect | scope=PER_VM / | | | | aspect class=aspects.dataManagement.nonpersistent.DataCollectionNonPersistent | scope=PER_VM / | | | !-- | aspect class=aspects.dataManagement.persistent.DataCollectionPersistent | scope=PER_VM / | -- | | | aspect class=aspects.dataManagement.persistent.PersistenceControlHealthWatcher | scope=PER_VM / | | | introduction | expr=class(complaint.ComplaintRecord) | OR class(healthGuide.HealthUnitRecord) | OR class(healthGuide.MedicalSpecialtyRecord) | OR class(employee.EmployeeRecord) | OR class(complaint.DiseaseRecord) | mixin | interfaces | aspects.dataManagement.util.SystemRecord | /interfaces | classaspects.dataManagement.util.SystemRecordImpl/class | construction | new aspects.dataManagement.util.SystemRecordImpl() | /construction | /mixin | /introduction | | | pointcut | expr=execution(public void gui.servlets.ServletWebServer-init(javax.servlet.ServletConfig)) | name=facadeMainExecution / | | bind pointcut=facadeMainExecution | advice | aspect=aspects.distribution.HealthWatcherServerSideAspect | name=beforeFacadeMainExecution / | /bind | | | pointcut name=facadeCallers | expr=within($instanceof{javax.servlet.http.HttpServlet}) / | | | pointcut name=facadeCalls | expr=call(* controllers.HealthWatcherFacade-*(..)) AND !call(static * controllers.HealthWatcherFacade-*(..)) / | | | | bind pointcut=facadeCallers AND facadeCalls | advice | aspect=aspects.distribution.HealthWatcherClientSideAspect | name=aroundFacadeLocalCalls / | /bind | | !-- | pointcut name=recordsCreation | expr=all($instanceof{aspects.dataManagement.util.SystemRecord}) AND !within($instanceof{aspects.dataManagement.AbstractDataCollectionCustomization}) / | -- | | pointcut name=recordsCreation | expr=call(employee.EmployeeRecord-new(..)) / | | bind pointcut=recordsCreation | advice | aspect=aspects.dataManagement.nonpersistent.DataCollectionNonPersistent | name=aroundRecordsCreation / | !-- | advice | aspect=aspects.dataManagement.persistent.DataCollectionPersistent | name=aroundRecordsCreation / | -- | /bind | | | | pointcut name=connectionOperations expr=call(void IPersistenceMechanism-connect()) OR | call(void IPersistenceMechanism-disconnect()) / | | | | | | | pointcut name=obtainPmInstance | expr=call(* aspects.dataManagement.dataCollections.rdbms.PersistenceMechanismRDBMS-getInstance(..)) / | | | | pointcut name=initSystem | expr=call(controllers.HealthWatcherFacade-new()) / | | bind pointcut=initSystem | advice | aspect=aspects.dataManagement.persistent.PersistenceControlHealthWatcher | name=adviceInitSystem / | /bind | | | | /aop | | | ServletInit.java | | | package gui.servlets; | | | | import java.io.IOException; | | | | import javax.servlet.ServletConfig; | | import javax.servlet.ServletException; | | import javax.servlet.http.HttpServlet; | | import javax.servlet.http.HttpServletRequest; | | import javax.servlet.http.HttpServletResponse; | | | | import controllers.HealthWatcherFacade; | | import employee.EmployeeRecord; | | | public class ServletInit extends HttpServlet { | | | | | | | | | | | | public void init(ServletConfig config) throws ServletException { | | HealthWatcherFacade.getInstance(); | | | | } | | | | public void doGet(HttpServletRequest request, HttpServletResponse response) throws