Apache Geronimo 2.1.3 on z/OS 1.9

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
joi
Posts: 1
Joined: Mon Sep 22, 2008 6:30 am

Apache Geronimo 2.1.3 on z/OS 1.9

Post by joi »

Hey all,
I've successfully managed to start and run JZOS Geronimo on z/OS. All I had to do to get it to work was to modify the Dovetaile Tomcat JCL and run it.

In my case the distribution geronimo-tomcat6-javaee5-2.1.3-bin.zip was unzipped to /opt/geronimo under USS and all you have to do is to change the variables, _USERNAME_, _SYSNAME_ and _HLQ_ respectively.

I Hope some of you will find it useful, Jói

Code: Select all

//GERONIMO JOB   (RT1),'_USERNAME_',
//         CLASS=C,
//         MSGCLASS=X,
//         MSGLEVEL=(1,1),
//         USER=_USERNAME_,
//         NOTIFY=_USERNAME_,
//         REGION=512M,
//         TIME=1440
/*JOBPARM SYSAFF=_SYSNAME_
//*PROCLIB JCLLIB ORDER=&SYSUID..JZOS.JCL
//*
//*********************************************************************
//*
//* Batch job to run Geronimo under JZOS
//*
//* Tailor the proc and job for your installation:
//* 1.) Modify the Job card per your installation's requirements
//* 2.) Modify the PROCLIB card to point to JZOS proclib
//* 3.) Set VERSION='14' for Java 1.4 or VERSION='50' for Java 5
//* 4.) Set JAVA_HOME to point the location of the Java SDK
//* 5.) Set GERONIMO_HOME to point to the shared Geronimo install dir
//* 6.) (Optional) set GERONIMO_BASE to point to instance specific
//*     Geronimo base dir
//* 7.) Modify DB2HOME to point to the installation's DB2 root
//* 8.) Modify DB2SQLJPROPERTIES to point to the location of the
//*     customized db2sqljjdbc.properties file.  (See the JDBC HOW-TO)
//*
//*********************************************************************
//*
//JAVA EXEC PROC=JVMPRC50,VERSION='50',
//*LOGLVL='+D',
// JAVACLS='org.apache.geronimo.cli.daemon.DaemonCLI',
// ARGS='start'
//STEPLIB DD DISP=SHR,DSN=_HLQ_.DSN810.SDSNEXIT
//        DD DISP=SHR,DSN=_HLQ_.DSN810.SDSNLOAD
//        DD DISP=SHR,DSN=_HLQ_.DSN810.SDSNLOD2
//STDENV DD *
# This is a shell script which configures
# any environment variables for the Java JVM.
# Variables must be exported to be seen by the launcher.
. /etc/profile
JAVA_HOME=/usr/lpp/java/J5.0
export PATH=/bin:"${JAVA_HOME}"/bin:

GERONIMO_HOME=/opt/geronimo
GERONIMO_BASE=${GERONIMO_HOME}

DB2HOME=/usr/lpp/db2810
DB2SQLJPROPERTIES=/opt/geronimo/db2sqljjdbc.properties
export JAVA_HOME
export DB2HOME DB2SQLJPROPERTIES

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$DB2HOME"/lib
LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
LIBPATH="$LIBPATH":"$DB2HOME"/lib
export LIBPATH="$LIBPATH":

# Customize your CLASSPATH here
CLASSPATH="${JAVA_HOME}/lib/tools.jar"
CLASSPATH="$CLASSPATH":"${GERONIMO_HOME}/bin/server.jar"
CLASSPATH="$CLASSPATH":"$DB2HOME"/classes/db2j2classes.zip
export CLASSPATH="$CLASSPATH":

# Set JZOS specific options
# Use this variable to specify encoding for DD STDOUT and STDERR
#export JZOS_OUTPUT_ENCODING=IBM-1047
# Use this variable to prevent JZOS from handling MVS operator commands
#export JZOS_ENABLE_MVS_COMMANDS=false
# Use this variable to supply additional arguments to main
#export JZOS_MAIN_ARGS=""

# Configure JVM options
# Note that Tomcat requires default ASCII file.encoding
IJO="-Xms16m -Xmx256m"
IJO="$IJO -Dfile.encoding=ISO8859-1"
# IJO="$IJO -DGERONIMO.base=${GERONIMO_BASE}"
# IJO="$IJO -DGERONIMO.home=${GERONIMO_HOME}"
# IJO="$IJO -Djava.io.tmpdir=${GERONIMO_BASE}/temp"
IJO="$IJO -Djava.endorsed.dirs=${GERONIMO_BASE}/lib/endorsed"
# IJO="$IJO -Dderby.system.home=${GERONIMO_BASE}/data"
# IJO="$IJO -Dderby.storage.fileSyncTransactionLog=true"
# IJO="$IJO -Djavax.net.ssl.keyStorePassword=_password_"
# IJO="$IJO -Djavax.net.ssl.trustStorePassword=_password_"
# IJO="$IJO -Djavax.net.ssl.keyStore=${GERONIMO_BASE}/conf/tomcat.ks"
# IJO="$IJO -Djavax.net.ssl.trustStore=${GERONIMO_BASE}/conf/tomcat.ts"

# Configure SDK5.0 to use shared classes (at group level)
# You must comment this out if you are not running SDK 5
groupname=`id -gn`
IJO="$IJO -Xshareclasses:name=$groupname,groupAccess"
export IBM_JAVA_OPTIONS="$IJO "

export JAVA_DUMP_HEAP=false
export JAVA_PROPAGATE=NO
export IBM_JAVA_ZOS_TDUMP=NO
//
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Nice work!
al13745
Posts: 1
Joined: Tue Nov 02, 2010 7:50 am

Post by al13745 »

Hi,
thanks for the example(s). I've followed your good work and that of dovetail (tomcat under jzos with RACF). I've now got either Tomcat up and running with RACF or Geronimo with its inbuilt security. My problem is that I don't know where to start to modify the Tomcat/RACF to allow Geronimo/RACF, there's so many more configs to consider! Any clues?




geronimo-tomcat6-javaee5-2.1.4-bin.zip




//PROCLIB JCLLIB ORDER=SYS4.JZOS.SAMPLIB
//*
//*********************************************************************
//*
//* Batch job to run Geronimo under JZOS
//*
//* Tailor the proc and job for your installation:
//* 1.) Modify the Job card per your installation's requirements
//* 2.) Modify the PROCLIB card to point to JZOS proclib
//* 3.) Set VERSION='14' for Java 1.4 or VERSION='50' for Java 5
//* 4.) Set JAVA_HOME to point the location of the Java SDK
//* 5.) Set GERONIMO_HOME to point to the shared Geronimo install dir
//* 6.) (Optional) set GERONIMO_BASE to point to instance specific
//* Geronimo base dir
//* 7.) Modify DB2HOME to point to the installation's DB2 root
//* 8.) Modify DB2SQLJPROPERTIES to point to the location of the
//* customized db2sqljjdbc.properties file. (See the JDBC HOW-TO)
//*
//*********************************************************************
//*
//JAVA EXEC PROC=EXJZOSVM,VERSION='60',MEMLIMIT=2M,LOGLVL='+T',
// JAVACLS='org.apache.geronimo.cli.daemon.DaemonCLI',
// ARGS='start'
//STEPLIB DD DISP=SHR,DSN=SYS4.DB2S.SDSNEXIT
// DD DISP=SHR,DSN=SYS3.DB2S.SDSNLOAD
// DD DISP=SHR,DSN=SYS3.DB2S.SDSNLOD2
// DD DISP=SHR,DSN=SYS5.JZOS.LOADLIB
//STDENV DD *
# This is a shell script which configures
# any environment variables for the Java JVM.
# Variables must be exported to be seen by the launcher.

. /etc/profile

export JAVA_HOME=/usr/lpp/java/J6.0

export PATH=/bin:"$JAVA_HOME"/bin:

export JZOS_HOME=/usr/local/jzos241/jzos

export TOMCAT_HOME=/usr/local/tomcat.6.0.29/apache-tomcat-6.0.29

GERONIMO_HOME=/usr/local/geronimo-tomcat6-javaee5-2.1.4
GERONIMO_BASE="$GERONIMO_HOME"
DB2HOME=/usr/lpp/db2/db2810
DB2SQLJPROPERTIES="$GERONIMO_HOME"/db2sqljjdbc.properties

export DB2HOME DB2SQLJPROPERTIES

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$DB2HOME"/lib

LIBPATH=/lib:/usr/lib:"$JAVA_HOME"/bin
LIBPATH="$LIBPATH":"$JAVA_HOME"/lib/s390
LIBPATH="$LIBPATH":"$JAVA_HOME"/lib/s390/j9vm
LIBPATH="$LIBPATH":"$JAVA_HOME"/bin/classic
LIBPATH="$LIBPATH":"$JZOS_HOME"
LIBPATH="$LIBPATH":"$DB2HOME"/lib
export LIBPATH="$LIBPATH":

# Force the alphaWorks version of JZOS to run overriding the SDK
OPTS="-Djava.ext.dirs=$JZOS_HOME:$JAVA_HOME/lib/ext"
OPTS="$OPTS -Djzos.jdfsort.dir=$JZOS_HOME"
OPTS="$OPTS -Djzos.script.path=$JZOS_HOME/sample"
export JZOS_JVM_OPTIONS="$OPTS"

# Customize your CLASSPATH here
# Add the JZOS samples to the classpath
CLASSPATH="$JZOS_HOME/jzos_sample.jar"
CLASSPATH="$CLASSPATH":"$JAVA_HOME/lib/tools.jar"
CLASSPATH="$CLASSPATH":"/u/al/user/al13745/myjava"
CLASSPATH="$CLASSPATH":"$TOMCAT_HOME/bin/bootstrap.jar"
CLASSPATH="$CLASSPATH":"$JZOS_HOME/jzos.jar"
CLASSPATH="$CLASSPATH":"$TOMCAT_HOME/bin/commons-logging-api.jar"
CLASSPATH="$CLASSPATH":"$GERONIMO_HOME/bin/server.jar"
CLASSPATH="$CLASSPATH":"$DB2HOME"/classes/db2j2classes.zip

export CLASSPATH="$CLASSPATH":

# Configure JVM options
# Note that Tomcat requires default ASCII file.encoding
IJO="-Xms16m -Xmx256m"
IJO="$IJO -Dfile.encoding=ISO8859-1"
# IJO="$IJO -DGERONIMO.base=$€GERONIMO_BASEõ"
# IJO="$IJO -DGERONIMO.home=$€GERONIMO_HOMEõ"
# IJO="$IJO -Djava.io.tmpdir=$€GERONIMO_BASEõ/temp"
IJO="$IJO -Djava.endorsed.dirs=$GERONIMO_BASE/lib/endorsed"
# IJO="$IJO -Dderby.system.home=$€GERONIMO_BASEõ/data"
# IJO="$IJO -Dderby.storage.fileSyncTransactionLog=true"
# IJO="$IJO -Djavax.net.ssl.keyStorePassword=_password_"
# IJO="$IJO -Djavax.net.ssl.trustStorePassword=_password_"
# IJO="$IJO -Djavax.net.ssl.keyStore=$€GERONIMO_BASEõ/conf/tomcat.ks"
# IJO="$IJO -Djavax.net.ssl.trustStore=$€GERONIMO_BASEõ/conf/tomcat.ts"

export IBM_JAVA_OPTIONS="$IJO "

export JAVA_DUMP_HEAP=false
export JAVA_PROPAGATE=NO
export IBM_JAVA_ZOS_TDUMP=NO

//
Post Reply