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.
Add 'ID:' to JMSMessageID and JMSCorrelationID when not already present.
Remove 'ID:' from message ids received from JMS.