Package org.nanocontainer.reflection

Examples of org.nanocontainer.reflection.DefaultContainerRecorder


  public ScopedContainerComposer(PicoContainer configuration) throws ClassNotFoundException {
      ScopedContainerConfigurator config = getConfigurator(configuration);
      containerBuilderClassName = config.getContainerBuilder();

        MutablePicoContainer applicationContainerPrototype = new DefaultPicoContainer();
        applicationRecorder = new DefaultContainerRecorder(applicationContainerPrototype);
        populateContainer(config.getApplicationConfig(), applicationRecorder, null);

        MutablePicoContainer sessionContainerPrototype = new DefaultPicoContainer(applicationContainerPrototype);
        sessionRecorder = new DefaultContainerRecorder(sessionContainerPrototype);
        populateContainer(config.getSessionConfig(), sessionRecorder, applicationContainerPrototype);

        MutablePicoContainer requestContainerPrototype = new DefaultPicoContainer(sessionContainerPrototype);
        requestRecorder = new DefaultContainerRecorder(requestContainerPrototype);
        populateContainer(config.getRequestConfig(), requestRecorder, sessionContainerPrototype);
  }   
View Full Code Here


    /**
     * Constructor for the ContainerAssembler object
     */
    public XStreamContainerComposer() {

        requestRecorder = new DefaultContainerRecorder(new DefaultPicoContainer());
        sessionRecorder = new DefaultContainerRecorder(new DefaultPicoContainer());
   
        // create and populate request scope
        InputStreamReader requestScopeScript = new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(REQUEST_CONFIG));
        XStreamContainerBuilder requestPopulator = new XStreamContainerBuilder(requestScopeScript, Thread.currentThread().getContextClassLoader());
        requestPopulator.populateContainer(requestRecorder.getContainerProxy());
View Full Code Here

      String path) throws ClassNotFoundException {
    ContainerRecorder recorder;
    synchronized (recorderCache) {
      recorder = (ContainerRecorder) recorderCache.get(path);
      if (recorder == null) {
        recorder = new DefaultContainerRecorder(new DefaultPicoContainer());
        recorderCache.put(path, recorder);
        ContainerPopulator populator = createContainerPopulator(containerBuilderClassName,
                                    obtainReader(path), Thread.currentThread().getContextClassLoader());
        populator.populateContainer(recorder.getContainerProxy());
      }
View Full Code Here

TOP

Related Classes of org.nanocontainer.reflection.DefaultContainerRecorder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.