NOTE This is a prototype implementation of this concept. It does not address all classloading concerns as of yet.
6768697071727374757677
{ boolean enableConversation = context.get(Configuration.class) .getContainerConfig(WeldEEMockConfiguration.class) .isEnableConversationScope(); ShrinkWrapClassLoader classLoader = new ShrinkWrapClassLoader(archive.getClass().getClassLoader(), archive); ContextClassLoaderManager classLoaderManager = new ContextClassLoaderManager(classLoader); classLoaderManager.enable(); TestContainer container = new TestContainer(findArchiveId(archive), findBeansXml(archive), findBeanClasses(archive, classLoader)); Bootstrap bootstrap = container.getLifecycle().getBootstrap();