Alarmnummer
May 16th, 2006, 10:13 AM
How can I expose an MBean where only the interface of the MBean is made public.
example:
interface FooMBean{
void start();
}
classs FooMBeanImpl implements FooMBean{
private FooService fooService;
public void setFooService(FooService fooService){
this.fooService = fooService;
}
public void start(){
fooService.start();
}
}
If I expose the FooMBean with an exporter, I also see the methods of the implementation and this isn't what I want.
example:
<bean id="fooMBean"
class="FooMBeanImpl">
<property name="fooService" ref="fooService"/>
</bean>
<bean id="exporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="jteam:bean=fooMBean" value-ref="fooMBean"/>
</map>
</property>
</bean>
example:
interface FooMBean{
void start();
}
classs FooMBeanImpl implements FooMBean{
private FooService fooService;
public void setFooService(FooService fooService){
this.fooService = fooService;
}
public void start(){
fooService.start();
}
}
If I expose the FooMBean with an exporter, I also see the methods of the implementation and this isn't what I want.
example:
<bean id="fooMBean"
class="FooMBeanImpl">
<property name="fooService" ref="fooService"/>
</bean>
<bean id="exporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="jteam:bean=fooMBean" value-ref="fooMBean"/>
</map>
</property>
</bean>