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 void
afterMessageDelivery()
Post-delivery notification to the container.void
beforeMessageDelivery(Method method, boolean txImported)
Pre-delivery notification to the container.Object
deliverMessage(Object[] params)
Deliver a message to a message bean instance.ResourceHandle
getResourceHandle()
void
setResourceHandle(ResourceHandle handle)
-
-
-
Method Detail
-
setResourceHandle
public void setResourceHandle(ResourceHandle handle)
- Specified by:
setResourceHandle
in interfaceMessageBeanListener
-
getResourceHandle
public ResourceHandle getResourceHandle()
- Specified by:
getResourceHandle
in interfaceMessageBeanListener
-
beforeMessageDelivery
public void beforeMessageDelivery(Method method, boolean txImported)
Description copied from interface:MessageBeanListener
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.- Specified by:
beforeMessageDelivery
in 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:MessageBeanListener
Deliver a message to a message bean instance.- Specified by:
deliverMessage
in 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:MessageBeanListener
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.- Specified by:
afterMessageDelivery
in interfaceMessageBeanListener
-
-