MDB (ejb3) in JBoss with WebSphere MQ

Our MDB already work in our JBoss server, our problem is that the server address/port are specified in ActivationConfigProperty annotation, so it's not configurable. The queue is retrieve from the JNDI, but i cannot specify the ConnectionFactory as a JNDI ressource...

I`ve already try an annotation like:
@ActivationConfigProperty(propertyName="connectionFactoryName", propertyValue="jms/factory")

Result: No property found for: connectionFactoryName on JavaBean: javax.jms.Queue:jms/request@@localhost)

From what i read, i have very little hope to resolve this issue.

JBoss version: jboss-4.2.3.GA
Websphere MQ: 6.xx

MDB Code:
@MessageDriven(name="RequestListener", activationConfig = {
	    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
	    @ActivationConfigProperty(propertyName="destination", propertyValue="jms/request"),
	    @ActivationConfigProperty(propertyName="useJNDI", propertyValue="true"),
	    @ActivationConfigProperty(propertyName="hostName", propertyValue=""),
	    @ActivationConfigProperty(propertyName="port", propertyValue="1420")
public class RequestListener implements MessageDrivenBean, MessageListener {
Queue MBean:
	<!-- mbeans defining JCA administered objects -->
	<mbean code="org.jboss.resource.deployment.AdminObject"
		<attribute name="JNDIName">jms/request</attribute>
		<depends optional-attribute-name="RARName">
		<attribute name="Type">javax.jms.Queue</attribute>
		<attribute name="Properties">
Connection Factory
  <!-- JCA Connection factory definitions -->
    <xa-transaction />
      <config-property name="queueManager" type="java.lang.String">MGT0</config-property>
      <config-property name="hostName" type="java.lang.String"></config-property>
      <config-property name="port" type="java.lang.String">1420</config-property>
      <config-property name="transportType" type="java.lang.String">CLIENT</config-property>

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KoboldAuthor Commented:
I finally found something:

edit ra.xml from wmq.jmsra.rar/META-INF,  replace with
a custom class that extends it.

Package that class in a .jar and place it in the same directory than  wmq.jmsra.rar.

Your impl can get its parameters from a .xml, env properties or anything else.

this is a patch, but i didnt find anything else...
public class DynamicActivationSpecImpl extends ActivationSpecImpl {
	public DynamicActivationSpecImpl() {

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.