This example starts the local Enterprise Server instance:
<sun-appserv-instance action="start" passwordfile="${passwordfile}"
instance="${default-instance-name}"/>
Here is an equivalent script showing all the implied attributes:
<sun-appserv-instance
action="start"
user="admin"
passwordfile="${passwordfile}"
host="localhost"
port="4848"
instance="${default-instance-name}"
asinstalldir="${asinstalldir}" />
Multiple servers can be controlled using a single command. In this example, two servers are restarted, and in this case each server uses a different password:
<sun-appserv-instance action="restart"
instance="${default-instance-name}"/>
<server host="greg.sun.com" passwordfile="${password.greg}"/>
<server host="joe.sun.com" passwordfile="${password.joe}"/>
</sun-appserv-instance>
This example creates a new Enterprise Server instance:
<sun-appserv-instance
action="create" instanceport="8080"
passwordfile="${passwordfile}"
instance="development" />
Here is an equivalent script showing all the implied attributes:
<sun-appserv-instance
action="create"
instanceport="8080"
user="admin"
passwordfile="${passwordfile}"
host="localhost"
port="4848"
instance="development"
asinstalldir="${asinstalldir}" />
Instances can be created on multiple servers using a single command. This example creates a new instance named qa on two different servers. In this case, both servers use the same password.
<sun-appserv-instance
action="create"
instanceport="8080"
instance="qa"
passwordfile="${passwordfile}>
<server host="greg.sun.com"/>
<server host="joe.sun.com"/>
</sun-appserv-instance>
These instances can also be removed from their respective servers:
<sun-appserv-instance
action="delete"
instance="qa"
passwordfile="${passwordfile}>
<server host="greg.sun.com"/>
<server host="joe.sun.com"/>
</sun-appserv-instance>
Different instance names and instance ports can also be specified using attributes of the server subelement:
<sun-appserv-instance action="create" passwordfile="${passwordfile}>
<server host="greg.sun.com" instanceport="8080" instance="qa"/>
<server host="joe.sun.com" instanceport="9090"
instance="integration-test"/>
</sun-appserv-instance>