public ManagementContext mgmt() {
return mgmtMaybe().get();
}
protected synchronized Maybe<ManagementContext> mgmtMaybe() {
if (managementContext!=null) return Maybe.of(managementContext);
<BUG>managementContext = (ManagementContext) servletContext.getAttribute(BrooklynServiceAttributes.BROOKLYN_MANAGEMENT_CONTEXT);
if (managementContext!=null) return Maybe.of(managementContext);</BUG>
return Maybe.absent("ManagementContext not available for Brooklyn Jersey Resource "+this);
}
@Override

public ManagementContext mgmt() {
return mgmtMaybe().get();
}
protected synchronized Maybe<ManagementContext> mgmtMaybe() {
if (managementContext!=null) return Maybe.of(managementContext);
managementContext = OsgiCompat.getManagementContext(servletContext);
if (managementContext!=null) return Maybe.of(managementContext);
return Maybe.absent("ManagementContext not available for Brooklyn Jersey Resource "+this);
}
@Override
