[jboss-user] [JBoss Seam] - concurrent access to SFSB using SEAM Remoting

zdaler do-not-reply at jboss.com
Fri Feb 23 10:55:21 EST 2007


We encountered a problem accessing a simple SFSB from a javascript call using seam remoting.

Concurrent js calls to a single conversational SFSB produces multiple instances of SFSB each being added to a newly created conversation context which is not what one would expect.

We reproduced it with a minor modification to the chatroom example.
We simply changed the sendMessage function (in ChatRoomAction.java) like this (adding a 10s delay to simulate a long process) :
public void sendMessage(String message) {
  |     publish( new ChatroomEvent("message", username, message) );
  |     try {
  |        Thread.sleep(10000) ;
  |     } catch (InterruptedException e) {
  |        e.printStackTrace();
  |     }
  | }
  | 
This breaks the chatroom example : repeated inputs lead to the creation of new "chatroomAction" SFSBs that don't hold the user object (and are located within new conversation contexts).

This is the ouput in the chatroom :
anonymous wrote : testuser connected.
  | testuser> a
  | null> a
  | testuser> a
  | null> a
  | 

Thanks for any help.

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021160



More information about the jboss-user mailing list