> What I found out is that "public void initServices(ControlBean bean,
> Object target)" in the generated ImplInitializer has all the dependency
> injection done properly : Context , ResourceContext , etc.
> While for "public void resetServices(ControlBean bean, Object target)" ,
> only the context was getting reset to null.
> I think this is the reason why I observed the attempts to serialize a
> ResourceContextImpl - since the field was not getting reset to null.
> So , this would mean that we would typically need to reset all resource
> we injected in initServices while executing resetServices.
> Please correct me if my understanding is wrong.

Nope, your understanding is right, and service initialization and
reset in generated ImplInitializer classes should be symmetrical.  
This sounds like a codegen bug, but there is a checkin test
(BaseContextImpl.jcs) that covers this area and it seems to be
generating properly, so there may be something more specific to your
Impl that is triggering it.

Please open a JIRA issue on this and attach the code-generated
ImplInitializer.java file and  at least a code-fragment that shows
your @Context declarations.

Thanks!

-- Kyle

Reply via email to