ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject Re: [SUBMIT] AntJMX
Date Tue, 13 Aug 2002 20:26:15 GMT
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 bdueck@metasolv.com 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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message