• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Stateful session Bean

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Deepak
Are you from BVB ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic