/** The log */
private static final Logger log = Logger.getLogger(ServiceControllerRegistrationLifecycleCallback.class);
public void install(ControllerContext context) throws Exception
{
JMX jmx = readJmxAnnotation(context);
ObjectName objectName = createObjectName(context, jmx);
Class<?> intfClass = null;
boolean registerDirectly = false;
if (jmx != null)
{
intfClass = jmx.exposedInterface();
registerDirectly = jmx.registerDirectly();
}
// NOTE: The cast to Class is necessary for compilation under JDK6
Object mbean = (registerDirectly ? context.getTarget()
: new StandardMBean(context.getTarget(), (Class) intfClass));
MBeanServer server = getServiceController().getMBeanServer();