activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Veraghtert (JIRA)" <>
Subject [jira] Commented: (AMQ-1551) ActiveMQ as foreign JMS provider to BEA WLS 8.1/10
Date Sat, 12 Jul 2008 18:42:00 GMT


Guy Veraghtert commented on AMQ-1551:

My findings after some debugging:

The send method in ActiveMQSession sets the incoming ActiveMQDestination on the incoming javax.jms.Message,
in my case this message was of type weblogic.jms.common.TextMessageImpl. The imlementation
of the setJMSDestination() method on this class (in fact on the superclass weblogic.jms.common.MessageImpl)
doesn't set the destination if it isn't an instance of a implementation specific weblogic
Destination. So after executing the setJMSDestination(), getJMSDestination() on the incoming
message still returns null.

Later on in the send method, the weblogic specific message is transformed into an ActiveMQMessage
via ActiveMQMessageTransformation.transformMessage(message, connection); This static method
uses getJMSDestination() (returning null) on the orginal weblogic message to create an activemq
version of the destination: activeMessage.setJMSDestination(transformDestination(message.getJMSDestination()));

A simple fix to support (amongst others) WLS bridging would be to set the destination after
the message was transformed:

ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection);
//for WebLogic
if(msg.getJMSDestination() == null) {

Probably this would also solve issue:

> ActiveMQ as foreign JMS provider to BEA WLS 8.1/10
> --------------------------------------------------
>                 Key: AMQ-1551
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>         Environment: BEA WLS 8.1/10
>            Reporter: Christian Burger
> During evaluation of ActiveMQ we found incompatibilties┬┤of MQ with BEA WLS 8.1 and WLS
10. We contacted the BEA support - they where investigating and pinpointed the problem:
> Hello ,
> This is regarding your support case ABCDEF titled Need help in configuring message bridge
with ActiveMQ. Here I am with the response from the next level of support team on the following
NullPointerException that I am getting while configuring a message bridge with WLS. It is
observed that even other customers are also observing the same exception while configuring
a message bridge with ActiveMQ.
> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<anonymous>> <> <> <1197983909603> <BEA-000000>
> javax.jms.JMSException: java.lang.NullPointerException
> at org.apache.activemq.util.JMSExceptionSupport.create(
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> at org.apache.activemq.ActiveMQSession.send(
> at org.apache.activemq.ActiveMQMessageProducer.send(
> at org.apache.activemq.ActiveMQMessageProducer.send(
> at weblogic.jms.adapter.JMSBaseConnection.sendInternal(
> at weblogic.jms.adapter.JMSBaseConnection.access$200(
> at weblogic.jms.adapter.JMSBaseConnection$
> at
> at Source)
> at weblogic.jms.adapter.JMSBaseConnection.send(
> It is confirmed that this is not an issue with WLS, but Active MQ not setting the JMS
Destination after the message is sent. As per the JMS specification, it states that the JMSDestination
should be set AFTER the message is sent. In the case of a client contacting weblogic, this
should be the wlclient.jar classes, as these are used to handle the connection; in the case
of wls -> wls via messaging bridge, it will still be the same classes, although these will
embedded within the JMS server.
> In the case of WLS -> ActiveMQ via a messaging bridge, the messaging bridge will create
a connection to ActiveMQ using the ActiveMQ client classes. The messaging bridge won't be
able to set the JMSDestination, because it can't be done after the message is sent. It can
be done by either the ActiveMQ client classes or the ActiveMQ JMS server, becasue these will
handle the post send method methods.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message