Package org.glassfish.ejb.mdb
Class MessageBeanListenerImpl
- java.lang.Object
-
- org.glassfish.ejb.mdb.MessageBeanListenerImpl
-
- All Implemented Interfaces:
MessageBeanListener
public class MessageBeanListenerImpl extends Object implements MessageBeanListener
- Author:
- Kenneth Saks
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterMessageDelivery()Post-delivery notification to the container.voidbeforeMessageDelivery(Method method, boolean txImported)Pre-delivery notification to the container.ObjectdeliverMessage(Object[] params)Deliver a message to a message bean instance.ResourceHandlegetResourceHandle()voidsetResourceHandle(ResourceHandle handle)
-
-
-
Method Detail
-
setResourceHandle
public void setResourceHandle(ResourceHandle handle)
- Specified by:
setResourceHandlein interfaceMessageBeanListener
-
getResourceHandle
public ResourceHandle getResourceHandle()
- Specified by:
getResourceHandlein interfaceMessageBeanListener
-
beforeMessageDelivery
public void beforeMessageDelivery(Method method, boolean txImported)
Description copied from interface:MessageBeanListenerPre-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.- Specified by:
beforeMessageDeliveryin interfaceMessageBeanListener- Parameters:
method- is the method that will be invoked during deliverMessage. It is used the container during transaction setup to lookup the appropriate transaction attribute.txImported- whether a transaction is being imported
-
deliverMessage
public Object deliverMessage(Object[] params) throws Throwable
Description copied from interface:MessageBeanListenerDeliver a message to a message bean instance.- Specified by:
deliverMessagein interfaceMessageBeanListener- Parameters:
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 jakarta.ejb.EJBException in the case that the bean throws a system exception. Note that exceptions are *always* propagated, regardless of transaction type.
-
afterMessageDelivery
public void afterMessageDelivery()
Description copied from interface:MessageBeanListenerPost-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.- Specified by:
afterMessageDeliveryin interfaceMessageBeanListener
-
-