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
posted 11 years ago
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.