Powered By Blogger

Tuesday, March 6, 2012

Exposing Spring Beans as JMX Mbeans
























package org.springframework.jmx;

public class JmxTestBean {

private String name;
private int age;
private boolean isSuperman;

public int getAge() {
return age;
}

public void setAge(int age) {
this.age = age;
}

public void setName(String name) {
this.name = name;
}

public String getName() {
return name;
}

public int add(int x, int y) {
return x + y;
}

public void dontExposeMe() {
throw new RuntimeException();
}
}


Create the jar out of the source and deploy it
to Alfresco WEB_INF/lib folder

ANd move the context file to server shared folder

Now you will be able to see the name bean in Mbeans
section. Here we can change the values by calling
different methods/operations.

1 comment:

  1. I was almost lost hope when Pass4sure Checkpoint dumps changed my view and strengthen me to work diligently. I work hard according to the guidelines given by experienced experts on Dumpspass4sure. I am thankful to the team of experts who are behind this great effort and made it possible for me to pass my exam with Checkpoint PDF questions and answers.

    ReplyDelete