Configure WebLogic MDB to listen to Foreing AMQ Server
Posted
by
eliel.lobo
on Stack Overflow
See other posts from Stack Overflow
or by eliel.lobo
Published on 2013-10-28T15:49:52Z
Indexed on
2013/10/28
15:53 UTC
Read the original article
Hit count: 393
I'm trying to create an MDB(EJB 3.0) on WebLogic 10.3.5. to listen to a Queue in an external AMQ server. but after much work and combination of tutorials i get the followin error when deployin on WwebLogic.
[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 thos 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. As connection factory I have used ActiveMQConnectionFactory initially and ActiveMQXAConnectionFactory later, I also ignome the jms. notation an just put plain names as testQueue.
Then create a simple MDB whit the following structure. I explicitly defined "connectionFactoryJndiName" property because otherwise it assumes a WebLogic connection factory which is not found an 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.
© Stack Overflow or respective owner