Tag Archives: weblogic

One hour GC pause

We were trying to tune the Sun JVM Garbage Collector of our WebLogic Server v. 10.3.2 when the server stopped for over one hour. It was lunch time so we did not kill the process. After 4012 seconds it came back. For your information, the server was a development instance with a 512 MB JVM on Solaris 9.

Here is the log message (wrapped for readability):

2012-01-10T12:48:31.227+0100: 
    10361.371: [GC[YG occupancy: 23095 K (29504 K)]
    10361.371: [Rescan (parallel) , 4012.3452758 secs]
    14373.717: [weak refs processing, 0.0006401 secs]
    14373.717: [class unloading, 0.0815919 secs]
    14373.799: [scrub symbol & string tables, 0.1392282 secs] 
    [1 CMS-remark: 416411K(491520K)] 439506K(521024K), 4012.6147003 secs] 
    [Times: user=3959.56 sys=5.79, real=4012.61 secs] 

Read more »

How to prevent JSP recompilation in WebLogic Server

My previous post explains how to precompile JSPs with the WebLogic wlappc Ant task. This is a follow-up explaining how to prevent WebLogic Server to recompile the JSPs completely.

Add the following snippet to the weblogic.xml of your WAR.

<jsp-descriptor>
    <page-check-seconds>-1</page-check-seconds>
    <precompile>false</precompile>
</jsp-descriptor>

Add the following snippet to the web.xml of your WAR.

<servlet>
    <servlet-name>JSPClassServlet</servlet-name>
    <servlet-class>weblogic.servlet.JSPClassServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>JSPClassServlet</servlet-name>
    <url-pattern>*.jsp</url-pattern>
</servlet-mapping>

Read more »

How to precompile JSPs with the WebLogic wlappc Ant task

The following Ant snippet allows you to precompile your JSPs (and more) for WebLogic Server.

<!-- Define some properties -->
<property name="weblogic.server.dir" value="C:/Oracle/Middleware"/>
<property name="weblogic.server.lib.dir" value="${weblogic.server.dir}/wlserver_10.3/server/lib"/>
<property name="pathTo.weblogic.jar" value="${weblogic.server.lib.dir}/weblogic.jar"/>
<property name="war.src.dir" value="${basedir}/build/war"/>
<property name="war.dist.dir" value="${basedir}/dist"/>

<!-- Add the WebLogic appc task definition to the current project -->
<taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpath="${pathTo.weblogic.jar}"/>

<!-- Set up the classpath for the WebLogic appc task -->
<path id="wlappc.classpath">
    ...
</path>

<!-- Compile the source of your WAR file with weblogic.appc -->
<target name="wlCompileWarSrc">
    <wlappc source="${war.src.dir}" classpathref="wlappc.classpath" keepgenerated="true"
            debug="true" linenumbers="true" verbose="true" verbosejavac="true"/>
</target>

<!-- Make the project WAR -->
<target name="war" depends="wlCompileWarSrc">
    ...
</target>

Read more »