This is not a generic solution. It's simply a work around for a special case. Besides
it
only allows a once off configuration, what if I later want to add another configuration
? It might be sufficient for this one simple case, but not much more.
JMX defines (I think I'm right in saying) attributes which map via a getter/setter
pattern onto a Bean property and are supported by jboss.jcml and operations, which seem
to be all methods which do not fit the attribute pattern.
Why not simply allow the calling of these operations (albeit just the ones that take
0-N
String args) via jboss.jcml.
At the moment I am just using a Configuration attribute, and can call setConfiguration
multiple times to achieve the effect that I want, but the semantics are all wrong. My
configuration is not an attribute.
There must be other MBeans out there which have an interface which is not solely
comprised of attributes. Does no-one need access to other operations on their MBeans ?
Jules
Scott M Stark wrote:
> All that seems to be required is to extend jboss.jcml to allow for attributes
> that accept an array of values:
>
> <attribute-array name="configuration">
> <value>config1.xml</value>
> <value>config2.xml</value>
> ...
> </attribute-array>
>
> which is translated into a setConfiguration(String[]) method invocation on the
> mbean.
>
> ----- Original Message -----
> From: "Julian Gosnell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 01, 2001 2:21 AM
> Subject: [JBoss-dev] <mbean/> in jboss.jcml.... <attribute/> but not <operation/> ??!
>
> > I am working on integrating Jetty (Open Source Http
> > Server) with JBoss via JMX.
> >
> > I am coming to grips with the boundary between JMX and
> > JBoss.
> >
> > The jboss.jcml file seems to fall on the JBoss side of
> > this.
> >
> > I would like to be able to not only set JMX attribute
> > values on MBeans via jboss.jcml, but also call
> > operations (which I don't seem to be able to find any
> > code to do).
> >
> > Here's why :
> >
> > Jetty takes a configuration file.
> >
> > In jboss.jcml I configure my JettyMBean via a
> > <attribute name="configuration">...</attribute>.
> >
> > Now consider that Jetty is able to load up
> > configuration from more than one file (you might put
> > different groups of servlets into different files,
> > then want to run them all in the same Jetty).
> >
> > Simply having a Configuration attribute is not enough.
> >
> > Configuration is no longer a singleton.
> >
> > JMX does not (AFAIK) provide any mappings for such
> > N-ary relationships, so I seem to be left to define my
> > own e.g. add/[remove] Configuration operations.
> >
> > No problemo ! except that JBoss only seems to be
> > prepared to grok <attribute/> tags and ignores e.g.
> > <operation/> tags in jboss.jcml.
> >
> > So :
> >
> > - am I talking rubbish ?
> > - am I going about it the wrong way ?
> > - is this a valid point ?
> > - have I unwittingly started a jihad ?
> >
> > Thanks for your time,
> >
> >
> >
> > Jules
> >
> >
> > ____________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> > or your free @yahoo.ie address at http://mail.yahoo.ie
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development