Thanks Guillaume..
Had some issues, but things worked out after I built SM from source..
Can view the MBean now..
But I happened to notice the following error when trying to start the
component...
Bean ''; nested exception is java.lang.NoClassDefFoundError: org/apache/servicem
ix/common/BaseComponent
at org.springframework.beans.factory.parsing.FailFastProblemReporter.err
or(FailFastProblemReporter.java:56)
at org.springframework.beans.factory.support.ReaderContext.error(ReaderC
ontext.java:74)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.er
ror(BeanDefinitionParserDelegate.java:1181)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseBeanDefinitionElement(BeanDefinitionParserDelegate.java:552)
at org.apache.xbean.spring.context.v2b.XBeanBeanDefinitionParserDelegate
.parseBeanDefinitionElement(XBeanBeanDefinitionParserDelegate.java:61)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseBeanDefinitionElement(BeanDefinitionParserDelegate.java:398)
at org.apache.xbean.spring.context.v2b.XBeanNamespaceHandler.parseBeanFr
omExtensionElement(XBeanNamespaceHandler.java:205)
at org.apache.xbean.spring.context.v2b.XBeanNamespaceHandler.parseBeanFr
omExtensionElement(XBeanNamespaceHandler.java:253)
I worked around the above exception by manually copying the SM-Common
jar into lib/optionals but why is the 'servicemix-common' jar not
present in the lib by default?
~Vikas
ps: Checked SM userguide link.. looks great.. eagerly waiting for it
to complete..
On 9/6/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
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