ComponentStateListeningInstance implementation = new ComponentStateListeningInstance(e);
Component s = m.createComponent()
.setInterface(MyInterface.class.getName(), null)
.setImplementation(implementation);
// add the state listener
s.addStateListener(implementation);
// add it, and since it has no dependencies, it should be activated immediately
m.add(s);
// remove it so it gets destroyed
m.remove(s);
// remove the state listener