Chapter 3 Creating and Configuring Servers
Before you can develop EAServer applications, you must start the server.
You can run a server in different modes, debug and normal, using different Java runtime versions and different Java virtual machines (VMs). To start the server in the desired configuration, change to EAServer's bin directory and run either serverstart.sh (UNIX) or serverstart.bat (Windows) with the options described in Table 3-9.
Option | Description |
---|---|
-servername server |
Specify the name of the server; the default is "Jaguar". |
-jdk12 | -jdk13 |
Specify the JDK version; the default is 1.3. |
-debug |
Run the server in debug mode. |
-msdev |
Windows only - enable in-process debugging in Microsoft Visual C++. The required Microsoft Visual C++ environment settings must be in effect for the server process. If necessary, add the Microsoft Visual C++ settings to the bin\user_setenv.bat file. |
-xterm |
UNIX only - run the server in a new window opened by xterm. |
-jvmtype [classic | client | server] |
Specify which Java VM to use:
On Solaris, if you use JDK 1.2, you must run the classic Java VM; if you use JDK 1.3, you can run either of the HotSpot VMs. On Windows NT or Windows 2000, if you run JDK 1.2, the default is the HotSpot Server VM; if you run JDK 1.3, the default is the HotSpot Client VM. |
-install | -uninstall | -remove | -removeandinstall | -stop | -start | -c |
Windows only - these options
apply to servers that run as NT services:
|
-v |
Windows only - displays version information in the console then exits. |
"Operating system configuration" describes how to set environment variables that you may need to run the server.
Starting a server in UNIX
set path = ($path /usr/local/SUNWmotif/bin/)
serverstart.sh [-servername server] [-jdk12 | -jdk13] [-debug] \ [-xterm] | [-jvmtype classic | client | server]
Debug and JDK 1.3 servers Debug-mode servers allow you to remotely debug components from tools that support EAServer component debugging, such as PowerBuilder or PowerJ. You cannot run the debug-mode server unless you installed the debug libraries and binaries. The debug server cannot run as an NT service.
EAServer can run with your choice of Java runtime engines, including Sun JDK 1.2 or 1.3. You must run EAServer with JDK 1.3 to use the full set of available features.You should run production servers in the background with the nohup command. This allows you to log out of the system without shutting down the server.
To run a server in the background, change to the $JAGUAR directory, and run this command:
nohup ./serverstart.sh -servername server > serverconsole.log 2>&1 serverconsole.log &
where server is the server name as displayed in Jaguar Manager. nohup runs the server and prevents its shutdown when you log out. Console output (stderr and stdout) is directed to a file named serverconsole.log.
Starting a server in Windows
serverstart [-servername server] [-jdk12 | -jdk13] [-debug] \ [-msdev] [-jvmtype classic | client | server] \ [-install | -uninstall | -remove | -removeandinstall | \ -stop | -start | -c] [-v]
If a server is installed as an NT service, the server is started automatically whenever you start NT. To start a service manually, you can use the Services dialog in the Windows NT Control Panel, as follows:
You can also run this command in the EAServer bin subdirectory:
serverstart -servername service_name -startwhere service_name is the name of the server. To stop the server, use:
serverstart -servername service_name -stop
You should install production servers as NT services, so the server starts automatically when NT starts. Do not install development servers as NT services, since you will often want to run the debug server on your development machine, and you cannot run the debug server as an NT service.
Installing a server as an NT service
serverstart -servername server -jdk12 -install
serverstart -servername server -jdk13 -install
Removing a server from the list of NT services
serverstart -servername servicename -removewhere servicename is the name of the server as displayed in the Services dialog in the Windows NT Control Panel.
Edit service names separately If you delete a server definition in Jaguar Manager after installing an NT service for that server, run the serverstart command to remove the server from the list of services.
Run the following command from the %JAGUAR%\bin directory:
serverstart -servername server -v
This command displays the version of the server, without starting the server.
You can use the JagRepair server when you cannot start your server; for example, if you have specified incorrect Object Transaction Service (OTS) settings which prevent the server from starting and makes it impossible to correct the problem. The JagRepair server is read-only and provided for repair purposes only.
Starting and connecting to the JagRepair server
serverstart.sh -servername JagRepair
serverstart -servername JagRepair
jagadmin
as
the User Name
9000
as the
Port Number
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |