|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Trigger Java function with Spring on MQMessage |
« View previous topic :: View next topic » |
Author |
Message
|
Klimy |
Posted: Fri Jul 09, 2010 6:37 am Post subject: Trigger Java function with Spring on MQMessage |
|
|
Newbie
Joined: 09 Jul 2010 Posts: 1
|
Hello all,
I know nothing of MQSeries. And all my superiors are on vacation, so there is really noone here to help me out, except you.
Currently we are writing an application where we get a message from bizztalk that we later work with. We use IBM MQ Series in order to get this message.
I've read some guides on how to get a message from a queue and so on. But I can't find any help about how to make it so that when MQ Series will have a message then it will trigger my funtion with help of Spring.
We also use JMS so I tried to do the same trick for MQ Series, which do not work. here is the code:
Code: |
@Controller
@RequestMapping(value = "/")
public class MQToCore {
@Override
public void onMessage(MQMessage message){
}
}
|
But anotation Override is not accepted and say: "Method does not override method from it's superclass". Is there anythign my class should implement? Or what did I miss?
If you know any information on the internet about how to work in Java with MQSeries through Spring (or maybe you know better way) then I would be very gratefull to you. |
|
Back to top |
|
 |
JLRowe |
Posted: Thu Jul 29, 2010 2:08 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
Spring only supports JMS and not the native MQ libs, look at the spring documentation (it's excellent) and the spring forums - I'm sure with a little time you will find the answer.
In the code you posted, the class does not extend a superclass, therefore the @Override annotation has no meaning. This is a java compilation error, nothing to do with spring. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 29, 2010 2:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What you missed more specifically is to implement the MessageListener interface.
Sun JMS Tutorial  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jul 29, 2010 2:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you have working Spring code that implements a JMS Message Driven Bean, then you should not have to change the code in any meaningful way to bind that against an MQ JMS Provider versus any other standard JMS Provider.
Unless in order to get it to work with your other JMS provider you had to do something provider specific. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|