for the MDB:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="messagingType", propertyValue="javax.jms.MessageListener"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/YOURQUEUENAME"),
@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "MESSAGE_TYPE = 'MESSAGE_TYPE_IMPORT_BLA'")
},
mappedName = "YOURMDBNAME")
and in your code when you produce the Message:
TextMessage message = session.createTextMessage();
message.setText(messageText);
message.setStringProperty("MESSAGE_TYPE", "MESSAGE_TYPE_IMPORT_BLA");
(you can use an enum for message types...)
Thursday, March 24, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment