You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Christophe Lombart (JIRA)" <ji...@apache.org> on 2008/11/26 21:16:44 UTC

[jira] Assigned: (JCR-1869) Make lazy loading proxy callback Serializable

     [ https://issues.apache.org/jira/browse/JCR-1869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart reassigned JCR-1869:
---------------------------------------

    Assignee: Christophe Lombart

> 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
>            Assignee: Christophe Lombart
>         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.