Here is a simple example of disabling a component:
<sun-appserv-component action="disable" name="simpleapp" passwordfile="${passwordfile}" />
Here is a simple example of enabling a component:
<sun-appserv-component action="enable" name="simpleapp" passwordfile="${passwordfile}" />
Here is an equivalent script showing all the implied attributes:
<sun-appserv-component action="enable" name="simpleapp" user="admin" passwordfile="${passwordfile}" host="localhost" port="4849" target="${default-instance-name}" asinstalldir="${asinstalldir}" />
This example demonstrates disabling multiple components using the archive files (EAR and WAR, in this case) and using the component name (for an EJB component in this example).
<sun-appserv-component action="disable" passwordfile="${passwordfile}"> <component file="${assemble}/simpleapp.ear"/> <component file="${assemble}/simpleservlet.war"/> <component name="simplebean" /> </sun-appserv-component>
Components can be enabled or disabled on multiple servers in a single task. This example shows the same three components being enabled on two different instances of the Application Server. In this example, the passwords for both instances are the same.
<sun-appserv-component action="enable" passwordfile="${passwordfile}"> <server host="greg.sun.com"/> <server host="joe.sun.com"/> <component file="${assemble}/simpleapp.ear"/> <component file="${assemble}/simpleservlet.war"/> <component name="simplebean" /> </sun-appserv-component>