public MadvocContainer() { madpc = new PetiteContainer(); madpc.addSelf(MADVOC_PETITE_CONTAINER_NAME); }
@Test void testSelf() { PetiteContainer pc = new PetiteContainer(); pc.addSelf(); assertEquals(1, pc.beansCount()); PetiteContainer pc2 = pc.getBean(PetiteContainer.PETITE_CONTAINER_REF_NAME); assertEquals(pc2, pc); }
private InterceptorsManager createInterceptorManager() { PetiteContainer madpc = new PetiteContainer(); madpc.addSelf("madpc"); madpc.addBean("madvocEncoding", new MadvocEncoding()); InterceptorsManager im = new InterceptorsManager(); im.contextInjectorComponent = new ContextInjectorComponent(); im.contextInjectorComponent.madvocController = new MadvocController(); im.contextInjectorComponent.madvocController.servletContextProvider = new ServletContextProvider(null); im.contextInjectorComponent.scopeDataInspector = new ScopeDataInspector(); im.contextInjectorComponent.scopeResolver = new ScopeResolver(); im.contextInjectorComponent.scopeResolver.madpc = madpc; return im; }
/** * Initializes web application. Invoked very first. * By default, it creates a Logger and creates internal Petite container. * Also adds itself into it. */ protected void initWebApplication() { log = Log.getLogger(WebApplication.class); if (log.isDebugEnabled()) { log.debug("Initializing Madvoc web application"); } madpc = new PetiteContainer(); madpc.addSelf(MADVOC_CONTAINER_NAME); }