Just to be clear, then since it's static it won't be serialized and
this would solve your issue as well.

On Tue, Jul 5, 2011 at 9:17 AM, Stephen Johnson <[email protected]> wrote:
> Again, I'm not sure why your Loggers are instance variables, but I
> just make mine a final static variable of that class
>
>        private static final Logger log = 
> Logger.getLogger(Whatever.class.getName());
>
>
> On Tue, Jul 5, 2011 at 8:59 AM, Stephen Johnson <[email protected]> 
> wrote:
>> Awesome! Glad I could be of some help. I'm not sure about your
>> particular situation but serializing the loggers doesn't seem like it
>> may be what you want to do but who am I to say. Alternatively you can
>> mark those fields as transient and then they won't be serialized. You
>> can then add your own readObject() and writeObject() methods to the
>> class to re-add the java.util.Logger objects when you're classes are
>> deserialized.
>> Stephen
>>
>> On Tue, Jul 5, 2011 at 3:32 AM, David Donohue <[email protected]> wrote:
>>> Stephen,
>>> Yes!  This seems to be the issue.  This is a key insight - I am adding
>>> testing of object serialization to all my JUnit testing code, for my
>>> GAE app.
>>>
>>> Specifically the problem is with java.util.logging.Logger, which I
>>> inject all over the place using Guice. The object I am serializing
>>> contains multiple other objects of mine.  Each object has its own
>>> Logger.  So I suppose the workaround will be to replace each
>>> java.util.logging.Logger with my own, serializable logger?
>>> Best,
>>> Dave Donohue
>>>
>>> On Mon, Jul 4, 2011 at 6:29 PM, Stephen Johnson <[email protected]> 
>>> wrote:
>>>> Also, make sure that anything referenced by anything that is put in to
>>>> session is also serializable or otherwise marked as transient as
>>>> necessary.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Google App Engine" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to 
>>> [email protected].
>>> For more options, visit this group at 
>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to