-
- All Superinterfaces:
- EnterpriseBean, Serializable
public interface MessageDrivenBean extends EnterpriseBean
The MessageDrivenBean interface defines methods that the EJB container uses to notify a message driven bean instance of the instance's life cycle events.As of EJB 3.0 it is no longer required that a message driven bean class implement this interface.
- Since:
- EJB 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
ejbRemove()
A container invokes this method before it ends the life of the message-driven object.void
setMessageDrivenContext(MessageDrivenContext ctx)
Set the associated message-driven context.
-
-
-
Method Detail
-
setMessageDrivenContext
void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
Set the associated message-driven context. The container calls this method after the instance creation.The message driven bean instance should store the reference to the context object in an instance variable.
This method is called with no transaction context.
- Parameters:
ctx
- A MessageDrivenContext interface for the instance.- Throws:
EJBException
- Thrown by the method to indicate a failure caused by a system-level error.
-
ejbRemove
void ejbRemove() throws EJBException
A container invokes this method before it ends the life of the message-driven object. This happens when a container decides to terminate the message-driven object.This method is called with no transaction context.
- Throws:
EJBException
- Thrown by the method to indicate a failure caused by a system-level error.
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/ejb/MessageDrivenBean.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.