Friday, April 16, 2010

How WebSphere Application Server handles poison messages

WebSphere Application Server V5.x provides support for asynchronous messaging based on the Java™ Messaging Service (JMS) specification. Using the message listener service and either the Embedded JMS Server or an external message provider, such as WebSphere MQ, application developers can write message-driven beans (MDBs) that listen on a JMS destination (either a message queue or a topic) and that then get invoked when a message arrives at that particular destination. If the message listener service delivers a "poison message" to an MDB application, the application can choose to reject it. When this happens, what does the application server do with the message?

http://www.ibm.com/developerworks/websphere/library/techarticles/0405_titheridge/0405_titheridge.html

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg27016582



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.

Posted via email from shaker's posterous

Wednesday, April 7, 2010

websphere javacore and heap dump location

The Java heap is the memory space where the Java Virtual Machine (JVM) stores the entire set of objects created by the running Java application. A JVM heapdump is a file produced by the JVM to record the state of the heap at a particular moment in time. 

A java core is a snapshot of the threads at work in a JVM. It also details a cross section of information from the major components in the JVM like XM,XE, LK, etc (IBM Javacore only, Sun does not - it just shows threads)

A heapdump is a snapshot of JVM memory - it shows the live objects on the heap along with references between objects. It is used to determine memory usage patterns and memory leak suspects. 

Both can be created by issuing a kill -3 on the PID of the JVM process. There are other ways to gather these docs as well (wsadmin scripts)

The heapdump file location will be reported to stderr (usually the command window) by the JVM. If you set IBM_HEAPDUMPDIR, this directory should be used. Typically the file name will look something like this:
heapdump.YYYYMMDD.HHMMSS.PID.phd

Environment variables control the IBM JVM’s heap dump behavior. They can be set either in the OS environment variables or in the admin console (preferred).

Go to Application servers > server1 > Process definition > Environment Entries (or custom properties in older versions of WAS)

Create the following entries by clicking New:

  IBM_HEAPDUMP                           true      

  IBM_HEAPDUMPDIR                    /var/logs/heap

  IBM_HEAPDUMP_OUTOFMEMORY      true      

  IBM_HEAP_DUMP                        true       

  IBM_JAVACOREDIR                      /var/logs/core

  IBM_JAVADUMP_OUTOFMEMORY      true      

  IBM_JAVA_HEAPDUMP_TXT  true  



This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.

Posted via email from shaker's posterous