This content has been marked as final.
Show 4 replies
-
1. Re: Logger in page-scoped component, NPE in post-back.
gavin.king Nov 12, 2006 11:25 PM (in response to tazo)Right, you should not declare the Log field transient, it is injected at bean instantiation time, logging has nothing to do with Seam bijection!
-
2. Re: Logger in page-scoped component, NPE in post-back.
tazo Nov 13, 2006 5:28 AM (in response to tazo)Sory for my bad explanation, i will try again:
1. @Logger inserts instance of org.jboss.seam.log.LogImpl in a field of my component (lets name it 'mylog', not marked as transient)
2. LogImpl class has field log marked as transient.
3. After postback, 'myname' is restored, but it's LogImpl.log field does not restored: i see null in my debug window. -
3. Re: Logger in page-scoped component, NPE in post-back.
tazo Nov 13, 2006 5:33 AM (in response to tazo)So i looked at implementation of LogImpl class: log field is initialized in ctors and readObject. Nor ctors, nor readObject() are called in postback, i think it is bug.
-
4. Re: Logger in page-scoped component, NPE in post-back.
gavin.king Nov 13, 2006 1:04 PM (in response to tazo)LogImpl has the following method:
void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); log = LogFactory.getLog(category); }
Are you trying to tell me that Java serialization is broken?