From: <sco...@jb...> - 2005-05-10 11:58:37
|
File a bug report as we cannot be throwing away the protection domain. http://jira.jboss.com/jira/browse/JBAOP View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877146#3877146 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877146 |
From: <bil...@jb...> - 2005-05-10 12:16:18
|
This is not true. The ClassLoader creates the class and it has the ProtectionDomain. A special ProtectionDomain is created for dynamically created classes though. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877148#3877148 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877148 |
From: <sco...@jb...> - 2005-05-10 12:41:54
|
Give a concrete example that illustrates where the PD is getting lost then Tim. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877153#3877153 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877153 |
From: twundke <nu...@jb...> - 2005-05-11 08:09:16
|
Sorry I wasn't clearer in my original post. It's been a while since I looked at this issue. My particular problem is that the generated field wrapper inner classes don't get assigned the correct protection domain. Here's a stack trace that shows the problem occuring. | getDefaultDomain():1583, ClassLoader.java | preDefineClass():483, ClassLoader.java | defineClass():614, ClassLoader.java | defineClass():465, ClassLoader.java | invoke0():-1, NativeMethodAccessorImpl.java | invoke():39, NativeMethodAccessorImpl.java | invoke():25, DelegatingMethodAccessorImpl.java | invoke():585, Method.java | toClass():52, StandaloneClassPool.java | toClass():962, CtClass.java | compileOrLoadClass():119, TransformerCommon.java | createOptimizedInvocationClass():572, FieldAccessTransformer.java | buildOptimizedReadWrapper():358, FieldAccessTransformer.java | buildOptimizedWrappers():342, FieldAccessTransformer.java | buildFieldWrappers():232, FieldAccessTransformer.java | buildFieldWrappers():65, FieldAccessTransformer.java | transform():592, Instrumentor.java | translate():572, AspectManager.java | transform():490, AspectManager.java | aspectTransform():100, AopAgent.java | transform():141, AopAgent.java | transform():122, TransformerManager.java | transform():155, InstrumentationImpl.java | defineClass1():-1, ClassLoader.java | defineClass():620, ClassLoader.java | defineClass():320, BaseURLClassLoader.java | access$000():38, BaseURLClassLoader.java | run():108, BaseURLClassLoader.java | run():98, BaseURLClassLoader.java | doPrivileged():-1, AccessController.java | findClass():96, BaseURLClassLoader.java | findClassInternal():168, BaseClassLoader.java | findClassInternal():146, BaseClassLoader.java | findClassInternal():49, FrameworkClassLoader.java | loadClass():280, BaseClassLoader.java | loadClass():251, ClassLoader.java | loadClassInternal():319, ClassLoader.java | initialiseDomains():117, DomainManagerImpl.java | <init>():78, DomainManagerImpl.java | start():153, FrameworkController.java | invoke0():-1, NativeMethodAccessorImpl.java | invoke():39, NativeMethodAccessorImpl.java | invoke():25, DelegatingMethodAccessorImpl.java | invoke():585, Method.java | initialiseFramework():366, FrameworkLoader.java | main():463, FrameworkLoader.java | The toClass method of StandaloneClassPool does the following: | Class cl = Class.forName("java.lang.ClassLoader"); | java.lang.reflect.Method method | = cl.getDeclaredMethod("defineClass", | new Class[]{String.class, byte[].class, | int.class, int.class}); | My classloader doesn't get a chance to define the class, causing the field wrappers to be assigned a default protection domain. So, what's actually needed is for the class pool to use the correct classloader when calling defineClass. Hope that helps. Tim. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877296#3877296 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877296 |
From: <sco...@jb...> - 2005-05-11 13:43:55
|
The following issue has been created to validate or reject this: http://jira.jboss.com/jira/browse/JBAOP-126 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877338#3877338 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877338 |
From: twundke <nu...@jb...> - 2005-05-12 02:26:17
|
Thanks Scott. I'm happy to help with the implementation of the fix if needed. Tim. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3877412#3877412 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3877412 |