Configuring appeonmonitor.bat

The appeonmonitor.bat file (Windows) or appeonmonitor.sh file (Unix\Linux) is the batch program run by Status Monitor.

Make the following changes to the settings in appeonmonitor.bat file (Windows) or appeonmonitor.sh file (Unix\Linux).

For appeonmonitor.bat and appeonmonitor.sh files, the settings and modification are almost the same. The only difference is that forward slash ("/") is used as the path separator in Unix\Linux while back slash ("\") is used in Windows.

Table 9. Configure appeonmonitor.bat

Settings

Description

EASERVER_​HOME

Specifies the path of EAServer.

For example, EASERVER_HOME=C:\Program Files\Sybase\EAServer6

JAVA_HOME

Specifies the JDK location, which must be the same one used by Appeon Server.

For example, for EAServer running on Windows, the value of JAVA_HOME is:

JAVA_HOME=C:\Program Files\Sybase\Shared\jdk1.6.0_18.

Note: 1) If Appeon Server works on WebLogic, verify that the WLS_USER and WLS_PW variables in the startWebLogic.cmd (Windows) or startWebLogic.sh (Unix\Linux) file contain the correct login credentials.

2) If Appeon Server works on WebSphere, only when the IBM JDK is used can Status Monitor function properly.

APPEON_HOME

Specifies the Appeon Server home directory.

EAServer: <JAGUAR>\appeon

WebSphere: <WAS_HOME>\appeon

WebLogic: <WL_HOME>\appeon

NetWeaver Application Server: <NAS_HOME>\appeon

JBoss: <JB_HOME>\appeon

Note: <JAGUAR> indicates the EAServer installation directory; <WAS_HOME> indicates the home directory of WebSphere server; <WL_HOME> indicates the home directory of WebLogic; <NAS_HOME> indicates the home directory of NetWeaver Application Server; and <JB_HOME> indicates the home directory of JBoss.

For example, if Appeon Server works on EAServer, the Appeon Server home directory is: APPEON_HOME= C:\Program Files\Sybase\EAServer\appeon.

If Appeon Server works on WebLogic 9.2, the Appeon Server home directory is: APPEON_HOME= C:\bea\weblogic92\appeon.

J2EE_JAR

Changes the default setting according to the Appeon Server in use:

EAServer: <JAGUAR>\lib\eas-server-16.jar

WebLogic: <WL_HOME>\server\lib\weblogic.jar

WebSphere: <WAS_HOME>\lib\j2ee.jar

JBoss 5: <JB_HOME>\common\lib\mail.jar, <JB_HOME>\client\jboss-javaee.jar

JBoss 7: <JB_HOME>\common\lib\mail.jar, <JB_HOME>\modules\javax\ejb\api\main\jboss-ejb-api_3.1_spec-1.0.1.Final.jar

Note: In different JBoss 7 builds, the name of jboss-ejb-api_3.1_spec-1.0.1.Final.jar may be slightly different.

For example, if Appeon Server works on EAServer, the home directory is: J2EE_JAR=C:\Program Files\Sybase\EAServer\lib\eas-server-16.jar.

CLASS_PATH

Default setting:

CLASS_PATH=%EASERVER_HOME%\lib\ext\appeon_server.jar;%J2EE_JAR%

You do not need to make any changes to the default setting.

NeedToEncrypted​EASPWD

Specify the administrator password of EAServer 6.x.

For example, NeedToEncryptedEASPWD=appeon123

After you set the password, comment out the following script in appeonmonitor.bat, then run appeonmonitor.bat to encrypt the password, and after you get the encrypted password, make sure to clean the password here and then input the encrypted password to EASPWD below.

"%JAVA_HOME%/bin/java.exe" -cp "%CLASS_PATH%" -Dappeon.home="%APPEON_HOME%" com.appeon.server.monitor.StatusMonitor -e "%NeedToEncryptedEASPWD%"

EASUSER

Specify the administrator user name of EAServer 6.x.

For example, EASUSER=admin@system

Note that the user name must be in this format "admin@system".

EASPWD

Input the encrypted password of EAServer 6.x. The encrypted password is generated after you set NeedToEncryptedEASPWD. Please see "NeedToEncryptedEASPWD" for details.

For example, EASPWD=YXBwZW9uMTIz

After you input the encrypted password here, make sure to clean the password in NeedToEncryptedEASPWD.


After you properly configure the above settings, make sure to uncomment the following scripts, so Status Monitor can start normally.

"%JAVA_HOME%/bin/java.exe" -cp "%CLASS_PATH%" -Dappeon.home="%APPEON_HOME%" 
com.appeon.server.monitor.StatusMonitor -e "%NeedToEncryptedEASPWD%"
"%JAVA_HOME%/bin/java.exe" -cp "%CLASS_PATH%" -Dappeon.home="%APPEON_HOME%" 
-Deas.user="%EASUSER%" -Deas.pwd="%EASPWD%" com.appeon.server.monitor.StatusMonitor

Here is a sample of a configured appeonmonitor.bat file:

@echo off  

cls
SETLOCAL

title Appeon Server Status Monitor

REM Please replace <EASERVER_HOME> with the real path of EAServer6

set EASERVER_HOME=C:\Program Files\Sybase\EAServer6

set JAVA_HOME=C:\Program Files\Sybase\Shared\jdk1.6.0_18

set APPEON_HOME=C:\Program Files\Sybase\EAServer6\appeon

set J2EE_JAR=C:\Program Files\Sybase\EAServer6\lib\eas-server-16.jar

set CLASS_PATH=%EASERVER_HOME%/lib/ext/appeonserver.jar;%J2EE_JAR%

REM Please replace <NeedToEncryptedEASPWD> with the administrator password of 
EAServer 6.x. Make sure to clean the password after you have encrypted it.
set NeedToEncryptedEASPWD=

REM Please replace <EASUSER> with the administrator user name of EAServer 6.x
set EASUSER=admin@system

REM Please replace <EASPWD> with the administrator password of EAServer 6.x that 
is encrypted
set EASPWD=YXBwZW9uMTIz

REM If you want to encrypt the administrator password of EAServer 6.x, please 
uncomment the line below
"%JAVA_HOME%/bin/java.exe" -cp "%CLASS_PATH%" -Dappeon.home="%APPEON_HOME%" 
com.appeon.server.monitor.StatusMonitor -e "%NeedToEncryptedEASPWD%"

REM If you want to start status monitor,  please uncomment the line below
"%JAVA_HOME%/bin/java.exe" -cp "%CLASS_PATH%" -Dappeon.home="%APPEON_HOME%" 
-Deas.user="%EASUSER%"  -Deas.pwd="%EASPWD%" com.appeon.server.monitor.StatusMonitor

echo Appeon Server Status Monitor terminated.

PAUSE
ENDLOCAL