book
Article ID: KB0087867
calendar_today
Updated On:
Description
Resolution:
Yes, that’s possible. However, by default there is a connection with the DLQ, so if you are using authorization you need to pass also User/Password for the DLQ or deactivate this connection with the DLQ. Here are the two examples for both situations:
Passing User/Password for both, destination and DLQ:
@MessageDriven(name = "TestMDB", activationConfig = {
@ActivationConfigProperty(propertyName ="destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination",propertyValue = "<destination name>"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI",propertyValue="java:/TIBCOJMSProvider"),
@ActivationConfigProperty(propertyName="User",propertyValue="<user>"),
@ActivationConfigProperty(propertyName="Password",propertyValue="<password>"),
@ActivationConfigProperty(propertyName="DLQUser",propertyValue="<user>"),
@ActivationConfigProperty(propertyName="DLQPassword",propertyValue="<password>")
Deactivating the DLQ
@MessageDriven(name = "TestMDB", activationConfig = {
@ActivationConfigProperty(propertyName ="destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination",propertyValue = "<destination name>"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI",propertyValue="java:/TIBCOJMSProvider"),
@ActivationConfigProperty(propertyName="User",propertyValue="<user>"),
@ActivationConfigProperty(propertyName="Password",propertyValue="<password>"),
@ActivationConfigProperty(propertyName="useDLQ",propertyValue="false")
If the User/Password for the DLQ is not passed or the DLQ connection is not deactivated, an error like this one will be showed in the EMS Server log “connect failed: not authorized to connect”
Issue/Introduction
For the integration of JBOSS with EMS, can I use EJB3 and annotations in the MDB to set up the connection with the EMS queue?