Hi,
As a WebLogic Administrator Many times we want to make some changes in the application provided by the Development team. But it is not good for a WebLogic Administrator to make changes in the application archieve provided by the Application Development team. But to fulfill some environmental requirements the Administartor has to make some changes in the application.
WebLogic provides a best way for the WebLogic Administrators to alter the different Tags present inside the Application deployment descriptors like adding a new Tag or replacing a value of a Tag mentioned in the “web.xml” or in “weblogic.xml” or in any of the deployment descriptor like “weblogic-ejb-jar.xml”,”application.xml”, “weblogic-application.xml”…etc.
In this example we are going to see how can we change the <session-timeout> of a Web Application without even altering the “web.xml” physically…On the fly
Step1). Deploy your Application as it is at present on the Server. Suppose your Web Application name is “SessionTimeoutWebApp” (I am assuming it as a Exploded WAR file you can work with Archived WAR file as well in the same way)
Step2). Anywhere in your file system Just paste the following “plan.xml” file: (Suppose Location is “F:SessionTimeout_PlanDemo” )
<?xml version='1.0' encoding='UTF-8'?> <deployment-plan xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-deployment-plan.xsd" global-variables="false"> <application-name>SessionTimeoutWebApp</application-name> <!-- You need to change this Line and Put your Web Application Name --> <variable-definition> <variable> <name>NewSessionValue</name> <value>100000</value> </variable> </variable-definition> <module-override> <module-name>SessionTimeoutWebApp</module-name> <!-- You need to change this Line and Put your Web Application Name --> <module-type>war</module-type> <module-descriptor external="true"> <root-element>web-app</root-element> <uri>WEB-INF/web.xml</uri> <variable-assignment> <name>NewSessionValue</name> <xpath>/web-app/session-config/session-timeout</xpath> </variable-assignment> </module-descriptor> </module-override> <config-root>F:SessionTimeout_PlanDemo</config-root> <!-- You need to change this Line and Put the location of plan.xml file wherever u have pasted it --> </deployment-plan>
Step3). Login to AdminConsole and goto deployments page—-> the select your Application (After Pressing Lock & Edit Button) –> update (click this button)—> browse your “plan.xml” file location and then finish.
Once the changes will be activated ….Next time your will see that your <session-timeout> value is changed from the AdminConsole or through any other technique like JMX or WLST.
.
.
Thanks
Jay SenSharma
November 20th, 2012 on 11:41 am
Hello Jay..
we have deployed our application in weblogic 12c and while accesing the application am getting session timeout when the connection speed is set to very low like, 14.6K or 9.6K using sloppy tool and i want to trace the session timeout log details in weblogic. but could not be able to fetch i have tried all the possibilities.Please could you help me out in tracing the solution
Thanks in Advance
Nikhil M
November 20th, 2012 on 1:33 pm
http://docs.oracle.com/cd/E24329_01/web.1211/e21049/sessions.htm#i138595 and http://middlewaremagic.com/weblogic/?p=450
November 21st, 2012 on 9:37 am
Hi Rene
Thanks soo much for taking time to see my post and response, but am sorry i couldn´t get the solutions from the urls you have posted. actually we do extract a war file to a folder and use that folder to deploy and access. so my requirement is to trace session timeout error log details, am trying all possibilities so please could you try to give some solution
loads of Thanks
Nikhil M
November 21st, 2012 on 10:08 am
Hi Rene
I want to trace logs for exceptions like NestedRuntimeException,etc please can you help me out where can i find such kind of log information in weblogic server
Thanks
Nikhil M
November 21st, 2012 on 1:22 pm
In the directory ${DOMAIN_HOME}/servers/${SERVER_NAME}/logs or in the admin console:
– diagnostics, logging
November 23rd, 2012 on 10:07 am
Hi Rene..
I will be very thankful to you… for the response you been giving me and i was checking the logs its not writing all types of exceptions into logs like nestedruntime, etc. so we are thinking some alternatives for that 🙂