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

beve do-not-reply at jboss.com
Wed Jul 11 14:47:04 EDT 2007


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()  );
  | 
  | 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?
  | 
  | 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

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

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



More information about the jboss-dev-forums mailing list