[jboss-dev-forums] [Design of JBoss ESB] - Re: JMSHeader fields

mark.little@jboss.com do-not-reply at jboss.com
Wed Jul 11 16:30:57 EDT 2007


"beve" wrote : Hi,
  | 
  | I'm working on JIRA http://jira.jboss.com/jira/browse/JBESB-651 and would like to know how JMSHeader fields should be transported with a Message object in the ESB.
  | 
  | I've identified the following JMSHeader fields that might be of interest.
  | 
  |   | JMSMessageID     -> message.getHeader().getCall().getMessageID()
  |   | JMSCorrelationID -> message.getHeader().getCall().getRelatesTo()  );
  |   | 
  |   | 

Yes, that sounds right to me. Since we have the capability in the EPR, let's use that rather than stuff the information in the message body.

anonymous wrote : 
  | JMSReplyTo should propably be mapped to message.getHeader().getCall().getReplyTo() but I'm not sure how I should set/create the JMSEpr. Can anyone help me out?
  | 

What's the problem specifically?

anonymous wrote : 
  | I have another JIRA that is related to this one which is the JMSRouter. I've added the following method to this class:
  | 
  |   | protected void setJMSProperties( Message jmsMessage, org.jboss.soa.esb.message.Message esbMsg ) 
  |   | throws JMSException 
  |   | { 	
  |   |         jmsMessage.setJMSCorrelationID( esbMsg.getHeader().getCall().getRelatesTo().toString() );
  |   | }
  |   | 
  | Now this will set the out going JMS message correlationID to the JMSMessageID that has been carried along with the Message object. This is probably ok for most user but this will also let other that have different needs subclass JMSRouter and overrride this method.
  | 
  | While writing unit test for this I noticted that the test JmsRouterUnitTest is trying to connect to a server, and if one is not running it will time out:
  | 
  |   | [java]     [junit] Running org.jboss.soa.esb.actions.routing.JmsRouterUnitTest
  |   | [java]     [junit] Testsuite: org.jboss.soa.esb.actions.routing.JmsRouterUnitTest
  |   | [java]     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 80.874 sec
  |   | [java]     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 80.874 sec
  |   | 
  | Recactoring this junit test might speed up the build :)
  | 
  | Thanks,
  | 
  | Daniel

It should probably be an integration test anyway.

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

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



More information about the jboss-dev-forums mailing list