Wednesday, June 06, 2012

WebLogic - Session Monitoring Using WebLogic Diagnostics Framework (WLDF)

It is very helpful to know whether the HttpSession Attributes are Serializable or not. From the AdminConsole you can see the size of HttpSession). If it is negative value, that means the HttpSession contains some non-serializable attributes and your application is not good enough to be deployed on a clustered envs.

What should I do for WLDF?
1. Login to admin console and then create a diagnostic module
    AdminConsole-->Diagnostics-->Diagnostics Modules

  • By clicking New to create a new Diagnostic Module with a name you want, example: MyDiagModule and click OK to save it
  • By clicking  MyDiagModule and navigate to the configuration page of Diagnostic Module. Select the Instrumentation tab and check the checkbox of Enabled and save it
  • By clicking on Targets tab to set the target to cgServer (The target server you want to choose.)

2. Modify your application and add weblogic-diagnostics.xml to the META-INF of your application EAR file.
3. Deploy your application.
4. Login to admin console and fine your application underneath Deployment.
    AdminConsole-->Deployments-->YouApplication --> Configuration --> Instrumentation

  • By clicking your application name to get the setting page of your application
  • Select the Configuration tab and click on the Instrumentation tab, then check the checkbox of Enabled and save it.
  • By clicking the Add Moniter From Libery button, select  HttpSessionDebug and confirm it by clicking OK

NOTE: After done everything mentioned above, please restart the server and make sure it works

Then you can write some code to set some attributes of session, you will be able to see the payload size in the Events Log from AdminConsole.

AdminConsole--> Diagnostics--> Log Files--> EventsDataArchive


<?xml version="1.0" encoding="UTF-8"?>
<wldf-resource xmlns="">

References for WLDF:
Instrumenting Weblogic Applications with WLDF (
Instrumenting Java EE applications in WebLogic Server (
Session Monitoring Using WLDF (
Performing Diagnostics in a WebLogic environment (

No comments: