if(beans.size() > 0)
deployment.setBeans(beans);
deploy(deployment);
validate();
KernelController controller = kernel.getController();
// ClientContainer
KernelControllerContext context = (KernelControllerContext) controller.getContext("ClientContainer", ControllerState.INSTALLED);
if (context == null)
throw new Exception("ClientContainer bean was not created");
Object client = context.getTarget();
KernelControllerContext cclContext = (KernelControllerContext) controller.getContext(classLoaderName, ControllerState.INSTALLED);
if (cclContext == null)
throw new Exception(classLoaderName+" bean was not created");
ClassLoader ccLoader = (ClassLoader) cclContext.getTarget();
if (ccLoader == null )
throw new Exception(classLoaderName+" bean was not created");