Need to annotate the jmx lifecycle for MicroContainer usage:
public interface Service
{
@CreateLifecycle
void create() throws Exception;
// etc.
}
public class MyService implements Service
{
public void create() {}
}
Method createMyService = MyService.class.getMethod("create", new Class[0]);
Method createService = Service.class.getMethod("create", new Class[0]);
createMyService.getAnnotation(CreateLifecycle.class); // returns null
createService.getAnnotation(CreateLifecycle.class); // returns CreateLifecycle