MDB (ejb3) in JBoss with WebSphere MQ

Posted on 2008-11-07
Last Modified: 2013-12-02
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

Question by:Kobold
    1 Comment
    LVL 3

    Accepted Solution

    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


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
    The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
    XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now