Announcement Announcement Module
No announcement yet.
MessageTemplate, Spring 3 and Threads Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageTemplate, Spring 3 and Threads

    I'm facing a problem after the migration from Spring 2.5, Flex 3.5 and Java 6 to Spring 3.1, Flex 4.5 and Java 7. I've declared a ClientFeed in order to send a sort of "alarm" messages to the flex client. There are three methods those alarms are sent. The first one is via snmp traps, a thread is started and wait for any trap, as one is received an alarm will be sent. The second method is via a polling mechanism, at the beginning of the web application a thread is started and will poll after a constant amount of time the alarms and send them to the client. The third method is the explicit poll command from the user, this will call a specific function on the dedicated service. This function uses then the same algorithm used in the second methods to perform a poll and shall send those alarms to the client.

    The problem is that after the migration the first two methods are working without a problem, but the third one doesn't. I suspect there is a relation with the threads. Is there any known issue between messagetemplate and the threads with the new frameworks ?

    Here is a snapshot of the used client feed:

    public class ClientFeed {
        private MessageTemplate messageTemplate;
        public void setTemplate(MessageTemplate messageTemplate) {
            this.messageTemplate = messageTemplate;
        public void sendAlarmUpdate(final Alarm myAlarm) {
            if (messageTemplate != null) {
                System.out.println("Debug Thread: " + Thread.currentThread().getName());
                messageTemplate.send(new AsyncMessageCreator() {
                    public AsyncMessage createMessage() {
                        AsyncMessage msg = messageTemplate.createMessageForDestination("flexClientFeed");
                        msg.setHeader("DSSubtopic", "Alarm");
                        return msg;
    By the three methods I reach this piece of code and the displayed thread name are respectively: "Thread-14", "Thread-24" and "http-bio-80-exec-10".

    Thanks in advance

  • #2
    You've posted on the wrong forum. This forum is for Spring Integration project.


    • #3
      Sorry, I thought that also part of the integration. I also updated BlazeDS to the 4th version.
      Can you tell me on which forum should I post this thread ?


      • #4
        Try or since I am not sure if its Spring related or something else