You need 3 things:
(a) custom DecrypyterTranslator
(b) custom ClassLoaderPolicyModule -- similar to DecrypterClassLoaderPolicyModule
But instead of providing full CLPolicy, you simply add translator from (a).
@Override
protected VFSClassLoaderPolicy determinePolicy()
{
VFSClassLoaderPolicy policy = super.determinePolicy();
policy.addTranslator(new DecrypterTranslator(decrypter));
return policy;
}
(c) custom deployer which creates DecrypterClassLoaderPolicyModule
* http://anonsvn.jboss.org/repos/jbossas/projects/demos/microcontainer/trunk/classloader/src/main/java/org/jboss/demos/classloader/deployers/DecrypterClassLoaderDescribeDeployer.java