You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Sebastian Gomez (JIRA)" <ji...@apache.org> on 2008/01/28 19:53:35 UTC
[jira] Commented: (JCR-876) ManageableCollectionUtil should not
throw "unsupported" JcrMapping exception
[ https://issues.apache.org/jira/browse/JCR-876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563246#action_12563246 ]
Sebastian Gomez commented on JCR-876:
-------------------------------------
Hi.
You face the same problem as I did. After using my patch it seems to work. It's attatched to my issue, in case you want to use it:
https://issues.apache.org/jira/browse/JCR-1325
> ManageableCollectionUtil should not throw "unsupported" JcrMapping exception
> ----------------------------------------------------------------------------
>
> Key: JCR-876
> URL: https://issues.apache.org/jira/browse/JCR-876
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-ocm
> Environment: All
> Reporter: Dan Connelly
>
> Many times, the object model'd code cannot be altered for ocm.
> To avoid the "unsupported" exception in almost all such cases, use a delegating wrapper class to encapsulate a Collection. The wrapper class implements MaangeableCollection.
> Since delegation is a performance hit, make the test below the last resort for *object* conversion in the method:
> public static ManageableCollection getManageableCollection(Object object)
> Proposed "catchall" test and program action:
> if (object instanceof Collection) {
> return new ManageableCollectionImpl((Collection)object);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.