Package jfun.yan.xml

Examples of jfun.yan.xml.NutsProcessor.processResource()


public class InvocationOrderTestCase extends TestCase {
  public void test1()
  throws Exception{
    final NutsProcessor proc = new NutsProcessor();
    proc.processResource("tests/jfun/finecontrol/config.xml");
    final Container yan = proc.getContainer();
    yan.getInstance("a");
  }
}
View Full Code Here


    base.registerValue("classloader", loader);
    base.registerValue("container", yan);
    final NutsProcessor cinterpreter = new NutsProcessor();
    //cinterpreter.setParameterWiring(Modes.params_bytype);
    try{
      cinterpreter.processResource(appcontext_resource);
    }
    catch(IOException e){
      throw new IllegalStateException("cannot startup spring integration.");
    }
   
View Full Code Here

        cache.add(obj);
      }
    };
    final NutsProcessor meta = interpreter.createMetaInterpreter();
    meta.getContainer().registerValue(l);
    meta.processResource("tests/jfun/yan/xml/nuts/listeners.xml");
    interpreter.loadNutsFromContainer(meta.getContainer());
    interpreter.processFile("test/yan/test_pluggable_declarativeness.xml");
    final List instances = yan.getInstances();
    assertEquals(1, cache.size());
    assertSame(cache.get(0), instances.get(0));
View Full Code Here

    protected Container createContainer()
    throws IOException{
      NutsProcessor processor = new NutsProcessor(
          ClassLoaderUtils.guessClassLoader(getClass().getClassLoader()));
      processor.processResource("jfun/yan/xfire/xfireXmlBeans.xml");
      processor.processResource("tests/jfun/yan/xfire/echo.xml");
      processor.preInstantiate();
      return processor.getContainer();
    }
}
View Full Code Here

    protected Container createContainer()
    throws IOException{
      NutsProcessor processor = new NutsProcessor(
          ClassLoaderUtils.guessClassLoader(getClass().getClassLoader()));
      processor.processResource("jfun/yan/xfire/xfireXmlBeans.xml");
      processor.processResource("tests/jfun/yan/xfire/echo.xml");
      processor.preInstantiate();
      return processor.getContainer();
    }
}
View Full Code Here

  protected void setUp() throws Exception {
    super.setUp();
    final NutsProcessor processor = new NutsProcessor(getClass().getClassLoader());
    if(spring_involved)
      SpringNuts.setSpringAware("spring integration", processor);
    processor.processResource("tests/jfun/yan/benchmark/yan_component_config.xml");
    this.yan = processor.getContainer();
    Thread.sleep(100);
    System.gc();
    Thread.sleep(100);
    System.gc();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.