Starting QBrowser for Weblogic on (Oracle) Linux

For my personal OSB playground i use a Virtual Machine with Oracle Linux. When recently working on an OSB project with JMS i was looking for a tool enabling me to send messages to a JMS Queue or Topic. After i failed to get Hermes JMS working properly i tried QBrowser light. Although there were no proper unix scripts supplied to start QBrowser, it was quite easy to write one my own based on the batch files. I got QBrowser working after correcting all version numbers of the jar files in the QB_CLASS_PATH to the current version of my installation. Since i did have no intention to validate the version numbers of the jar files for each configuration i have, i made a little script which automatically detects the installed com.bea.core.* jar files, adds them to the QB_CLASS_PATH and starts QBrowser.

Copy and paste the ksh-script below to a file name run_wls_mq.ksh in the root of your QBrowser application directory. Change the variable WL_HOME to the location where WebLogic Server is installed, and you are ready to start QBrowser.

#!/bin/ksh

# 
# Objective: Start QBrowser Light for WLS
#
# 20110619 petervannes.nl Initial version
 
# Weblogic Server Home directory
WL_HOME=/u01/app/Middleware/wlserver_10.3

# Required jar files 
set -A modules com.bea.core.weblogic.security.identity_ \
com.bea.core.transaction_ \
com.bea.core.weblogic.security.wls_ \
com.bea.core.utils.full_ \
com.bea.core.weblogic.security_ \
com.bea.core.weblogic.rmi.client_ \
com.bea.core.utils.classloaders_ \
com.bea.core.management.core_ \
com.bea.core.descriptor_ \
com.bea.core.logging_ \
com.bea.core.weblogic.socket.api_ \
com.bea.core.common.security.api_ \
com.bea.core.weblogic.security.digest_ \
com.bea.core.weblogic.workmanager_ \
com.bea.core.weblogic.lifecycle_ \
com.bea.core.utils.wrapper_ \
com.bea.core.store_

# QB Class Path
QB_CLASS_PATH=${WL_HOME}/server/lib/weblogic.jar:\
${WL_HOME}/server/lib/wljmsclient.jar:\
${WL_HOME}/server/lib/wlclient.jar

# Start detecting current version of required jar files
classLoadingError=false
for module in ${modules[@]};
do
  # Find jar file with highest version number
  locmodule=`find ${WL_HOME}/../modules/ -name "${module}*.jar" -type f \
  2>/dev/null | sort -r | head -n1`

  # Add fully qualified filename to QB_CLASS_PATH
  if [[ -f ${locmodule} ]]
  then
    QB_CLASS_PATH=${QB_CLASS_PATH}:${locmodule}
  else
    echo "[ERROR] Could not locate jar file ${module}"
    classLoadingError=true
  fi 

done
if [[ $classLoadingError != true ]]
then
  export QB_CLASS_PATH

  java -Xms128m -Xmx512m -splash:cube.png -cp ./QBrowserV2_Neo.jar:\
./jide-oss-2.6.2.jar:${QB_CLASS_PATH}:./imq.jar com.qbrowser.QBrowserV2ForWLMQ
else
  echo "[ERROR] One of required classes not loaded"
fi


blog comments powered by Disqus