Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Example of service-activator?  RSS feed

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a program that uses spring and jms to load messages into a queue. Now I'd like to read them from that queue using a service activator. Try as I might, I'm having no luck at all. The symptom is that the service class doesn't see the queue/or is looking at the wrong queue. I know the service's constructor is being invoked but thereafter... nothing.



I removed all the annotations from WeakSauceService as they didn't seem to do anything.

I am using a tool to look at the queue so I know my messages are getting there. Whatever should invoke the handleMessageResponse method isn't happening.

If anyone has an example, that would be most appreciated.

 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have discovered that the 'handleMessageResponse' method is being called, but with no arguments.

That is, instead of the following being called:

public void handleMessageResponse(TryMe tryMe) { ... }

this is being called:

public void handleMessageResponse() { ... }

Now I can't quite see how this is useful, but perhaps it's a step forward.
 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flying on intuition, I added this method:

public void handleMessageResponse(String x) {}

And lo and behold, the message is delivered, as XML, in the x argument.

So now I just need to trawl a bit more and find a queue wrapped up in an 'unmarshalling' transformer of some sort, and pull my messages from there...

Yeah, I'm talking to myself. Seems to help.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!