Deployment Framework 8 release highlights

The Deployment Framework 8 includes a fast configuration reader that can accelerate startup of Java adapters and an improved dump command that records environment variables.

Faster Java adapter start up

The Deployment Framework 8 includes a fast configuration reader that can accelerate Java adapter start up. The Deployment Framework can now read a Java Adapter’s configuration without the overhead of starting a Java virtual machine.

To take advantage of this optimisation, modify your Java adapter blade’s start-jar.sh script to handle configuration queries by calling the new dedicated configuration reader.

Example modified start-jar.sh

For an example modified start-jar.sh, see start-jar.sh in the pricing-template of the Caplin Project Templates project on GitHub.

pricing-template/blade/DataSource/bin/start-jar.sh
#!/bin/bash
#
# Start the Pricing Template Java Adapter.
#
# $1 - Path to java executable
# $2 - Path to datasource config file
# $3 - Path to fields config file
# $4 - Java definitions ( optional )
#
# Returns the process id of the Java process.
#

BLADENAME=@adapterName@

if [ "$1" = "CONFREADER" ]; then
   shift
   machine=`uname -m`
   CONFREADER_BINARY="${CONFIG_BASE}/../tools/DataSource/bin/configreader-$machine"
   if [[ -f $CONFREADER_BINARY ]]; then
       "${CONFREADER_BINARY}" "$@" 2> /dev/null
       exit $?
   fi
   java -cp "${BINARY_ROOT}/lib/*" com.caplin.datasource.DataSource "$@"
   exit $?
else
   jar=$(ls "${BINARY_ROOT}"/lib/${BLADENAME}*.jar|head -1)
   echo "Jar: ${jar}"
   if [[ -n $START_FOREGROUND_NOLOGS ]] ; then
      java $CAPLIN_BLADE_JAVA_OPTIONS -jar "$jar" "$@" > "$LOGDIR"/java-$BLADENAME.log 2>&1
   elif [[ -n $START_FOREGROUND ]] ; then
      java $CAPLIN_BLADE_JAVA_OPTIONS -jar "$jar" "$@" --foreground-logs=true
   else
      java $CAPLIN_BLADE_JAVA_OPTIONS -jar "$jar" "$@" 2> "$LOGDIR"/java-$BLADENAME.log >/dev/null &
   fi
   echo $!
fi

Improved configuration snapshots

The Deployment Framework CLI’s dump command produces a definitive snapshot of active configuration. From Deployment Framework 8, the dump command’s snapshot now includes a record of the shell’s environment variables, providing a more complete record of the configuration of a deployment.