3 Replies Latest reply on Dec 28, 2007 7:34 AM by Mark Little

    Aggregator exception using JMS Topics

    JD Morgan Newbie

      A little info on my configuration:

      I am breaking apart a large load of data objects into bite-sized Vectors and sending them to a JMS Topic. I have N number of listeners to this topic that consume these messages and do what they will with they data.

      One of these listeners is interested in aggregating these messages to see the data as a whole. A perfect use for the aggregator! Looking at how the aggregator action works, it's keyed off of an ArrayList set in a certain message property. The problem is JMS (JBossMessage instance I think) doesn't allow me to set an object property to an ArrayList that I know of. So I wrote a subclass of PackageJmsMessageContents and overrode the way the properties are set with a custom ESBPropertiesSetter interface. This looks for the aggregator tag on the JMS message (which is a string containing the serialized ArrayList) and set's the returned ESB message property correctly.

      Works like a charm except when the aggregator action goes to create the aggregated message. I get the following exception:

      java.lang.IllegalArgumentException: value must be Serializable
       at org.jboss.internal.soa.esb.message.format.xml.AttachmentImpl.addItem(AttachmentImpl.java:100)
       at org.jboss.soa.esb.actions.Aggregator.createAggregateMessage(Aggregator.java:236)
       at org.jboss.soa.esb.actions.Aggregator.process(Aggregator.java:185)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(MessageAwareListener.java:303)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:613)
      


      Any ideas? Am I way off base?

      TYIA