d8888 888 888      88888888888 888      d8b                                 888       888          888       .d8888b.           888                               
      d88888 888 888          888     888      Y8P                                 888   o   888          888      d88P  Y88b          888                               
     d88P888 888 888          888     888                                          888  d8b  888          888      Y88b.               888                               
    d88P 888 888 888          888     88888b.  888 88888b.   .d88b.  .d8888b       888 d888b 888  .d88b.  88888b.   "Y888b.   88888b.  88888b.   .d88b.  888d888 .d88b.  
   d88P  888 888 888          888     888 "88b 888 888 "88b d88P"88b 88K           888d88888b888 d8P  Y8b 888 "88b     "Y88b. 888 "88b 888 "88b d8P  Y8b 888P"  d8P  Y8b 
  d88P   888 888 888          888     888  888 888 888  888 888  888 "Y8888b.      88888P Y88888 88888888 888  888       "888 888  888 888  888 88888888 888    88888888 
 d8888888888 888 888          888     888  888 888 888  888 Y88b 888      X88      8888P   Y8888 Y8b.     888 d88P Y88b  d88P 888 d88P 888  888 Y8b.     888    Y8b.     
d88P     888 888 888          888     888  888 888 888  888  "Y88888  88888P'      888P     Y888  "Y8888  88888P"   "Y8888P"  88888P"  888  888  "Y8888  888     "Y8888  
                                                                 888                                                          888                                        
                                                            Y8b d88P                                                          888                                        
                                                             "Y88P"                                                           888   

All Things WebSphere

Concerns and issues relating to all versions of WebSphere Application Server

Thursday, March 29, 2012


How to cache JSPs/Servlets based on chaining request (session/attribute/parameter) methods and fields in DynaCache specification (cachespec,xml) & other tricks

This week I ran into a situation where an internal customer wanted to do the following-

1. Cache a JSP/Servlet ONLY when a particular request attribute or parameter was absent and some other parameters were present. This is tricky because there is no explicit support in the cachespec.xml rules to do this. The best way to cache a page on the absence of a parameter is like so ....

<component id="vehicles" type="parameter">
<component id="category" type="parameter">

In this case we will only cache the servlet IF the value of the vehicles parameter is -1. If at runtime the value of the vehicles parameter is never -1 then this has the desired effect of never caching when the vehicles parameter is present on the request.  To understand this read the infocenter on the required and value component sub-elements
- required Use the required element to specify whether or not this component must return a non-null value for this cache ID to represent a valid cache. If set to true, this component must return a non-null value for this cache ID to represent a valid cache ID. If set to false, the default, a non-null value is used in the formation of the cache ID and a null value means that this component is not used at all in the ID formation.
- value Use the value element to specify values that must match to use this component in cache ID formation.

2. Cache a JSP based on the value of a session attribute's method or field  Let me provide a few examples of how we managed to do this

<!-- This will cause will cause reqattrtest servlet to get cached with the following cache id
 /com.ibm.ws.cache.servlet.reqattrtest.class:customer=14:requestType=GET cacheid is evaluated as request.getSession().getAttribute("customer").getUserName().length()  -->
<component id="customer" type="session">

<!-- This will cause /purchase.jsp to get cached if the "itemInfo" attribute is present on the request and has a non null value for the field min i..e use ( (ItemInfo)request.getAttribute("itemInfo")).min to create the cache-id.
<property name="consume-subfragments">false</property>
<property name="do-not-consume">true</property>
<component id="category" type="parameter">
<component id="itemInfo" type="attribute">

The examples below demonstrate HOW to cache servlets based on arbitrary methods & fields of objects in session or request attributes or parameters. These can be useful for applying caching in complex usescases by dropping the cachespec,xml in a pre-existing application where there isn't much room for change to make the application cachespec.xml  friendly.


Monday, March 26, 2012


Resiliency with the WebSphere WorkManager APIs

