我正在使用带有 JBoss eap 6.1 环境的 IBM MQ 消息传递提供程序开发通知服务。我能够通过 MQ JCA 提供程序 rar 即 wmq.jmsra.rar 文件成功发送消息。但是在消费者部分,我当前的配置看起来像这样
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="F2.QUEUE"),
@ActivationConfigProperty(propertyName="providerAdapterJNDI", propertyValue="java:jboss/jms/TopicFactory"),
@ActivationConfigProperty(propertyName="queueManager", propertyValue="TOPIC.MANAGER"),
@ActivationConfigProperty(propertyName="hostName", propertyValue="10.239.217.242"),
@ActivationConfigProperty(propertyName="userName", propertyValue="root"),
@ActivationConfigProperty(propertyName = "channel", propertyValue = "TOPIC.CHANNEL"),
@ActivationConfigProperty(propertyName = "port", propertyValue = "1422")
})
我的问题是该服务的使用者不想在这些 bean 中添加任何端口号、主机名、queueManager 属性。他们也不想使用 ejb-jar.xml 来外部化这些配置。我研究并发现我们可以添加域 IBM Message Driven Bean 但没有成功。关于我可以在这里做什么来外部化所有这些配置的任何建议?
编辑:添加--> JCA 资源适配器部署在消费者端,如果它更容易的话。
谢谢