[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Privileged Blocks Issue : JBAOP-675
anil.saldhana@jboss.com
do-not-reply at jboss.com
Thu Nov 20 12:56:08 EST 2008
Flavia, the fix should not go in GenericAspectFactory as you did.
Messaging is weaving their code (ClientSessionDelegate) as in:
| 3:22:07,502 ERROR [STDERR] java.lang.Exception: Stack trace
| 23:22:07,503 ERROR [STDERR] at java.lang.Thread.dumpStack(Thread.java:1158)
| 23:22:07,503 ERROR [STDERR] at java.security.AccessControlContext.checkPermission(AccessControlC
| ontext.java:253)
| 23:22:07,503 ERROR [STDERR] at java.security.AccessController.checkPermission(AccessController.j
| ava:427)
| 23:22:07,503 ERROR [STDERR] at java.lang.SecurityManager.checkPermission(SecurityManager.java:53
| 2)
| 23:22:07,503 ERROR [STDERR] at java.lang.Class.getClassLoader(Class.java:588)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectF
| actory.java:123)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.advice.GenericAspectFactory.createPerInstance(Gener
| icAspectFactory.java:175)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.InstanceAdvisorDelegate.initializeAspects(InstanceA
| dvisorDelegate.java:109)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.InstanceAdvisorDelegate.initialize(InstanceAdvisorD
| elegate.java:71)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.ClassInstanceAdvisor.setAdvisorAndInitialise(ClassI
| nstanceAdvisor.java:84)
| 23:22:07,503 ERROR [STDERR] at org.jboss.aop.ClassInstanceAdvisor.<init>(ClassInstanceAdvisor.java:68)
| 23:22:07,503 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientSessionDelegate._getInstanceA
| dvisor(ClientSessionDelegate.java)
| 23:22:07,503 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientSessionDelegate.createMessage
| (ClientSessionDelegate.java)
| 23:22:07,503 ERROR [STDERR] at org.jboss.jms.client.JBossSession.createMessage(JBossSession.java
| :124)
|
Their pointcut is on createMessage of ClientSessionDelegate. At the location of the pointcut, in the aop weaved code, you should be wrapping that with a privileged block.
You are trying the priv block way up in the stack trace.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190989#4190989
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190989
More information about the jboss-dev-forums
mailing list