blob: 93bdd6cce55339c89b7899e4f0ef14ac725bd5d1 [file] [log] [blame]
<%@ jet package="org.eclipse.jst.j2ee.ejb.gmf.templates.messageDriven" class="MethodGenerator" imports="java.util.* org.eclipse.jst.j2ee.ejb.annotation.internal.model.*"%>
<% IMessageDrivenBean mdb = (IMessageDrivenBean)argument; %>
/**
* Required method for container to set context.
* @generated
*/
public void setMessageDrivenContext(javax.ejb.MessageDrivenContext messageContext)
throws javax.ejb.EJBException {
this.messageContext = messageContext;
}
/**
* Required creation method for message-driven beans.
*
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* <!-- begin-xdoclet-definition -->
* @ejb.create-method
* <!-- end-xdoclet-definition -->
* @generated
*/
public void ejbCreate() {
//no specific action required for message-driven beans
}
/**
* Required removal method for message-driven beans.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void ejbRemove() {
messageContext = null;
}
/**
* This method implements the business logic for the EJB.
*
* <p>Make sure that the business logic accounts for asynchronous message processing.
* For example, it cannot be assumed that the EJB receives messages in the order they were
* sent by the client. Instance pooling within the container means that messages are not
* received or processed in a sequential order, although individual onMessage() calls to
* a given message-driven bean instance are serialized.
*
* <p>The <code>onMessage()</code> method is required, and must take a single parameter
* of type javax.jms.Message. The throws clause (if used) must not include an application
* exception. Must not be declared as final or static.
*
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void onMessage(javax.jms.Message message) {
// begin-user-code
System.out.println("Message Driven Bean got message " + message);
// TODO: do business logic here
// end-user-code
}