Package org.jvnet.hk2.component

Examples of org.jvnet.hk2.component.Habitat.addComponent()


                long now = System.currentTimeMillis();
                URL url = getClass().getClassLoader().getResource(fileName + ".xml");
                if (url != null) {
                    try {
                        DomDocument document = parser.parse(url,  test.getDocument(habitat));
                        habitat.addComponent("document", document);
                    } catch(Exception e) {
                        e.printStackTrace();
                    }
                    Logger.getAnonymousLogger().fine("time to parse domain.xml : " + String.valueOf(System.currentTimeMillis() - now));
                }
View Full Code Here


    static private Habitat getHabitat() {
        Habitat habitat = Globals.getStaticHabitat();
        StartupContext startupContext = new StartupContext();
        habitat.add(new ExistingSingletonInhabitant(startupContext));

        habitat.addComponent(null, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other));
        return habitat;
    }
}
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.