Java Reference
In-Depth Information
In the resulting dialog window, we need to enter a name, package, and select a JMS
destination for the message driven bean.
Once we have entered all the required information, our message driven bean is
created in the specified package.
package com.ensode.mdb;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
/**
*
* @author heffel
*/
@MessageDriven(mappedName = "jms/myQueue", activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")})
public class MessageReceiver implements MessageListener {
public MessageReceiver() {
 
Search WWH ::




Custom Search