Issue Details (XML | Word | Printable)

Key: GDS-609
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: William Draï
Reporter: Richard Goldman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GraniteDS

Flex-side producer encounters a "fault" upon message send to JBoss Messaging destination

Created: 04/Jan/10 03:39 AM   Updated: 07/Jan/10 06:00 PM   Resolved: 04/Jan/10 12:15 PM
Component/s: Gravity
Affects Version/s: 2.1.0_RC1
Fix Version/s: 2.1.0_RC2

Environment: Granited Data Services 2.1.0.RC1 with Gravity set to run against a JBoss Messaging destination (as embedded in JBoss AS 5.1.0.GA)


 Description  « Hide
Flex-side producer encounters a non-descript "fault" (as seen in the Flex-side trace) upon attempting to send an AsyncMessage to a JBoss Messaging destination.

A stronger indication of an underlying problem is seen in the DEBUG logging of org.granite.gravity.jbossweb.GravityJBossWebServlet on the server side.

This first line shown below is the Flex trace. The lines that follow are from the corresponding JBoss console output:

[ERROR] org.granite.gravity.Producer '2A919FEE-0519-3E7A-5D76-D7BDAE7C2A46' org.granite.gravity.Producer fault for '9B6BC724-B780-FCEE-6DE2-D7BDB08078F9'.

18:02:30,656 DEBUG [GravityJBossWebServlet] >> [AMF3 REQUESTS] [flex.messaging.messages.AsyncMessage {
  correlationId =
  destination = tkwadest
  headers = {DSEndpoint=my-gravityamf, DSSubtopic=testTopic, GDS_BYTEARRAY_BODY=true}
  messageId = 9B6BC724-B780-FCEE-6DE2-D7BDB08078F9
  timestamp = 1262044950140
  clientId = E12DE335-A118-4FB2-9AC0-6A749D40F1DE
  timeToLive = 0
  body = [10, 11, 1, 11, 115, 116, 97, 116, 101, 6, 11, 84, 101, 120, 97, 115, 9, 99, 105, 116, 121, 6, 13, 65, 117, 115, 116, 105, 110, 1]
}]
18:02:30,687 DEBUG [GravityJBossWebServlet] << [AMF3 RESPONSES] [flex.messaging.messages.ErrorMessage {
  faultCode = Server.Call.Failed
  faultDetail = null
  faultString = JMS Adapter error JMSMessageID must start with ID:
  rootCause = null
  extendedData = null
  correlationId = 9B6BC724-B780-FCEE-6DE2-D7BDB08078F9
  destination = tkwadest
  headers = {parentConversationId=null, isLongRunningConversation=false, conversationId=9, org.granite.sessionId=F3519BBDDF83FB0311A2FE55712B0FC4}
  messageId = 7FE7EEE9-4880-4E0B-B2EC-90591F5C6EF1
  timestamp = 1262044950687
  clientId = E12DE335-A118-4FB2-9AC0-6A749D40F1DE
  timeToLive = 0
  body = null
}]

Please note the "JMS Adapter error JMSMessageID must start with ID" faultString. This seems to show that the string "ID:" may need to be prepended to the message id (such as seen at the getJMSMessageID method detail at http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html).

William suggested forcing the prepend of "ID:" (on the Flex side) with this code: msg.messageId = "ID:" + UIDUtil.createUID()
-- It did resolve the problem.

I tried modifying the line "jmsMessage.setJMSMessageID(message.getMessageId());" found in org.granite.gravity.adapters.JMSServiceAdapter.java to include a prepend of "ID:" and this approach worked as well.

William Draï added a comment - 04/Jan/10 12:15 PM
Should be fixed in trunk.
Add 'ID:' to JMSMessageID and JMSCorrelationID when not already present.
Remove 'ID:' from message ids received from JMS.

Richard Goldman added a comment - 07/Jan/10 06:00 PM
I tried it and it works well. Thank you kindly for the fast fix.