Uncategorized Archive

Changing default session timeout Jboss 7

JBoss Enterprise Application Platform 6 has a default session bean timeout of 30 minutes, which is configured in standalone/configuration/standalone.xml

The default HTTP session timeout can’t be modified in EAP 6.

To override default value for your own application, follow the below approaches:

  1. Add an entry in the application web.xml file:


2. Programmatically override the session timeout for a particular session.

HttpSession session = request.getSession();

Note:  In older versions of Jboss Application Server ex. Version 5, it provided a provision of overriding the global session time out setting from the Jboss web.xml file under the location $JBOSS_HOME \server\default\deploy\jboss-web.deployer



Further reading:




Wonders Team

JConsole for monitoring Weblogic Application Server 12c

Performance and high availability of production systems are critical for any business. Hence there is a plethora of monitoring tools available in the market that helps you to monitor your production systems, generate alerts, and trigger emails in down time situations. Few commercially available monitoring tools in the market are wily introscope, Appdynamics etc.

For further details on wily introscope.


For further details on Appdynamics.


Apart from commercially available monitoring tools, there are few freely available monitoring tools like jconsole, jhat, jstack and weblogic’s very own JRMC, WLDF (For performance monitoring).

This post is a sample illustration of how we can configure Jconsole with WebLogic Application Server for monitoring.

What is JConsole?

The JConsole graphical user interface is a monitoring tool that complies to the Java Management Extensions (JMX) specification. JConsole uses the extensive instrumentation of the Java Virtual Machine (Java VM) to provide information about the performance and resource consumption of applications running on the Java platform.




How do I configure Jconsole with weblogic application server?

Local server monitoring:

  1. Set the classpath by running setDomainEmv.cmd from <WLS_DOMAIN_HOME>\bin
  2. Start Jconsole.exe  ( Alternatively you can execute it from from the default java location :  C:\Program Files\Java\jdk1.6.0_45\bin\)
  3. Select the Weblogic Server instance from the local process list.


Jconsole Weblogic Application Server 1

Jconsole Weblogic Application Server 1

4: Monitor the server nitty-gritty details:

Jconsole Weblogic Application server 2

Jconsole Weblogic Application server 2



Remote Server Monitoring using JConsole:

  1. Update the setDomainEnv.cmd  with the below parameters in the JAVA_OPTIONS and restart the Weblogic Server

For non- authenticated user and non – ssl mechanism:






For authenticated SSL mechanism:









2. Set the classpath and start JConsole

jconsole -Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:</code> <code>$WLS_HOME/server/lib/wlfulclient.jar -Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -debug

3. Connect using hostname and port


You will have access to all the details of the remote JVM

For accessing only the MBeans:

If you want to connect only to the JMX MBeans follow the below steps:

1. Login into the Weblogic Admin Console and navigate to the server that needs to be monitored, set the username / password for the IIOP protocols.



Note: Restart the designated server

2.       Set the classpath and start JConsole.

jconsole -Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar: $WLS_HOME/server/lib/wlfulclient.jar -Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -debug

3.       Connect to the server Mbeans using the service URL as below:




Note: You would not see other JVM details but only the domain runtime MBeans

Further reading:




Common Exceptions:

1. java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

Possible solutions:

Make sure the JMX Service url is correct and the JNDI value is properly mentioned.

2. org.omg.CORBA.NO_PERMISSION:   vmcid: 0x0  minor code: 0  completed: No

Possible solutions:

The server failed to authenticate the IIOP client or the server port is not defined properly.

Change the default IIOP username / password for the weblogic server.



Wonders Team.

JSP Precompilation in WebLogic Application Server

JSP Precompilation in WebLogic Application Server:

Performance is paramount for any production system. A few seconds saved at the bottle neck is few seconds gained in the over all performance of the system. Compilation of JSP at runtime in a production environment can infuse an overhead. Hence it is a best practice to pre compile those JSP in such scenarios.

Precompilation offers below advantages:

  1. Enhances the performance by ensuring pre compilation of all the JSPs before deployment of the application.
  2. The Syntax errors in the sciptlet codes and custom tag elements could be detected at the compile time itself rather when the end user is accessing the application.

In WebLogic Server this can be achieved by weblogic.appc tool.


It’s an utility that generates and compiles the classes needed to deploy EJBs and JSP to WebLogic Application Server. It provides other features like deployment descriptor validations for standards compliance at both individual module level and the application level.


java weblogic.appc [options] <ear, jar, or war file or directory>


Using weblogic.appc as ant task:

You can incorporate appc in build.xml using an ant task wlappc..

For Ex:

 <taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpathref="dev.classpath"/>

<target name="jspc-webapps">

<!-- Pre-compile webapp JSP pages to src/web/WEB-INF/classes -->

<wlappc source="${srcweb}" classpathref="dev.classpath" verbose="true">



This would ensure that the appc would scan through the web application at the source location and precompile the JSPs.

Further references:



Happy Readings.  🙂

Wonders Team