Hi, thanks for helping me on this topic!

But I'm not sure, if your suggestion would realy help me out, because the 
channelMessageCallback() method is not always called _before_ the page is 
refreshed. Actually in my scenario it is never called before the first refresh.

Imagine this timeline:
1) The page is rendered and the subscription takes place
2) The user hits a button on the page triggering some action method 
3) The page is re-rendered because of the action triggered in 2)
4) A JMS message is published on the topic ....

At point 3) a new subscription would have taken place ....

But I've noticed this Monday morning, that the exact same code produced a valid 
subscription AND token in the script at the bottom of the page [see code of 
posting Fri Oct 13, 2006 02:33 AM](after subscription). 

So I thought about a racing condition. After calling Seam.Remoting.subscribe() 
at the top of the page, your code is generating the token and is putting it 
into the SubscriptionRegistry. Simultaneously the page is rendered and the 
script at the bottom of the page is executed. If the token ends up in the 
registry before that point, everythings fine. But most of the times it won't!
I think I've confirmed the issue by delaying the script at the bottom of the 
page artificially.
setTimeout('fillTokenField();', 1000);

I'm not sure, if this is the best approach. Assumptions on "how long something 
usually takes" have a tendency to break code after a while. Is there another 
way of knowing, if the subscription is completely performed, hence the token is 
generated?

Thank you again for sticking with me,

   Kurt

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978454#3978454

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978454
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to