It should work.
Put a breakpoint in getExtensionMBean and try to debug.
It should be called by the container.
On 9/6/06, vikas kumar <[EMAIL PROTECTED]> wrote:
Hi..
public interface BAMConfigurationMBean {
public String getActions();
public String getRules();
public String getGlobalConfig();
public void setActions(String action);
public void setRules(String rules);
public void setGlobalConfig(String globalConfig);
}
Thats the MBean Interface.. And I do have a samle Implementation. I
have packaged them in the same package as the original BAMComponent
"org.apache.servicemix.bam"
On 9/6/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
> Did you write a BAMConfigurationMBean interface and
> make BAMConfiguration implement it ?
>
> On 9/6/06, vikas kumar <[EMAIL PROTECTED]> wrote:
> >
> > Hi..
> > Tried configuring the BAMComponent to get configuration data from
> > MBean instead of the file-system..
> >
> > Added the following to the BAMEndpoint
> >
> > public BAMConfiguration getConfiguration() {
> > BAMLifeCycle lifeCycle = (BAMLifeCycle)
> > getServiceUnit().getComponent().getLifeCycle();
> > return lifeCycle.getConfiguration();
> > }
> >
> > Added the following to the BAMLifecycle
> >
> > public BAMLifeCycle(BaseComponent component) {
> > super(component);
> > configuration = new BAMConfiguration();
> > }
> > protected Object getExtensionMBean() throws Exception {
> > return configuration;
> > }
> > public BAMConfiguration getConfiguration() {
> > return configuration;
> > }
> > public void setConfiguration(BAMConfiguration configuration) {
> > this.configuration = configuration;
> > }
> >
> >
> > I thought I'll be able to view a configuration MBean using JConsole..
> > But its not registered..
> > I can view the Component and Endpoint MBeans though..
> >
> > Any leads on what should be done to automatically register MBeans when
> > an endpoint starts?
> >
> > ~Vikas
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
Cheers,
Guillaume Nodet