users@glassfish.java.net

Re: Autostarting instance2 in cluster setup

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Tue, 20 Mar 2012 16:27:29 -0500

When setting up a production installation, it is preferable to use the
create-service command on each node so that starting of each instance is
integrated into startup of the operating system. That way if the the
node host boots, the instance will be automatically restarted.

start-cluster and stop-cluster are meant for developer and upgrade type
situations.

Tom


On 3/20/2012 6:07 AM, Poul Møller Hansen wrote:
> I have made a two node cluster setup with Glassfish 3.1.2 on Ubuntu
> 10.04 LTS, and it works like a charm.
>
> However autostarting the services is a problem for me.
>
> On the DAS I have altered the startup script, so it is also starting
> the cluster.
>> case "$1" in
>> start)
>> $ASADMIN start-domain --domaindir
>> /opt/glassfish3/glassfish/domains domain1
>> $ASADMIN start-cluster cluster1
>> ;;
>> stop)
>> $ASADMIN stop-cluster cluster1
>> $ASADMIN stop-domain --domaindir
>> /opt/glassfish3/glassfish/domains domain1
>> ;;
>
> Is this the way of doing it ?
>
> How can I autostart the cluster instance on the second node after
> reboot ?
>
>
> Thanks
> Poul