-
1. Re: Cannot Passivate Stateful Session Bean
bill.burke Mar 30, 2005 9:29 AM (in response to guurk)Are you sure this is not a bug in your Stateful bean class?
* Is it Serializable?
* Do you have a non-transient field that is non-serializable?
I ask this because we do actually test this stuff... -
2. Re: Cannot Passivate Stateful Session Bean
guurk Mar 30, 2005 10:26 AM (in response to guurk)Oh, I'm sure I screwed up somewhere... never worry :P.
The question is more what I screwed up...
The only member variable is one for a reference to a single entity. And yes, that is serializable.
However, oddly that particular variable is still null when trying to passivate. So it shouldn't effect anything.
I've even put in @PrePassivate and @PostActivate to double check things... to no avail.
(A full code post is difficult since the code is on a non-internet connected network). -
3. Re: Cannot Passivate Stateful Session Bean
guurk Mar 30, 2005 10:36 AM (in response to guurk)Doh... my bad... just like I said.
I guess I should actually read your post ;).
My stateful is now serializable and works just fine...
It might however be a good idea to include that in the Stateful tutorial... just a thought.
Thanks. -
4. Re: Cannot Passivate Stateful Session Bean
bill.burke Mar 30, 2005 10:41 AM (in response to guurk)A good test is to add a method to your SFSB:
Particularly:
public void serializeMe() {
java.rmi.MarshalledObject mo = new MarshalledObject(this);
mo.get();
}
There could be a bug in our code...Do you ahve any services like UserTrasnaction, EntityManager, etc... as members of the SFSB class? -
5. Re: Cannot Passivate Stateful Session Bean
bill.burke Mar 30, 2005 10:52 AM (in response to guurk)"guurk" wrote:
It might however be a good idea to include that in the Stateful tutorial... just a thought.
Doh! I'm a *bleepin* idiot...Tutorial fixed...Apologies.