[esb-issues] [JBoss JIRA] Updated: (JBESB-3229) org.jboss.soa.esb.actions.Aggregator class does not forward the message id and service id received from the router.
Kevin Conner (JIRA)
jira-events at lists.jboss.org
Wed Apr 7 06:39:40 EDT 2010
[ https://jira.jboss.org/jira/browse/JBESB-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Conner updated JBESB-3229:
--------------------------------
Fix Version/s: 4.4 CP5
(was: 4.4 CP4)
> org.jboss.soa.esb.actions.Aggregator class does not forward the message id and service id received from the router.
> -------------------------------------------------------------------------------------------------------------------
>
> Key: JBESB-3229
> URL: https://jira.jboss.org/jira/browse/JBESB-3229
> Project: JBoss ESB
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.4 CP3
> Environment: Windows 7
> Reporter: Mohit Mohta
> Fix For: 4.4 CP5
>
>
> Hi,
> I have faced an issue that while using the org.jboss.soa.esb.actions.Aggregator class in my project i was getting an Null pointer exception in the MQMessage Router saying that it is not getting the message id and service name recevied from the message kept on the queue.
> To find out this i opened the org.jboss.soa.esb.actions.Aggregator.java in the src folder,where i found that in process method it creates a new message from the Message factory through a private Method createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap).In this private method it is creating a new message without setting the message id and service name recevied from the original message.Like this.
> public Message createAggregateMessage(String uuId, Map<Integer, Message> messageMap) throws ActionProcessingException {
> // Create an aggregated message
> Message aggregatedMessage = MessageFactory.getInstance().getMessage();// Here creatng a new message without setting the previous message id.
> //Push additional AggregatorTags onto the new message, so we can aggregate in case of nested splits.
> //Only need to get it from the first message, should be the same for the others.
> List<String> aggregatedMessageTags = copyAggregationTags(messageMap);
> setAggregatorTags(aggregatedMessage, aggregatedMessageTags);
> for (Message attachmentMessage : messageMap.values()) {
> //Add the individual messages as attachments
> try {
> // Clear the aggregation tags from the attachment message. Any future aggregation
> // on the payload of these messages should be done within the context of the
> // outer/aggregated message and it's tags.
> setAggregatorTags(attachmentMessage, null);
> aggregatedMessage.getAttachment().addItem(Util.serialize(attachmentMessage));
> } catch (ParserConfigurationException e) {
> throw new ActionProcessingException("Message attachment serialization failure", e);
> } catch (IOException e) {
> throw new ActionProcessingException("Message attachment serialization failure", e);
> }
> }
>
> synchronized (aggregatedMessageMap)
> {
> aggregatedMessageMap.remove(uuId);
> }
> //TODO remove messageMap from permanent storage, or do that per message in the loop above using value of the aggregatorTag
> //remove from the notificationMap if it is in there.
>
> return aggregatedMessage;
> }
> So what i did i explicitly passed the message id and service name to the newly created message.like this.
> String serviceName = message.getProperties().getProperty("serviceName").toString();
> String MessageId = message.getProperties().getProperty("mqMessageId").toString(); // Details from the prevoius message.
> Then passed this to the new message.like this
> message = createAggregateMessage(aggrDetails.getSeriesUuid(), messageMap);
> message.getProperties().setProperty("mqMessageId", MessageId);
> message.getProperties().setProperty("serviceName", serviceName);
> After this my problem of getting Null Pointer exceptiongot resolved.
> Request to the person to resolve this issue/bug with Aggregator class.
> Regards
> Mohit
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the esb-issues
mailing list