Hi,

Jay SenSharma

Jay SenSharma

Here is a very interesting thing we are going to see…Monitoring the Payload of HttpSession created by the Application On the Server…This is very helpful to check whether the HttpSession Attributes are Serializable or not…Because In AdminConsole you can see the Payload (Size of HttpSession) If it is NEGATIVE value means your HttpSession contains some Non Serializable contents…Hence your Application is not good enough to be deployed on a Clustered Environment..

Step1). First Of all Login to Admin Console and then Create a Diagnostic Module…
AdminConsole—Diagnostics—>Diagnostics Modules

Create a Diagnostic Module
Example:
Name: Module-0”     Save (LocK & Edit)

AdminConsole—Diagnostics—>Diagnostics Modules—>Module-0

Enabled: True (Check the CheckBox)
Targets: AdminServer (U can choose your own Target Server)
you can see the following entry in your “config.xml
C:bea103user_projectsdomains7001_Domainconfigconfig.xml sinppet

<wldf-system-resource>
<name>Module-0</name>
<target>AdminServer</target>
<descriptor-file-name>diagnostics/Module-0-3905.xml</descriptor-file-name>
<description></description>
</wldf-system-resource>

C:bea103user_projectsdomains7001_DomainconfigdiagnosticsModule-0-3905.xml

<?xml version='1.0' encoding='UTF-8'?>
<wldf-resource xmlns="http://www.bea.com/ns/weblogic/weblogic-diagnostics" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-diagnostics http://www.bea.com/ns/weblogic/weblogic-diagnostics/1.1/weblogic-diagnostics.xsd">

<name>Module-0</name>
<instrumentation>
<enabled>true</enabled>
</instrumentation>
</wldf-resource>

Step2). Now develop an EAR application and place the “weblogic-diagnostics.xml” file in the META-INF directory of EAR And “MyDiagnosticTestEAR/META-INF/weblogic-diagnostics.xml”

<?xml version="1.0" encoding="UTF-8"?>
<wldf-resource xmlns="http://www.bea.com/ns/weblogic/90/diagnostics">
<instrumentation>
<enabled>true</enabled>
<wldf-instrumentation-monitor>
<name>HttpSessionDebug</name>
<enabled>true</enabled>
</wldf-instrumentation-monitor>
</instrumentation>
</wldf-resource>

NOTE: After Creating the Diagnostic Module in AdminConsole Please restart The Server where it is targeted…

Step3). Inside the EAR Place any WEB Application where you set some data inside the HttpSession …Like:

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<html>
<body>
<%
session.setAttribute("AAAAAAAAA","BBBBBBBBBBBBBB");
session.setAttribute("CCCCCCCCC","DDDDDDDDDDDDDDDDDDDDDDDD");
%>
<BR>Data is set inside the Session:<BR>
<h4>session.setAttribute("AAAAAAAAA","BBBBBBBBBBBBBB");
<h4>session.setAttribute("CCCCCCCCC","DDDDDDDDDDDDDDDDDDDDDDDD");
</body>
</html>
Step 4). Deploy the Application and Hit your JSP …Now Login  to AdminConsole then
AdminConsole–>Diagnostics–>Log Files –>EventsDataArchive

.
.

Thanks
Jay SenSharma
If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.