[jboss-user] [EJB 3.0] - Configuring external jms datasource with MQSeries
jamesworourke
do-not-reply at jboss.com
Tue Apr 15 20:40:24 EDT 2008
I'm posting here after much research into this matter.
Currently, we are using wmq.jmsra.rar resource adapter with jboss 4.2.2 successfully. Essentially, all the configuration we have is in EJB 3.0 annotations, as follows:
@MessageDriven(mappedName = "FilmMDB" activationConfig = {
| // Note: the values inside strings here with @....@ pattern are replaced by the build
| // script
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "FundTransactionTopic"),
| @ActivationConfigProperty(propertyName = "channel", propertyValue = "@MDBChannel@"),
| @ActivationConfigProperty(propertyName = "hostName", propertyValue = "@MDBHostName@"),
| @ActivationConfigProperty(propertyName = "queueManager", propertyValue = "@MDBQueueManager@"),
| @ActivationConfigProperty(propertyName = "port", propertyValue = "@MDBPort@"),
| @ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"),
| @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false"),
| @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "@MDBDurable@"),
| @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "FilmSub"),
| @ActivationConfigProperty(propertyName = "clientID", propertyValue = "MyId") })
| @ResourceAdapter(value = "wmq.jmsra.rar")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| @TransactionManagement(TransactionManagementType.BEAN)
| public class FilmMDB implements MessageListener {....}
This works for now however, the problem is, I would like to have the configuration for the queue/topic be external to the code and to the application configuration. I realize we could use a deployment descriptor, however, that would still require packaging with the ear. Ultimately, what is desirable is to configure the MDB to use a connection factory in a similar way to a datasource for db connections. I have attempted to follow the instructions here:
http://wiki.jboss.org/wiki/UsingWebSphereMQSeriesWithJBossASPart4
but with limited success. It seems that the connection factory setup is for clients and there is no way to attached a connection factory to an MDB. Is this true? Any suggestions would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144361#4144361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144361
More information about the jboss-user
mailing list