• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Stateful session Bean

 
Deepak Gupta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Suppose ,I write a business method in satteful session bean in such a way that it never comes out from that business method( e.g. infinite while loop).
what will happen ,if the client timed out. How the container manage this kind of situation??
Can somebody tell me .
Deepak
 
Rajesh Pathak
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the actuall implementation of managing this situation is container specific.
However the end result, I think,is that the container will continue to execute the loop untill it reaches the timeout period. After that it will kill the bean instance. Whether the client logs out or not he will never get the result.
 
Deepak Gupta
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Actually, the actuall implementation of managing this situation is container specific.
However the end result, I think,is that the container will continue to execute the loop untill it reaches the timeout period. After that it will kill the bean instance. Whether the client logs out or not he will never get the result.

But I think ,According to the Session bean life cyle ,the bean cant be timed out if its invoking any business method.
So bean cant be timed out.
 
Lipman Li
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Deepak Gupta:
Hi ,

But I think ,According to the Session bean life cyle ,the bean cant be timed out if its invoking any business method.
So bean cant be timed out.

Gupta,
u r right.
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I though a bean could not be timed out when performing a "Transaction" but otherwise it will be released.
Most likely the app server has a timer on its bean execution thread. If that thread fails to return within the allotted time it will likely be killed. Then the bean trashed. an exception thrown. then start over.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's actually even more complicated than that. There will be a communications timeout on the client side as well, so what the client would see (when the communications timeout occurs) is a CORBA_COMPLETED_MAYBE error -- meaning that there is no way of finding out what really happened on the server.
Kyle
 
kelly smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Deepak
Are you from BVB ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!