WebLogic JVM wide instrumentation
This document explains the detail of setting up instrumentation provided by
beSee-1-x
to a complete WebLogic instance.
As you can read in beSee 1-x documentation, the initial solution could only instrument deployed application, making it difficult for example to track down SQL calls
since JDBC drivers are not a deployed application.
Supported environmentsThe solution is available with the following environment:
UsageYou will need the following libraries (please refer to the download area on SourceForge ):
Set up a directory structure and a configuration as described in beSee 1-x documentation available
here
.
Given those explanation, your WebLogic startup script might look like: echo off SETLOCAL @rem *** define main location where jar resides set WL_ROOT=C:\bea set BESEE_HOME=C:\cvs_02\besee_sf\besee2 set BESEE_VERSION=-2-0-snapshot.jar @rem *** use Xbootclasspath instead of HotSwap (see beSee 2-x doc) set BESEE_OPTIONS=-Dbesee.classloader.clbootclasspath=%BESEE_HOME%\build\boot @rem *** beSee 2-x and jar required for instrumentation must be in bootclasspath set BESEE_CP=%BESEE_HOME%\build\dist\besee%BESEE_VERSION%;%BESEE_HOME%\lib\javassist.jar @rem *** adapt to your needs set WLS_USER=system set WLS_PW=weblogic @rem *** define java version and weblogic home set WL_HOME=%WL_ROOT%\weblogic700 set JAVA_HOME=%WL_ROOT%\jdk131_03 @rem *** change dir to your weblogic installation cd "%WL_ROOT%\user_projects\mydomain" @rem *** set SERVER_NAME to the name of the server you wish to start up. set SERVER_NAME=myserver @rem *** set any other options @rem set STARTMODE=false @rem set JAVA_OPTIONS=-Dweblogic.security.SSL.trustedCAKeyStore=%WL_HOME%\server\lib\cacerts @rem set JAVA_VM= @rem set MEM_ARGS=-Xms32m -Xmx200m set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar @rem *** set PATH needed for JPDA libraries (needed if you are using HotSwap) set PATH=.;%WL_HOME%\server\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin @rem *** BESEE 1-x with BESEE 2-x @rem *** add beSee jars to weblogic classpath set BESEE_1_CP="%BESEE_HOME%\build\dist\besee-ext-besee%BESEE_VERSION%" set BESEE_1_CP="%BESEE_1_CP%;%BESEE_HOME%\extension\besee\lib\besee-1-0.jar" set BESEE_1_CP="%BESEE_1_CP%;%BESEE_HOME%\extension\besee\lib\weblogic-pp.jar" @rem *** the following MUST be written in a single line "%JAVA_HOME%\bin\java" %BESEE_OPTIONS% -cp %JAVA_HOME%\lib\tools.jar;%BESEE_CP% com.gnilux.besee.hook.ProcessStarter -Xbootclasspath/p:"%BESEE_CP%" -Dbesee.classloader.preprocessor=com.gnilux.besee.BeseeAdapter -Dbesee.conf=%BESEE_HOME%\..\besee\conf\besee.sample.properties %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -cp "%BESEE_1_CP%;%CLASSPATH%" -Dweblogic.Name=%SERVER_NAME% -Dbea.home="%WL_ROOT%" -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server ENDLOCAL |