On Tue, 13 Aug 2002, David Jencks wrote:
> I like all of this. I will repeat my previous assertion that ant has a
> great deal of functionality overlap with jmx and that ant 2 would be
> considerably simpler if it consisted of several mbeans to be run inside a
> jmx mbean server.
And why would that be in ant2 ? I was thinking in terms of add-ons
for the current ant1.5.
The nice thing about JMX is that it doesn't require you to implement any
interface or do anything special - and the patterns are identical with
what ant uses.
Each ant task is a very nice MBean - all that's missing is the XML
descriptor for a model-mbean. With introspection-based mbeans ( like
DynamicMBean in tomcat ) you don't even need that.
> For comparison, the jboss xml format for specifying an mbean and its
> initial configuration is something like this:
>
> <mbean code="org.somewhere.MyClass" name="myjmx.module:service=DoItNow">
> <attribute name="att1">value</attribute>
> <attribute name="att2">value2</attribute>
> </mbean>
Yes, that's exactly the format I was proposing for the jmx task (instead
of createMBean).
Costin
> There are also ways to include constructor arguments and references to
> other mbeans (via ObjectNames) are handled in a special way.
>
> These is some discussion as to the appropriateness of including both the
> existence and configuration of an mbean in the same configuration, but it
> works fairly well for us.
>
> Thanks
> david jencks
>
> On 2002.08.13 16:26:15 -0400 [EMAIL PROTECTED] wrote:
> > Excelent ! I was planning to do this myself.
> >
> > If this is accepted, I think it would be a good idea to start
> > a separate module ( i.e. a directory, in the style of jakarta-commons )
> > for all jmx-related tasks. This will eventually generate an antlib
> > ( assuming we agree on the antlib semantics ).
> >
> > There are few other jmx related things I would like to see ( and
> > I'll do as soon as I find the time ). One is to use modeler to
> > create a JMX layer on top of ant - i.e. applications embeding ant
> > can use JMX to load it and configure it. Each task can be
> > easily wrapped in a DynamicMBean ( or ModelMBean ). The other
> > thing is to add a task for modeler, to allow arbitrary objects
> > to be JMX-enabled.
> >
> > I'm not very sure about the syntax used ( configureMBean,... ).
> > It would be worth supporting something like:
> > <mbean>
> > <attribute name="foo">value</attribute>
> > ...
> > </mbean>
> > ( for creation of an mbean )
> >
> > showMBean should follow the properties semantics ( or the new dynamic
> > properties ? ), i.e. set a property from the attribute value.
> >
> > For invokeMBean - I was planning to use a new TaskAdapter that
> > would 'wrap' the MBean as a regular ant task.
> >
> > There are other details like that - but overall I think it's a good
> > idea and is worth pushing it.
> >
> > I'll wait for feedback from other ant developers - if it doesn't
> > get into the main tree I would be happy to import it for now in the
> > embed/ proposal ( that would also make it useable with ant1.5 ).
> > If it gets in the main tree I'll try to hack the build process
> > so that the embed gets the new tasks.
> >
> > Costin
> >
> >
> > On Sun, 11 Aug 2002 [EMAIL PROTECTED] wrote:
> >
> > >
> > > Ant Tasks: configureMBean, copyMBean, invokeMBean, removeMBean,
> > showMBean
> > >
> > > Purpose: Allow Ant tasks to interact with JMX MBeans.
> > > My motivation was to provide tools for J2EE resource creation and
> > > management from Ant that I use to build/deploy application.
> > > (e.g. create my JDBC pool and JMS queues/topics before I deploy my
> > > entity and message driven beans...), but the tasks are general enough
> > > for much broader use.
> > >
> > > The current implementation supports BEA WLS 6.x/7.x and JBoss 3.0.1RC1.
> > > Support for the JSR77 standard, and other JMX implementations is
> > planned.
> > >
> > > In brief, the tasks provided are:
> > >
> > > configureMBean : get/set MBean properties
> > > invokeMBean : invoke an MBean operation
> > > copyMBean : copies all the properties of an MBean to a new
> > MBean
> > > of
> > > the same type
> > > removeMBean : unregisters an MBean from the MBeanServer
> > > createMBean : creates a new MBean
> > > showMBean : writes information about the MBean to the Ant
> > log
> > >
> > > Here's a simple example of how configureMBean works follows:
> > >
> > > <configureMBean name="mydomain:Name=mypool,Type=JDBCConnectionPool"
> >
> > > failOnError="false" serverType="weblogic" user="system"
> > > password="secret">
> > > <setAttribute name="MaxCapacity" value="${pool.size}"/>
> > > <getAttribute name="TestTableName" property="testTable"/>
> > > </configureMBean>
> > >
> > > Please refer to the user documentation for more information on all
> > > the tasks.
> > >
> > > All constructive comments and feedback is very much appreciated.
> > >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>