1
votes

I'm trying to create an MDB(EJB 3.0) on WebLogic 10.3.5. to listen to a Queue on an external AMQ server. After much work and combination of tutorials i get the following error when deploying on webLogic.

[EJB:015027]The Message-Driven EJB is transactional but JMS connection factory referenced by the JNDI name: ActiveMQXAConnectionFactory is not a JMS XA connection factory.

Here is a brief of the work i have done:

I have added the corresponding libraries to my WLS classpath (following this tuturial http://amadei.com.br/blog/index.php/connecting-weblogic-and-activemq) and I have created the corresponding JMS Modules as indicated in the tutorial. I have used ActiveMQConnectionFactory initially and ActiveMQXAConnectionFactory later, I also ignore the jms. notation an just put plain names as testQueue.

Then create a simple MDB with the following structure. I explicitly defined "connectionFactoryJndiName" property because otherwise it assumes a WebLogic connection factory which is not found, and then raises an error.

@MessageDriven(
        activationConfig = { 
                @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), 
                @ActivationConfigProperty(propertyName = "destination", propertyValue = "testQueue"),
                @ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue = "ActiveMQXAConnectionFactory")
        }, 
        mappedName = "testQueue")
public class ROMELReceiver implements MessageListener {

    /**
     * Default constructor. 
     */
    public ROMELReceiver() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @see MessageListener#onMessage(Message)
     */
    public void onMessage(Message message) {
        System.out.println("Message received");
    }

}

At this point I'm stuck with the error mentioned above. Even though I use ActiveMQXAConnectionFactory instead of simply ActiveMQConnectionFactory, JNDI resources tree in web logic server shows org.apache.activemq.ActiveMQConnectionFactory as class for my configured connection factory.

am i missing something? or is this just a completely wrong way to connect WebLogic whith AMQ?

Thanks in advance.

1
What version of ActiveMQ are you using?Claus Ibsen
I'm using ActiveMQ 5.8eliel.lobo

1 Answers

0
votes

I know its late but i recently i had to do the same thing and encoutered the same error. This post helped me:

https://community.oracle.com/thread/3903705

Basically it says to add a new parameter in the jndi properties on the foreign server option on the module in weblogic.

xa=true.

Because activemq is not using Xa connections by default.