use of org.apache.felix.ipojo.composite.CompositeFactory in project felix by apache.
the class CompositeComponentType method createFactory.
/**
* Creates the component factory.
*/
private void createFactory() {
ensureValidity();
m_metadata = generateComponentMetadata();
try {
m_factory = new CompositeFactory(m_context, m_metadata);
m_factory.start();
} catch (ConfigurationException e) {
throw new IllegalStateException("An exception occurs during factory initialization", e);
}
}
use of org.apache.felix.ipojo.composite.CompositeFactory in project felix by apache.
the class TestInstanceScope method testScopeUnvailability.
@Test
public void testScopeUnvailability() {
CompositeFactory factory2 = (CompositeFactory) ipojoHelper.getFactory("SCOPE-badscope");
assertNotNull("Factory", factory2);
ComponentInstance instance2 = null;
try {
instance2 = factory2.createComponentInstance(null);
} catch (Exception e) {
fail("Fail instantiation : " + e.getMessage());
}
// System.out.println(instance2.getInstanceDescription().getDescription());
assertEquals("Check invalidity", ComponentInstance.INVALID, instance2.getState());
instance2.dispose();
}
Aggregations