FileDocCategorySizeDatePackage
MessageBeanListener.javaAPI DocGlassfish v2 API4132Fri May 04 22:32:54 BST 2007com.sun.ejb

MessageBeanListener

public interface MessageBeanListener
Lifecycle contract for a single MessageBeanListener. Implemented by the MessageBeanContainer and called by the MessageBeanClient for each message delivery. Each message delivery MUST call each of the three methods exactly once, in the same thread, and in the following order : 1. beforeMessageDelivery 2. deliverMessage 3. afterMessageDelivery
author
Kenneth Saks

Fields Summary
Constructors Summary
Methods Summary
public voidafterMessageDelivery()
Post-delivery notification to the container. Container will perform any work required to commit/rollback a container-managed transaction. When this method returns, the thread's context class loader will be restored to the value it had when beforeMessageDelivery was called.

public voidbeforeMessageDelivery(java.lang.reflect.Method method, boolean txImported)
Pre-delivery notification to the container. Any transaction initialization is peformed here. In addition, when this method returns, the current thread's context class loader will be set the message-bean's application class loader.

param
method is the method that will be invoked during deliverMessage. It is used the container during transaction setup to lookup the appropriate transaction attribute.
param
txImported whether a transaction is being imported

public java.lang.ObjectdeliverMessage(java.lang.Object[] params)
Deliver a message to a message bean instance.

param
params to use of the method invocation. Can be null or an 0-length array if there are 0 arguments.
throws
Throwable This is either an application exception as thrown from the message bean instance or a javax.ejb.EJBException in the case that the bean throws a system exception. Note that exceptions are *always* propagated, regardless of transaction type.

public com.sun.enterprise.resource.ResourceHandlegetResourceHandle()

public voidsetResourceHandle(com.sun.enterprise.resource.ResourceHandle handle)