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

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

And last question. Imagine a following code fragment, which is used by client:



public class MyBusinessDelegate {

  MySessionFacadeHome facadeHome;

  MySessionFacade facade;

  String user_name;

  String user_pass;

  private void MyBusinessDelegate() {

     // All required actions for correct initialization facadeHome and facade  as 
described 

  } 

  public void login() {

    // All required actions to login as described above discussion

 }

 

  public void method() {

      facade.method();

  }



}



In multi-user, multi-thread environment (servlet):

1) User A creates a new instance of MyBusinessDelegate class;

   MyBusinessDelegate InstA = new MyBusinessDelegate();

2) User B creates a new instance of MyBusinessDelegate class;

   MyBusinessDelegate InstB = new MyBusinessDelegate();

3) User A call login();

4) User B call login();

5) User A call method();

In step 5 User A call method() as user B.



Does it mean than login() and method() should be syncronized?

Any ideas?












-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to