Restarting Automatically Using inittab on Solaris 9 and Linux
Platforms
To restart your domain on the Solaris 9 or Linux platform, add a line of text to the
/etc/inittab
file.
If you use
/etc/rc.local,
or your system’s equivalent, place a line in
/etc/rc.local
that calls
the desired
asadmin
command.
For example, to restart
domain1
for an Enterprise Server installed in the
opt/SUNWappserver
directory, using a password file called
password.txt
:
das:3:respawn:/opt/SUNWappserver/bin/asadmin start-domain --user admin
--passwordfile /opt/SUNWappserver/password.txt domain1
Put the text on one line. The first three letters are a unique designator for the process and can be
altered.
To restart a node agent, the syntax is similar. For example, to restart
agent1
for an Enterprise
Server installed in the
opt/SUNWappserver
directory, using a password file called
password.txt
:
das:3:respawn:/opt/SUNWappserver/bin/asadmin start-node-agent --user admin
--passwordfile /opt/SUNWappserver/password.txt agent1
Restarting Automatically on the Microsoft Windows Platform
To restart automatically on Microsoft Windows, create a Windows Service and prevent the
service from shutting down when a user logs out.
Creating a Windows Service
Use the
appservService.exe
and
appserverAgentService.exe
executable files shipped with
the Sun GlassFish Enterprise Server in conjunction with the Service Control command
(
sc.exe
) provided by Microsoft.
The
sc.exe
command comes with Windows XP and is in the
system32
subdirectory of the
Windows installation directory (usually either
C:\windows\system32
or
C:\winnt\system32
).
As of this writing, the Windows 2000
sc.exe
is available for download at
ftp://ftp.microsoft.com/reskit/win2000/sc.zip
. For more information on using
sc.exe
,
see
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dndllpro/html/msdn_scmslite.asp
.
Use
appservService.exe
and
appservAgentService.exe
as follows:
Restarting Automatically on the Microsoft Windows Platform
Appendix A • Automatically Restarting a Domain or Node Agent
223
Summary of Contents for Sun GlassFish Enterprise Server 2.1
Page 12: ...12 ...
Page 13: ...Figures FIGURE 1 1 Enterprise Server Instance 29 FIGURE 9 1 RoleMapping 105 13 ...
Page 14: ...14 ...
Page 18: ...18 ...
Page 38: ...38 ...
Page 62: ...62 ...
Page 96: ...96 ...
Page 126: ...126 ...
Page 160: ...160 ...
Page 214: ...214 ...
Page 218: ...218 ...
Page 230: ...230 ...