Package org.nutz.ioc

Examples of org.nutz.ioc.Ioc.depose()


    Animal f = ioc.get(Animal.class, "fox");
    assertEquals(1, f.getCreateTime());
    assertEquals(1, f.getFetchTime());
    assertEquals(0, f.getDeposeTime());

    ioc.depose();
    assertEquals(1, f.getCreateTime());
    assertEquals(1, f.getFetchTime());
    assertEquals(1, f.getDeposeTime());
  }
}
View Full Code Here


      throw new LoadingException(e);
    }
    // If the application has Ioc, depose it
    Ioc ioc = config.getIoc();
    if (null != ioc)
      ioc.depose();

    // Done, print info
    sw.stop();
    if (log.isInfoEnabled())
      log.infof("Nutz.Mvc[%s] is down in %sms", config.getAppName(), sw.getDuration());
View Full Code Here

            if (sp != null)
                sp.notifyStop();
            // If the application has Ioc, depose it
            Ioc ioc = config.getIoc();
            if (null != ioc)
                ioc.depose();
        }

        // Done, print info
        sw.stop();
        if (log.isInfoEnabled())
View Full Code Here

        Animal f = ioc.get(Animal.class, "fox");
        assertEquals(1, f.getCreateTime());
        assertEquals(1, f.getFetchTime());
        assertEquals(0, f.getDeposeTime());

        ioc.depose();
        assertEquals(1, f.getCreateTime());
        assertEquals(1, f.getFetchTime());
        assertEquals(1, f.getDeposeTime());
    }
}
View Full Code Here

            if (sp != null)
                sp.notifyStop();
            // If the application has Ioc, depose it
            Ioc ioc = config.getIoc();
            if (null != ioc)
                ioc.depose();
        }

        // Done, print info
        sw.stop();
        if (log.isInfoEnabled())
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.