RmiRegistryTask
Wednesday, November 13, 2002
Description
Runs the remote method invocation registry (the rmiregistry) as a background process.
This task is a simple extension of the BackgroundExecTask and inherits all its behavior and parameters. Please read the manual page for BackgroundExecTask.
Parameters
Attribute |
Description |
Required |
executable |
inherited from BackgroundExecTask. |
No, defaults to <java.home>/bin/rmiregistry |
id |
unique identifier for this process, required if you wish to further manage the spawned process using the ProcessTask |
No |
newenvironment |
inherited from BackgroundExecTask. |
No, defaults to true |
startuptime |
inherited from BackgroundExecTask. |
No, defaults to 1 second |
port |
The port number for rmiregistry to listen on. |
No, defaults to 1099 |
Example
<taskdef name="rmireg" classname="com.eatrmi.tools.ant.taskdefs.rmi.RmiRegistryTask"/>
<taskdef name="proc" classname="com.eatrmi.tools.ant.taskdefs.process.ProcessTask"/>
<rmireg id="rmireg" port="16000"/>
<proc refid="rmireg" resultproperty="rmireg.result"/>
<fail if="rmireg.result" message="Activation system died prematurely"/>
<proc refid="rmireg" waitfor="true" waitfortimeout="10000" destroy="true" destroytimeout="2000" resultproperty="rmireg.result"/>
Starts the rmi registry on port 16000. Then, later, checks to see if registry is still alive using the ProcessTask and fails if it's not. Finally, kills the registry and waits 2 seconds for it to completely exit only after waiting for normal termination for 10 seconds. Puts the result in the property rmireg.result.