Re: onMessage() method only works localy
qiang zhou <qiangz_dlrmbj-/[email protected]>
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
If you running on web application (jsp or servlet), then you must keept doGet/doPost method on living.
//example on servlet.
protected void doGet() {
//create new JMS lisntern .and add into subscriber.
InvokedListener listner =......
subscriber.setListener(listener) ;
while(true) {
try {
if(....)
subscriber.setListener(null); //stop listening.
Thread.sleep(1000) //sleep 1 second.
} catch(Exception e) {}
}
}
----- Original Message ----
From: 杜娟 <dujuan-Lg/[email protected]>
To: openjms-user <[email protected]>
Sent: 2005年12月13日 10:17:58
Subject: [openjms-user] onMessage() method only works localy
hi,all
i have some problem in using openjms 0.7.7-alpha-1 and its http tunnel
i am running the client and server like this
client <-> router/firewall <-> internet<-> Server(tomcat and openjms server)
In client,i can send message and receive message using recieve() method successfully.
but if i use onMessage() to recieve the message ,it never awakes though i have send
messages.
Any advice would be much appreciated!
杜娟
dujuan-Lg/[email protected]
2005-12-13
NHY薜X'u[ê
蕈k㈣!W~楫zkC 濉m檗@^^zZfzj!x2㈥澧辨色,悍a{,H蛟4mi(辟堍ov'锃jYhr'庄:rX^9呵ēx%hラ爽zb槽,㈥y+檗mο+-彩.⒏+-躇b藏~瑗殂爽z
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click