ex_env — Enduro/X Environment configuration
Enduro/X uses set of environment variables which are an initial environment for the application domain. There is a set of parameters related to the system, prefixes, Posix Queue mount points, and various system limits. The next step to the configuration is application domain configuration, in ndrxconfig.xml and debug.conf (or Common-Configuration respectively).
Sample configuration:
export FIELDTBLS=Exfields,fieldtab1.fd,fieldtab2.fd export FLDTBLDIR=/enduro/tst1/tuxfbuf export VIEWDIR=/enduro/tst1/views export VIEWFILES=customer.V,card.V export NDRX_DMNLEV=5 export NDRX_DMNLOG=/enduro/tst1/tmp/NDRXD export NDRX_APPHOME=/enduro/tst1 export NDRX_CLUSTERISED=0 export NDRX_CMDWAIT=1 export NDRX_CONFIG=/enduro/tst1/conf/ndrxconfig.xml export NDRX_DEBUG_CONF=/enduro/tst1/conf/ndrxdebug.conf export NDRX_DPID=/enduro/tst1/tmp/ndrxd.pid export NDRX_DQMAX=3000 export NDRX_HOME=/opt/endurox export NDRX_IPCKEY=442000 export NDRX_LDBAL=0 export NDRX_LEV=5 export NDRX_LOG=/enduro/tst1/tmp/XADMIN export NDRX_MSGMAX=100 export NDRX_MSGSIZEMAX=32000 export NDRX_NODEID=1 export NDRX_QPATH=/dev/mqueue export NDRX_QPREFIX=/tst1 export NDRX_RNDK=jaUZwOlTqglSc export NDRX_SHMPATH=/dev/shm export NDRX_SRVMAX=10000 export NDRX_SVCMAX=600 export NDRX_TOUT=60 export NDRX_THREADSTACKSIZE=8192 export NDRX_UBFMAXFLDS=16000 export NDRX_ULOG=/enduro/tst1/logs # XA 2PC SECTION, ORACLE DB export ORACLE_SID=ROCKY export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 export PATH=$PATH:ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export NDRX_XA_RES_ID=1 export NDRX_XA_OPEN_STR="ORACLE_XA+SqlNet=ROCKY+ACC=P/endurotest/endurotest1+SesTM=180+LogDir=/tmp/xa+nolocal=f+Threads=true" export NDRX_XA_CLOSE_STR=$NDRX_XA_OPEN_STR # XA Static registration driver export NDRX_XA_DRIVERLIB=$NDRX_HOME/lib/libndrxxaoras.so # XA Dynamic registration driver #export NDRX_XA_DRIVERLIB=$NDRX_HOME/lib/libndrxxaorad.so export NDRX_XA_RMLIB=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 export NDRX_XA_LAZY_INIT=1 # XA SECTION, END
Common-config ini file sample configuration, assuming following settings in env:
export NDRX_CCONFIG=/enduro/tst1/conf/app.ini export NDRX_CCTAG=server1/RM2
The configuration file might look like:
#
# Common variables, inherited for CCTAGs
#
[@global]
FIELDTBLS=Exfields,fieldtab1.fd,fieldtab2.fd
FLDTBLDIR=/enduro/tst1/tuxfbuf
VIEWDIR=/enduro/tst1/views
VIEWFILES=customer.V,card.V
NDRX_DMNLEV=5
NDRX_DMNLOG=/enduro/tst1/tmp/NDRXD
NDRX_APPHOME=/enduro/tst1
NDRX_CLUSTERISED=0
NDRX_CMDWAIT=1
NDRX_DPID=/enduro/tst1/tmp/ndrxd.pid
NDRX_DQMAX=3000
NDRX_HOME=/opt/endurox
NDRX_IPCKEY=442000
NDRX_LDBAL=0
NDRX_LEV=5
NDRX_LOG=/enduro/tst1/tmp/XADMIN
NDRX_MSGMAX=100
NDRX_MSGSIZEMAX=32000
NDRX_NODEID=1
NDRX_QPATH=/dev/mqueue
NDRX_QPREFIX=/tst1
NDRX_RNDK=jaUZwOlTqglSc
NDRX_SHMPATH=/dev/shm
NDRX_SRVMAX=10000
NDRX_SVCMAX=600
NDRX_TOUT=60
NDRX_UBFMAXFLDS=16000
NDRX_THREADSTACKSIZE=8192
NDRX_ULOG=/enduro/tst1/logs
#
# CCTAG section server1
#
[@global/server1]
NDRX_CONFIG=/enduro/tst1/conf/ndrxconfig.xml
#
# CCTAG section RM2
#
[@global/RM2]
# XA 2PC SECTION, ORACLE DB
NDRX_XA_RES_ID=1
NDRX_XA_OPEN_STR="ORACLE_XA+SqlNet=ROCKY+ACC=P/endurotest/endurotest1+SesTM=180+LogDir=/tmp/xa+nolocal=f+Threads=true"
NDRX_XA_CLOSE_STR=${NDRX_XA_OPEN_STR}
# XA Static registration driver
NDRX_XA_DRIVERLIB=${NDRX_HOME}/lib/libndrxxaoras.so
# XA Dynamic registration driver
#NDRX_XA_DRIVERLIB=${NDRX_HOME}/lib/libndrxxaorad.so
NDRX_XA_RMLIB=/u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
NDRX_XA_LAZY_INIT=1
# XA SECTION, END
#
# Debug section (no need for NDRX_DEBUG_CONF in CConfig case)
#
[@debug]
*= ndrx=0 ubf=0
[@debug/server1]
*= ndrx=5 ubf=0Note that tmsrv run with multiple threads. Flag +Threads=true MUST be set in NDRX_XA_OPEN_STR. Otherwise unexpected core dumps can be received from tmsrv.
For IBM AIX it is recommended that NDRX_THREADSTACKSIZE parameter is used. If parameter is not set, Enduro/X tries to get new thread stack size from getrlimit(RLIMIT_STACK, …) and is assigning current value to new thread. Starting from AIX 7.2, it looks like AIX is summing these stacks and checks against the ulimit -s (which is the same RLIMIT_STACK value), and thus new threads fails to create, as total process stack limit is exhausted.