Package org.apache.felix.ipojo

Examples of org.apache.felix.ipojo.ComponentFactory.createComponentInstance()


   
    public void testBadTransition() {
        try {
            ComponentFactory cf = new ComponentFactory(getContext(), getBadTransition());
            cf.start();
            ComponentInstance ci = cf.createComponentInstance(props);
            ci.dispose();
            cf.stop();
            fail("A lifecycle callback with a bad transition must be rejected " + cf);
        } catch (ConfigurationException e) {
           // OK
View Full Code Here


        Properties props2 = new Properties();
        props2.put("instance.name", "foo2");

        ComponentInstance ci1 = null, ci2 = null;
        try {
            ci1 = factory.createComponentInstance(props1);
            ci2 = factory.createComponentInstance(props2);
        } catch (Exception e) {
            fail("Cannot instantiate foo providers : " + e.getMessage());
        }
View Full Code Here

        props2.put("instance.name", "foo2");

        ComponentInstance ci1 = null, ci2 = null;
        try {
            ci1 = factory.createComponentInstance(props1);
            ci2 = factory.createComponentInstance(props2);
        } catch (Exception e) {
            fail("Cannot instantiate foo providers : " + e.getMessage());
        }

        assertTrue("Check foo1 validity", ci1.getState() == ComponentInstance.VALID);
View Full Code Here

    Properties props2 = new Properties();
    props2.put("instance.name","foo2");
   
    ComponentInstance ci1 = null, ci2 = null;
    try {
      ci1 = factory.createComponentInstance(props1);
      ci2 = factory.createComponentInstance(props2);
    } catch(Exception e) {
      fail("Cannot instantiate foo providers : " + e.getMessage());
    }
   
View Full Code Here

    props2.put("instance.name","foo2");
   
    ComponentInstance ci1 = null, ci2 = null;
    try {
      ci1 = factory.createComponentInstance(props1);
      ci2 = factory.createComponentInstance(props2);
    } catch(Exception e) {
      fail("Cannot instantiate foo providers : " + e.getMessage());
    }
   
    assertTrue("Check foo1 validity", ci1.getState() == ComponentInstance.VALID);
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.