Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forcing a statefull session bean to passivate

 
Geoffrey Florentine
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to devise a simple test to make a statefull session bean passivate. I have created a bean that allocates a large amount of memory and a client creates a number of these beans. Trace code in the ejbActivate and ejbPassivate methods log when these methods are called.

However, all that happens is the client gets an out of memory exception wrapped in a remote exception.

I am using j2sdkee1.3.1

Thanks

Geoff
 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually i had tested passivation in 1.4 the other way...
in the server set the timeout to be something min(like 2 sec)
and in the client call a method of the bean. then have a for loop which does nothing but iterating to some huge number(make it larger than the timeout)
again call a method of the bean.
so when go check the log u can see it activated and passivated(have println in those methods in the bean).

I havent figured out how to configure the server in 1.3 but if u know that this logic might help.

Please update if you do it.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic