-1

I am using an annotated pojo-MBean. But the mbean does not come up in the jmx-console after deployment. I believe that with annotations, usage of jboss-service.xml is not required. Could someone explain as to what I could probably be missing?
I am using version jboss 5.1 and my mbean looks something like this -

@Service(objectName = Statistics.ManagementJNDIName)
@Depends({ Statistics.MSEJNDIName })

public class StatisticsImplMBean  {
....
}
oers
  • 18,436
  • 13
  • 66
  • 75

1 Answers1

0

Have you defined a @Management interface for your MBean?

Example:

public interface IStatisticsMBean {
  void printStatistics();
  ....
}

@Management(IStatisticsMBean.class)
@Service(objectName = Statistics.ManagementJNDIName)
@Depends({Statistics.MSEJNDIName})
public class StatisticsImplMBean {
....
}
Robert Durgin
  • 1,810
  • 19
  • 23
  • I am completely new to the mbean usage. I have created an interface. And used the @Management without the .class specification. – user1045695 Nov 14 '11 at 14:28
  • Would be great if you could tell me some steps to achieve simple annotated usage of mbean and to view it on the jmx console. Would the interface contain any annotations? – user1045695 Nov 14 '11 at 14:28
  • 2
    See: http://www.mastertheboss.com/jboss-application-server/44-jboss-mbeans-pojo.html – Robert Durgin Dec 07 '11 at 18:28