WebSphere Application Server provides the com.ibm.websphere.asynchbeans  and commonJ APIs (CommonJ work manager contains a subset of the asynchronous beans work manager methods)  that provide for the full support of application controlled threading, asynchronous callbacks and scoped alarms and subsystem monitors.  If you prefer standard APIs then you can use commonJ APIs instead of websphere.asynchbeans. I want to highlight a couple of settings that should be tuned when configuring both types of WorkManagers (Thread pools that administrators create for Java EE applications).

WorkManager Administrative console panel to set work timeout
WorkManager Admin Console Panel

WebSphere Application Server provides the ability to set an absolute timeout on the Work items submitted to WorkManager via the administrative web console. The Work timeout specifies the number of milliseconds to wait before a scheduled work object is released. If not specified or set to 0, the timeout is disabled. Customers should set this Work Timeout to some finite (non-zero) value so that the stuck threads get a chance to release their respective Work items. The implementor of the Work (Applications implement work objects to run code blocks asynchronously) then should take corrective action in asynchbeans.Work.release() or commonj.work.Work.release() such as exiting out of the synchronous read operations or calling Thread.currentThread().interrupt(). This works for both WorkManager and commonj APIs.  Doing this will allow your application threads to react to non responsive endpoints like remote web services or other calls where the code is waiting indefinitely synchronously on another resource.  *credit to Nathan Rauh for helping clarify this cool feature


Saturday, March 24, 2012


How to install WAS IHS 8.0 on a specific platform using a local Install Manager repository

There are two ways to get the IHS repository.

From the IBM Passport  Advantage, IHS is included with the Supplements images;

Use IBM Packaging Utility to download the IHS repository.

Packaging Utility download information:


Article link:


With Packaging Utility command line, you can create a repository with just the platform coverage you need. 


pucl copy  com.ibm.websphere.IHS.v80 -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v80 -target -platform os=linux,arch=ppc -acceptLicense -prompt

This will create a repository for install to the latest Fix Pack level of IHS ( on linux ppc systems.  Even though the repository is for linux, you can create this on any Packaging Utility supported platform, including Windows.

The supported architecture values for linux are ppc and x86 and you will get 32-bit + 64-bit content.

credit to lene Seelemann  WAS Install Architect


Wednesday, March 21, 2012


WebSphere serviceability gem for servlet request issues


There is a WebContainer custom property you can set that will try to detect and report misuse of the request object:

To specify Web container custom properties:
  1. In the administrative console click Servers > Application Servers > server_name > Web Container settings > Web Container
  2. Under Additional Properties select Custom Properties.
  3. On the Custom Properties page, click New.
  4. On the settings page, enter the name of the custom property that you want to configure in the Name field and the value that you want to set it to in the Value field.
  5. Click Apply or OK.
  6. Click Save on the console task bar to save your configuration changes.
  7. Restart the server.


Thursday, March 15, 2012


Why zOS for WebSphere Application Server ?

Here are some WAS v8.0 for z/OS Resources that will explain the value add of running WebSphere Application Server on zOS

WebSphere Application Server z/OS V8 Technical Introduction

Cookbook for the use of Installation Manager on z/OS with WebSphere on z/OS

WebSphere Application Server z/OS V8 Hidden Gems

WAS z/OS V8 - Granular Control Functions

WebSphere on z/OS Performance Analysis Tips and Techniques



JSF 2, Dynacache and WebSphere Application Server

At present time we aren't sure whether WAS dynacache does support JSF or not. Could you please shed some lights on that?
There is no explicit support statement around JSF like struts and tiles.
Dynacache servlet caching support is generally independent of web frameworks.
You will be able to configure caching for JSF 2 applications by writing cache-entries for the javax.faces.webapp.FacesServlet  servlet class.

Which adverse situations may be experienced by deploying JSF 2.0 on WAS 7.0 for a high volume website?
JSF 2 can be deployed on WAS 7 see  http://wasbehindtheglass.blogspot.com/2011/11/myfaces-20-and-websphere-application.html . As long as you adhere to general best practices and tuning for JSF you will be OK.

JSF Performance and general best practices 

Support statement of JSF2 on WAS 7

1) JSF 2.0 MyFaces is not supported on WAS v7.0, it is considered a third party library that the customer is using.  We have published configuration information for using JSF 2.0 MyFaces
on WAS V7

