[jboss-user] [JBoss Messaging] - JBM 1.4.0.SP3 JMSX properties bug

jkwalnutCC do-not-reply at jboss.com
Sun Jan 27 22:51:40 EST 2008


I've run into a problem using the bridge with a provider that is sending JMSX header properties (provider->bridge->JBoss JBM). The JMSX properties are NOT getting ignored.

http://viewvc.jboss.org/cgi-bin/viewvc.cgi/messaging/trunk/src/main/org/jboss/jms/server/bridge/Bridge.java?r1=2817&r2=2906&pathrev=3189

revision 2906, Thu Jul 19 11:07:43 2007 UTC introduced the following code:

 if (!propName.startsWith("JMSX") ||
propName.equals("JMSXGroupID") ||
propName.equals("JMSXGroupSeq")); <<<<<< NOTICE SEMI-COLON!
{
       msg.setObjectProperty(propName,   entry.getValue());
}

Additionally, in JBossMessage.java there is code that will throw an exception when a JMSX property is being set. This is causing a problem when using the bridge to write into another provider (JBoss JBM->bridge->provider). My question here is why is the JMSX property not ignored as the code in the bridge above intends to do?

I've added code to catch this exception and ignore if to get it to work.

JMSX exception thrown:

15:44:28,870 WARN  [Bridge] Failed to send + acknowledge batch, closing JMS obje cts
javax.jms.JMSException: Can only set JMSXGroupId, JMSXGroupSeq, JMSXDeliveryCoun t
        at org.jboss.jms.message.JBossMessage.checkProperty(JBossMessage.java:11
06)
        at org.jboss.jms.message.JBossMessage.setObjectProperty(JBossMessage.jav
a:916)
        at org.jboss.jms.message.MessageProxy.setObjectProperty(MessageProxy.jav
a:418)
        at com.evermind.server.jms.JMSUtils.convertProperties(JMSUtils.java:1760
)
        at com.evermind.server.jms.JMSUtils.convertHeaders(JMSUtils.java:1740)
        at com.evermind.server.jms.EvermindSession.send(EvermindSession.java:110
8)
        at com.evermind.server.jms.EvermindMessageProducer.send(EvermindMessageP
roducer.java:409)
        at com.evermind.server.jms.EvermindMessageProducer.send(EvermindMessageP
roducer.java:221)
        at org.jboss.jms.server.bridge.Bridge.sendMessages(Bridge.java:1339)
        at org.jboss.jms.server.bridge.Bridge.sendBatchNonTransacted(Bridge.java
:1190)
        at org.jboss.jms.server.bridge.Bridge.sendBatch(Bridge.java:1304)
        at org.jboss.jms.server.bridge.Bridge.access$15(Bridge.java:1282)
        at org.jboss.jms.server.bridge.Bridge$SourceListener.onMessage(Bridge.ja
va:1632)
        at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientCon
sumer.java:159)
        at org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(Clie
ntConsumer.java:976)
        at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java
:78)
        at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExe
cutor.java:89)
        at java.lang.Thread.run(Thread.java:595)
15:44:28,917 WARN  [Bridge] Will retry after a pause of 5000 ms
15:44:33,978 INFO  [Bridge] Succeeded in reconnecting to servers

http://viewvc.jboss.org/cgi-bin/viewvc.cgi/messaging/trunk/src/main/org/jboss/jms/message/JBossMessage.java?view=markup&pathrev=272



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123914#4123914

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123914



More information about the jboss-user mailing list