• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Same method on the server called by two clients simultaneously

 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same method on the server called by two clients simultaneously, will these two calls executes in 2 different thread and cause problems potentially?
I am now working on a project in which each client has a java client app on their local machine and they use the client app talk to the same server.
Client1 use create() method so he can get a reference of Bean1 on the server.
Client2 use create() method so he can get a reference of Bean1 on the server.
I didn't see there is any special code to keep only one Bean1 instance on the server side. So, I think each client has a reference to a different Bean1 object, right?
If each of them has a reference of Bean1 object on the server side, and they call a method called M1() simultaniously, it is possible that M1() of each Bean1 object execute in two thread on the server, right?
Thanks a lot,
Ziyang
 
Henry Wong
author
Marshal
Pie
Posts: 21427
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It's an implementation detail of your server. Or the service that you are using.

Without knowing what app/web server you are using, how you are calling the service, and how the service is written, we can't tell you what is happening... certainly not at the level of whether a client is accessing a particular reference to a bean or not.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic