How do I add my own MBean to jmx-console in mobicents SLEE? (for getting SNMP traps)

I need to add a MBean to the jmx-console. This is for getting SNMP get requests and replying to them. I wrote the MBean in a usual way, but I can't find any n00b compatible material anywhere which describes how to add this MBean to the Slee system.

In the SIPRec example, there is a MBean written which is added like this;

MBeanServer mbs = SleeContainer.lookupFromJndi().getMBeanServer();
ObjectName on = null;
try {
    on = new ObjectName(PREFIX + this.name);

if (mbs.getObjectInstance(on) != null) {
    mbs.unregisterMBean(on);
}
mbs.registerMBean(this, on);


} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

But I can't get my Sbb to import the SleeContainer class. What dependency / step makes this import to the project?

Can anyone show me where to look, in order to add this MBean to SLEE and route the SNMP get request using the attributes.xml in snmp adapter.

Thanks.

Answers


I got some help from a friend and he pointed out that adding SIP 11 RA to the project adds this class. The trick here is to refrain from adding it as v 2.7.0.FINAL.

The sip 11 version which correctly imports the class is v 2.6.0.FINAL.

Just change it in the eclipse dialog box which pops up when adding dependencies if you're using the plugin to add the dependencies.

This is the dependency list in my pom.xml in sbb directory

<dependencies>
    <dependency>
      <groupId>javax.slee</groupId>
      <artifactId>jain-slee</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mobicents.servers.jainslee.api</groupId>
      <artifactId>jain-slee-11-ext</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mobicents.resources</groupId>
      <artifactId>http-servlet-ratype</artifactId>
      <version>2.4.0.FINAL</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.mobicents.resources</groupId>
      <artifactId>sip11-ratype</artifactId>
      <version>2.6.0.FINAL</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

Need Your Help

Crontab Not Working Ubuntu

php laravel ubuntu crontab

I am using crontab in ubuntu to send a csv to an email everyday, however it's not sending out. Why?

is there a cleaner way to edit 1 of the 4 CGRect values of a UIView's frame?

ios objective-c cocoa-touch

generally when I want to move a label to the right 20px, or increase just the width of a view, I go through one of the following avenues