Examples of ApplicationContext


Examples of railo.runtime.listener.ApplicationContext

    return components;
  }
 
  private static void loadComponents(PageContext pc, HibernateORMEngine engine,List<Component> components,Resource[] reses,ExtensionResourceFilter filter,ORMConfiguration ormConf) throws PageException {
    Mapping[] mappings = createMappings(pc, reses);
    ApplicationContext ac=pc.getApplicationContext();
    Mapping[] existing = ac.getComponentMappings();
    if(existing==null) existing=new Mapping[0];
    try{
      Mapping[] tmp = new Mapping[existing.length+1];
      for(int i=1;i<tmp.length;i++){
        tmp[i]=existing[i-1];
      }
      ac.setComponentMappings(tmp);
      for(int i=0;i<reses.length;i++){
        if(reses[i]!=null && reses[i].isDirectory()){
          tmp[0] = mappings[i];
          ac.setComponentMappings(tmp);
          loadComponents(pc,engine,mappings[i],components,reses[i], filter,ormConf);
        }
      }
    }
    finally {
      ac.setComponentMappings(existing);
    }
  }
View Full Code Here

Examples of us.codecraft.tinyioc.context.ApplicationContext

public class JdkDynamicAopProxyTest {

  @Test
  public void testInterceptor() throws Exception {
    // --------- helloWorldService without AOP
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("tinyioc.xml");
    HelloWorldService helloWorldService = (HelloWorldService) applicationContext.getBean("helloWorldService");
    helloWorldService.helloWorld();

    // --------- helloWorldService with AOP
    // 1. 设置被代理对象(Joinpoint)
    AdvisedSupport advisedSupport = new AdvisedSupport();
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.