ClassLoadingDefaultDeployer cldd = new ClassLoadingDefaultDeployer();
ClassLoadingMetaData clmd = new ClassLoadingMetaData();
cldd.setDefaultMetaData(clmd);
VFSClassLoaderClassPathDeployer vfscp = new VFSClassLoaderClassPathDeployer();
VFSClassLoaderDescribeDeployer vfsdd = new VFSClassLoaderDescribeDeployer();
ClassLoading classLoading = new ClassLoading();
KernelController controller = kernel.getController();
BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("ClassLoading", ClassLoading.class.getName());
builder.addMethodInstallCallback("addModule");
builder.addMethodUninstallCallback("removeModule");
try
{
controller.install(builder.getBeanMetaData(), classLoading);
}
catch (Throwable t)
{
throw new RuntimeException(t);
}
vfsdd.setClassLoading(classLoading);
ClassLoaderSystem system = new DefaultClassLoaderSystem();
// allow MC annotations, so that both, deployer and tester see the same
ClassFilter mcAnnFilter = new PackageClassFilter(new String[]{"org.jboss.beans.metadata.api.annotations"});
ClassFilter filter = new CombiningClassFilter(false, new ClassFilter[]{ClassFilter.JAVA_ONLY, mcAnnFilter});