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

JBOSS_HOME

Specifies the path of JBoss. For example, JBOSS_HOME=C:\Program Files\jboss-eap-6.1.

JAVA_HOME

Specifies the JDK location, which must be the same one used by PowerServer. For example, JAVA_HOME=C:\Program Files\Java\jdk1.6.0_18.

Note: 1) If PowerServer 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 PowerServer works on WebSphere, only when the IBM JDK is used can Status Monitor function properly.

APPEON_HOME

Specifies the PowerServer home directory.

WebSphere: <WAS_HOME>\appeon

WebLogic: <WL_HOME>\appeon

JBoss: <JB_HOME>\appeon

Note: <WAS_HOME> indicates the home directory of WebSphere server; <WL_HOME> indicates the home directory of WebLogic; and <JB_HOME> indicates the home directory of JBoss.

For example, If PowerServer works on WebLogic 9.2, the PowerServer home directory is: APPEON_HOME= C:\bea\weblogic92\appeon.

For example, if Appeon Server works on JBoss, the PowerServer home directory is: APPEON_HOME= C:\Program Files\jboss-eap-6.1\appeon.

J2EE_JAR

Changes the default setting according to the PowerServer in use:

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

WebSphere: <WAS_HOME>\lib\j2ee.jar

JBoss EAP: <JB_HOME>\modules\system\layers\base\javax\mail\api\main\mail-1.4.5-redhat-1.jar, <JB_HOME>\modules\system\layers\base\javax\ejb\api\main\jboss-ejb-api_3.1_spec-1.0.2.Final-redhat-2.jar

JBoss 7: <JB_HOME>\modules\system\layers\base\javax\mail\api\main\mail-1.4.4.jar, <JB_HOME>\modules\javax\ejb\api\main\jboss-ejb-api_3.1_spec-1.0.1.Final.jar

Note: In different JBoss 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 JBoss EAP 6.1, the J2EE_JAR directory is: J2EE_JAR=C:\Program Files\jboss-eap-6.1\modules\system\layers\base\javax\ejb\api\main\jboss-ejb-api_3.1_spec-1.0.1.Final.jar; C:\Program Files\jboss-eap-6.1\modules\system\layers\base\javax\mail\api\main\mail-1.4.5-redhat-1.jar.

CLASS_PATH

Default setting:

CLASS_PATH=%APPEON_HOME%\lib\appeonserver.jar;%J2EE_JAR%

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

NeedToEncryptedEASPWD

Specify the administrator password of the application server. 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 the application server. For example, EASUSER=admin@system.

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

EASPWD

Input the encrypted password of the application server. 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 <JBOSS_HOME> with the real path of JBOSS

set JBOSS_HOME=C:\Program Files\jboss-eap-6.1

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

set APPEON_HOME=C:\Program Files\jboss-eap-6.1\appeon

set J2EE_JAR=C:\Program Files\jboss-eap-6.1\modules\system\layers\base\javax\ejb\api\main\jboss-ejb-api_3.1_spec-1.0.1.Final.jar; C:\Program Files\jboss-eap-6.1\modules\system\layers\base\javax\mail\api\main\mail-1.4.5-redhat-1.jar

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

REM Please replace <NeedToEncryptedEASPWD> with the administrator password of
JBoss 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 JBoss 6.x
set EASUSER=admin@system

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

REM If you want to encrypt the administrator password of JBoss 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