Create a simple domain (Terminal 1):

  export JAVA_HOME=$MYPATH/jdk1.8.0_51
  export ORACLE_HOME=$MYPATH/Oracle/Middleware/Oracle_Home
  cd $ORACLE_HOME/oracle_common/common/bin
  sh config.sh
     Create basic WLS domain (we'll call it blog_domain):
        AdminServer (7001)
        webappServer (7003)
        ejbServer (7004)
  cd $ORACLE_HOME/user_projects/domains/blog_domain/bin

  Edit $ORACLE_HOME/user_projects/domains/blog_domain/bin/startManagedWebLogic.sh and set the WLS_USER to "weblogic" and WLS_PW to "weblogic1"

  export USER_MEM_ARGS="-XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
  
  sh startWebLogic.sh &> AdminServer.out &
  tail -f AdminServer.out   (wait for it to be RUNNING)
  sh startManagedWebLogic.sh "webappServer" "http://localhost:7001" &> webappServer.out &
  sh startManagedWebLogic.sh "ejbServer" "http://localhost:7001" &> ejbServer.out &

To build and deploy the example apps (Terminal 2):

  cd $MYPATH
  mkdir build
  cd build
  unzip blog_example.zip
  . $ORACLE_HOME/user_projects/domains/blog_domain/bin/setDomainEnv.sh
  cd JWS
  ant
  cd ../MyApp
  ant

From a browser, hit the following example URLs:
  http://localhost:7003/MySimpleServlet/MySimpleServlet
  http://localhost:7003/MySimpleServlet/MySimpleServlet?fail    (this will cause the EJB to throw an exception)

Log messages include the Correlation information, so you will see the ECID and RID included in the logs

From a terminal, you can grep the log files for an ECID to see where log messages are which match the above Request flows.

The Correlation information is also included in Java Flight Recorder events generated by WLDF, so you can capture the JFR data
from each of the servers and follow the flow for each of the Requests. A simple PY script has been included to capture the
WLDF images, and extract the JFR data from each of the servers. To execute that:

  sh $ORACLE_HOME/oracle_common/common/bin/wlst.sh capture_images.py

This will result in a JFR file from each of the servers in the current directory.

Start jmc ($MYPATH/jdk1.8.0_51/bin/jmc)

This example assumes that you have installed the WebLogic Plugin for JMC (a quick video for how to do that
is available here: https://www.youtube.com/watch?v=h_xdRZFDQ0Q )

