Change Notes item #572585, was opened at 2002-06-22 20:10
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=572585&group_id=22866
Category: JBoss/System
Group: v3.0 (Rabbit Hole)
Status: Open
Priority: 5
Submitted By: David Jencks (d_jencks)
Assigned to: Nobody/Anonymous (nobody)
Summary: Ant jmx task, usable for deployment.
Initial Comment:
I've written an ant task to invoke mbean operations and
set mbean attributes. This can be used among other
things to deploy and redeploy applications and
subpackages from your ant build file.
To use, put these in your ant/lib directory:
jboss-common-client.jar
jboss-j2ee.jar
jboss-system-client.jar (needed only if you expect
DeploymentExceptions)
jbossjmx-ant.jar (from varia/output/lib)
jnet.jar
Here is an example of some deploy/redeploy targets:
<!-- this deploys the myear.ear from where you built it
as an
exploded package, with directories instead of jar files.
Note myear.ear and myejbs.jar are directories, not
jar files-->
<target name="remote-deploy" if="remote.deploy">
<taskdef name="jmx"
classname="org.jboss.ant.JMX"/>
<!-- look in jndi view for what
org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl is bound under-->
<jmx adapterName="jmx:HP.home.home:rmi">
<propertyEditor type="java.net.URL"
editor="org.jboss.util.propertyeditor.URLEditor"/>
<invoke
target="jboss.system:service=MainDeployer"
operation="deploy">
<parameter type="java.net.URL"
arg="file:${unpacked.build.dir}/myear.ear/"/>
</invoke>
</jmx>
</target>
<!-- This redeploys an ejb jar inside the ear we just
deployed -->
<target name="remote-ejb-redeploy">
<taskdef name="jmx"
classname="org.jboss.ant.JMX"/>
<jmx adapterName="jmx:HP.home.home:rmi">
<propertyEditor type="java.net.URL"
editor="org.jboss.util.propertyeditor.URLEditor"/>
<invoke
target="jboss.system:service=MainDeployer"
operation="redeploy">
<parameter type="java.net.URL"
arg="file:${unpacked.build.dir}/myear.ear/myejbs.jar/"/>
</invoke>
</jmx>
</target>
The ant task is available in both 3.0.1 and 3.1 cvs.
The redeploy method and a bug workaround are only in
3.0.1 at the moment.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=572585&group_id=22866
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development