• 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

Setting stateful session ejb timeout?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application that is implemented as a stateful session ejb. My HTML-based UI is implemented as a set of java classes, servlets and JSPs. I have set the timeout for the HTTP session to be 1 hour via the web.xml deployment descriptor. However, I am experiencing the situation where after 30 minutes of no activity the HTTP session is still active but my stateful session ejb has disappeared.

I've done some research and have found that idle ejb instances are first passivated and then cleaned up after so much time.

My question is...is there a way configure WebLogic (or a specific application) so that idle *stateful* session ejbs are never cleaned up? If not possible, how about based on time?

Thanks!
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things. The first is that when a J2EE container takes a stateful EJB out it calls ejbPassivate(). You should be making sure that you save state at that time and can restore it later.

However, you may also want to look at the docs for weblogic-ejb-jar.xml, specfically the section on controlling the timeouts of stateful session beans.
reply
    Bookmark Topic Watch Topic
  • New Topic