Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cz.sedlackovi.test;
- import javax.ejb.ActivationConfigProperty;
- import javax.ejb.MessageDriven;
- import javax.jms.Message;
- import javax.jms.MessageListener;
- import org.jboss.ejb3.annotation.ResourceAdapter;
- /**
- * Message-Driven Bean implementation class for: MDB
- *
- */
- @MessageDriven(
- activationConfig = { @ActivationConfigProperty(
- propertyName = "destinationType", propertyValue = "javax.jms.Topic"
- ),
- @ActivationConfigProperty(
- propertyName = "destination",
- propertyValue = "topic/avesEntityMessages")})
- @ResourceAdapter("hornetq-ra")
- public class MDB implements MessageListener {
- /**
- * Default constructor.
- */
- public MDB() {
- // TODO Auto-generated constructor stub
- }
- /**
- * @see MessageListener#onMessage(Message)
- */
- public void onMessage(Message message) {
- System.out.println("zprava prisla: " + message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment