Monday, March 29, 2010

weblogic.xml to use on memory session replication

<?xml version="1.0" encoding="UTF-8" ?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session-descriptor>
<timeout-secs>300</timeout-secs>
<invalidation-interval-secs>60</invalidation-interval-secs>
<persistent-store-type>jdbc</persistent-store-type>
<persistent-store-pool>SessionDS</persistent-store-pool>
<persistent-store-table>WL_SERVLET_SESSIONS</persistent-store-table>
</session-descriptor>
</weblogic-web-app>

Use the above code for weblogic.xml. Your weblogic cluster MUST be configured to use jdbc persistence store to capture web-browsers and nodes sessions. WL_SERVLET_SESSIONS is the table for session store.

Add this weblogic.xml file to your WEB-INF directory and deploy your application to the weblogic cluster. When a cluster node down, it will replicate all the JSP sessions associates with the clients.

Sunday, March 14, 2010

Add your own jars to weblogic application

Sometimes weblogic server uses its server lib .jars. If you want your application to use your own versions of .jar files, add following code to your weblogic.xml file located in WEB-INF directory.

<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>

This will use libraries in your application.