2) Some of the properties provided here: http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.iseries.doc%2Finfo%2Fiseriesnd%2Fae%2Frweb_jsfengine.html again are specific to the JSF implementations shipped in the WAS runtime: MyFaces 1.2 and SunRI 1.2.  For configurations parameters for JSF MyFaces 2.0 please refer to the following: http://myfaces.apache.org/core20/myfaces-impl/webconfig.html  as these are the ones that will be available for the MyFaces open source implementation that the customer will be using.

So again a big thing when using MyFaces JSF 2.0 on WAS V7 is that any issues that are MyFaces 2.0 specific will not be fixed by IBM, the customer will have to work with the Open Source community as they would with any other unsupported third party library.


Friday, March 9, 2012


WebSphere Application Server JVM Resiliency

When hung thread messages do appear in the log  like so
[3/8/12 11:39:07:481 MST] 00000016 ThreadMonitor W   WSVR0605W: Thread "SipContainer : 13" (0000002f) has been active for 678,382 milliseconds and may be hung.  There is/are 1 thread(s) in total in the server that may be hung. You can configure the JVM to run a script that will kill the JVM


This will generate a javacore after two hung threads and terminate the JVM on the second occurrence of the hung thread.

You can write a range of filters that capture JVM events and run a script

Thanks to Kevin Grigorenko for contributing. check his blog out at


Monday, March 5, 2012


Getting application and module name on an application server thread

Often times you are in situations where you need a unique key for the application and module name from the Thread context classloader. At this point developers resort to hacks like using the Classloader.toString method.

A more suitable approach would be to use the unified portable JNDI name feature in EE6.
Starting WebSphere Application Server 8 developers can do this in their app code

 private String getApplicationName() {

     String uniqueAppName;
          try {
         String moduleName  = (String) new InitialContext().lookup("java:module/ModuleName");
         String applicationName = (String) new InitialContext().lookup("java:app/AppName");
         uniqueAppName = applicationName+":" + moduleName;
          } catch (NamingException e) {
              throw new RuntimeException(e);
          return uniqueAppName;

see http://javahowto.blogspot.com/2009/12/how-to-get-module-name-and-app-name.html

Please note this approach will work on ALL Java EE containers


Saturday, March 3, 2012


WebSphere Application Server large virtual memory process size on Red Hat Enterprise Linux 6 performance degradation

You will get an instant 10% performance boost if you configure MALLOC_ARENA_MAX=1 on Linux RHEL 6 JVMs

See https://bugzilla.linux.ibm.com/show_bug.cgi?id=79624

If after migrating websphere application server from RHEL 5 to RHEL you see a increase in the virtual memory size of your JVM checkout


This manifests itself as a doubling of the resident size of the JVM as compared to its virtual memory size.

This can be fixed by setting environment variable (https://www-304.ibm.com/support/docview.wss?uid=swg21254153),
Name=MALLOC_ARENA_MAX and Value=1


Friday, March 2, 2012


IBM Java Health Center

Please find below a detailed yet most concise information on the IBM Java Health Center

The IBM Java Health Center is a very low overhead tool that runs in the IBM JVM and provides information on method profiling, garbage collection, I/O, lock analysis,threads, native memory, and more.
It is fully supported by the IBM Java Tools team through PMRs.– Documentation
It is similar to HotSpot/Oracle's VisualVM and JRockit Mission Control
It runs with the IBM JVM (32- or 64-bit) on: AIX, Linux, Windows, and z/OS.



December 2006   September 2008   January 2009   February 2009   March 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   October 2010   January 2011   February 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   August 2012   September 2012   October 2012   November 2012   January 2013   May 2013   June 2013   July 2013   September 2013   October 2013   June 2014   August 2014  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]