This tutorial explains how to profile Java code with BEA WebLogic 6 or later.
In this document, <OptItDir> is the directory where OptimizeIt has been installed. (ex: c:\OptimizeItDemo\OptimizeIt40D), and <WebLogicDir> is the directory where WebLogic has been installed (ex: c:\WebLogic6).
 

1) Configuring the startWebLogic6OI.bat script

set SERVER_NAME=

2) Configuring the weblogic.policy file

In order to profile, you need to give OptimizeIt's classes the correct rights:

3) Starting WebLogic

To start WebLogic, invoke the startWebLogic6OI.bat script:

4) Attaching from OptimizeIt

Now that WebLogic is running with OptimizeIt profiler, you can start OptimizeIt and attach to the virtual machine. Note: OptimizeIt does not have a "detach" function. If you press the stop button in OptimizeIt, WebLogic server exits. After doing this, you need to restart WebLogic server.

5) Filtering resources used by WebLogic

OptimizeIt provides filters for filtering resources used by WebLogic. In order to use filters, you must create an OptimizeIt setting for the profiling session,  turn on the WebLogic filter, and then attach by using the Attach now button or pressing the play button. Note: OptimizeIt settings can be saved for subsequent usage. This is done by using the save menu.

6) Using the OptimizeIt servlet

The startWebLogic6OI.bat script starts by default WebLogic with the OptimizeIt audit system. The audit system retrieves the profiling information from the start-up of WebLogic.
In order to improve the sever start-up performances, you can use the OptimizeIt servlet to start the audit system once the server has started.
 

Modifying the startWebLogic6OI.bat script

Adding the OptimizeIt servlet to the WebLogic server

Accessing the OptimizeIt servlet

Once this operation is done, you should see a message in your web browser indicating that OptimizeIt's audit system is running. At that point you can attach from the OptimizeIt GUI as explained in the section 4 'Attaching from OptimizeIt'.


Copyright (c) 1997, 1998, 1999, 2000, 2001 Intuitive Systems Inc. All rights reserved. Specifications subject to change without notice.
OptimizeIt is a trademark of Intuitive Systems, Inc.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. All other brand names and products are trademarks or registered trademarks of their respective holders.