[
https://issues.apache.org/jira/browse/JCR-1869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephane Landelle updated JCR-1869:
-----------------------------------
Attachment: BeanLazyLoader.java
> Make lazy loading proxy callback Serializable
> ---------------------------------------------
>
> Key: JCR-1869
> URL: https://issues.apache.org/jira/browse/JCR-1869
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-ocm
> Reporter: Stephane Landelle
> Attachments: AbstractLazyLoader.java, BeanLazyLoader.java,
> CollectionLazyLoader.java
>
>
> Hello (probably Christophe :) ),
> It would be nice to have the CGLib callbacks Serializable, because if they're
> not, the proxies are not either, even if the target is.
> I've seen that you've made BeanLazyLoader Serializable. Wouldn't be better to
> have AbstractLazyLoader Serializable, so CollectionLazyLoader is too?
> What I've done is :
> *) declaring AbstractLazyLoader as Serializable
> *) declaring non-Serializable resources such as Session as volatile
> *) throwing an IllegalStateException in BeanLazyLoader.fetch and
> CollectionLazyLoader.fetch if the Session is null. This case can only happen
> if the proxy has been serialized without the volatile Session, and it doesn't
> make sense to lazy load the target then.
> BTW, I realized I didn't clean up the beanClassDescriptor in
> BeanLazyLoader.cleanUp, so I corrected this.
> I'll attach the modified classes.
> Sincerely,
> Stéphane Landelle
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.