-
1. Re: Application scoped component throws Serialization Except
norman.richards Jan 4, 2007 6:35 PM (in response to bluetrade)Mark the field as transient and catch the passivate/activate events to make sure your object is correctly initialized when it is loaded back into memory.
-
2. Re: Application scoped component throws Serialization Except
bluetrade Jan 5, 2007 5:08 PM (in response to bluetrade)thanks for your reply. Should I use the @Transient (i.e. for entities) or the java-transient ?
I am also accessing another EJB which should be initialized before a PostActivate annotated method is called - however, it seams as if my other bean is null at that point:
@In(create=true,value="configuration")
Configuration cconfig;
Thank you!
~joey -
3. Re: Application scoped component throws Serialization Except
bluetrade Jan 5, 2007 5:10 PM (in response to bluetrade)another question - is there any way to prevent my bean from being "swapped-out" - ?
~thanks joey -
4. Re: Application scoped component throws Serialization Except
norman.richards Jan 5, 2007 6:26 PM (in response to bluetrade)Java transient fields. It is possible that @Transient works on the fields, but I don't know.
You are right - injection doesn't seem to be happening during lifecycle methods. I believe it should, but it might be intentional. I'll have to look into it.
I am not that familiar with the jboss annotations to control bean pool sizes. I doubt there is an easy way to say "keep them all in memory". (which is fine because I really don't think that would be a very good policy)