• Post Reply Bookmark Topic Watch Topic
  • New Topic

synchronize or not  RSS feed

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imagin accessing EJB using jsp or jsf

is this accessing synchronize or asynchronize ?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure i understand the question. Are you asking about synchronous and asynchronous?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, i am asking we can call EJB method using Servlet.
If 1 minuts take to return the result does servlet wait till the EJB returns?
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If 1 minuts take to return the result does servlet wait till the EJB returns?


yes.
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in that duration servlet can't do anything.
so it it using synchronising .
Is it?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know synchronizing in Database.
it is same thing when we invoking EJB using Servlet?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samanthi perera wrote:i know synchronizing in Database.

What is synchronizing in database?

Samanthi perera wrote:
it is same thing when we invoking EJB using Servlet?


I thought ramprasad already answered this question. The call to the session bean is "synchronous" which means that the servlet cannot do anything till the bean method completes and the control returns back to the servlet. If you are using MDBs then it's a different thing. Or if you are using EJB3.1 which allows for @Asynchronous business methods then the servlet won't have to wait for the method to complete.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!