PrivilegedBlock location
anil.saldhana Nov 20, 2008 12:34 AMScott, given the following stack trace, where do you think the privileged block should be placed such that appropriate permission ("getClassLoader") can be provided? I feel that it needs to go in the aop project but I also have the suspicion that users of aop need to arrive with the "getClassLoader" permission.
Thanks for the second opinion.
23:22:07,502 ERROR [STDERR] access: access denied (java.lang.RuntimePermission getClassLoader) 23: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(AccessControlContext.java:253) 23:22:07,503 ERROR [STDERR] at java.security.AccessController.checkPermission(AccessController.java:427) 23:22:07,503 ERROR [STDERR] at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) 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(GenericAspectFactory.java:123) 23:22:07,503 ERROR [STDERR] at org.jboss.aop.advice.GenericAspectFactory.createPerInstance(GenericAspectFactory.java:175) 23:22:07,503 ERROR [STDERR] at org.jboss.aop.InstanceAdvisorDelegate.initializeAspects(InstanceAdvisorDelegate.java:109) 23:22:07,503 ERROR [STDERR] at org.jboss.aop.InstanceAdvisorDelegate.initialize(InstanceAdvisorDelegate.java:71) 23:22:07,503 ERROR [STDERR] at org.jboss.aop.ClassInstanceAdvisor.setAdvisorAndInitialise(ClassInstanceAdvisor.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._getInstanceAdvisor(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) 23:22:07,503 ERROR [STDERR] at org.jboss.test.security.ejb.RunAsWithRolesMDB.sendReply(RunAsWithRolesMDB.java:130) 23:22:07,503 ERROR [STDERR] at org.jboss.test.security.ejb.RunAsWithRolesMDB.onMessage(RunAsWithRolesMDB.java:105)