[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Multiple ClassFileTransformers/Translators
alesj
do-not-reply at jboss.com
Wed Apr 1 11:58:23 EDT 2009
"alesj" wrote :
| "adrian at jboss.org" wrote :
| | If you want to add classloader specific ClassFileTransformers to the
| | BaseClassLoaderPolicy api that's ok with me.
| |
| Already done.
| But I'm still using our Translator + adding ClassFileTransformer2Translator bridge.
|
What should be the order of transformation?
1) domain
2) policy
Having more "exact" transformation after more "general".
| protected byte[] transform(String className, byte[] byteCode, ProtectionDomain protectionDomain) throws Exception
| {
| byte[] result = byteCode;
|
| BaseClassLoaderDomain domain = getClassLoaderDomain();
| if (domain != null)
| result = domain.transform(getClassLoader(), className, result, protectionDomain);
|
| ClassLoader classLoader = getClassLoaderUnchecked();
| if (classLoader != null)
| result = TranslatorUtils.applyTranslatorsOnTransform(translators, classLoader, className, result, protectionDomain);
|
| return result;
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222702#4222702
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222702
More information about the jboss-dev-forums
mailing list