ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Trigger Java function with Spring on MQMessage

Post new topic  Reply to topic
 Trigger Java function with Spring on MQMessage « View previous topic :: View next topic » 
Author Message
Klimy
PostPosted: Fri Jul 09, 2010 6:37 am    Post subject: Trigger Java function with Spring on MQMessage Reply with quote

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
View user's profile Send private message
JLRowe
PostPosted: Thu Jul 29, 2010 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Jul 29, 2010 2:13 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jul 29, 2010 2:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Trigger Java function with Spring on MQMessage
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.