hello friends,

  i failed at writing a asynchorous jms receiver.

  This is the listener:

from javax.jms import MessageListener

class listener(MessageListener):
    def __init__(self):
        self.MessageNum = 0
    def onMessage(self,message):
        print message.getText() # i only send TextMessage                               MessageNum += 1

and my receiver is simple too:

  #jmsP2pReceiver.py 

  。。。。。。

   (for clearly, i omit the steps before such as creating connection, session,etc and be sure they are correct.) 

   listener = listener()

   receiver.messageListener = listener

   connection.start()

 i saved the program of receiver as a module named jmsP2pReceiver.py .

 after send a message, i execute the module in command line, there's no

errors, but the listener doesn't work either.

    thanks in advance

 regards

 lee 

   

 

 

 



Do You Yahoo!?
暑期大片齐聚雅虎通 网络摄像头+雅虎通调频收音机等你来拿