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?

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?

book

Article ID: KB0087867

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

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 = "&ltdestination name>"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI",propertyValue="java:/TIBCOJMSProvider"),
@ActivationConfigProperty(propertyName="User",propertyValue="&ltuser>"),
@ActivationConfigProperty(propertyName="Password",propertyValue="&ltpassword>"),
@ActivationConfigProperty(propertyName="DLQUser",propertyValue="&ltuser>"),
@ActivationConfigProperty(propertyName="DLQPassword",propertyValue="&ltpassword>")


Deactivating the DLQ

@MessageDriven(name = "TestMDB", activationConfig = {
@ActivationConfigProperty(propertyName ="destinationType", propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "destination",propertyValue = "&ltdestination name>"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI",propertyValue="java:/TIBCOJMSProvider"),
@ActivationConfigProperty(propertyName="User",propertyValue="&ltuser>"),
@ActivationConfigProperty(propertyName="Password",propertyValue="&ltpassword>"),
    @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?