[jboss-dev-forums] [Design of POJO Server] - Re: ManagedOperation aspects for the ProfileService.Manageme
alesj
do-not-reply at jboss.com
Fri Sep 21 11:20:48 EDT 2007
"adrian at jboss.org" wrote : You can getCallerClassLoader() using code similar to the HACK class in the classloader project, although it is suble because you need to skip reflection classes.
Probably there is no reflection invocation in classloading code?
| protected Class<?> getRequestingClass(Class[] stack)
| {
| for (Class clazz : stack)
| {
| if (Hack.class.isAssignableFrom(clazz) == false &&
| JDKChecker.class.isAssignableFrom(clazz) == false &&
| BaseClassLoaderDomain.class.isAssignableFrom(clazz) == false &&
| BaseClassLoaderPolicy.class.isAssignableFrom(clazz) == false &&
| ClassLoader.class.isAssignableFrom(clazz) == false &&
| Class.class.isAssignableFrom(clazz) == false)
| {
| return clazz;
| }
| }
| throw new RuntimeException("Should not be here!");
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087301#4087301
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087301
More information about the jboss-dev-forums
mailing list