ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Gmeiner (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-595) IllegalAccessException if a default-method is called in Lazy-Loaded Proxy objects
Date Tue, 19 May 2009 06:16:45 GMT

    [ https://issues.apache.org/jira/browse/IBATIS-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710629#action_12710629

Stefan Gmeiner commented on IBATIS-595:

Yes, I forgot to add the test in the patch. I attached it now as lazy-loader-test.patch.

> IllegalAccessException if a default-method is called in Lazy-Loaded Proxy objects
> ---------------------------------------------------------------------------------
>                 Key: IBATIS-595
>                 URL: https://issues.apache.org/jira/browse/IBATIS-595
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.3.4
>            Reporter: Stefan Gmeiner
>             Fix For: 2.3.5
>         Attachments: lazy-loader-test.patch, lazy-loader.patch
> We are using the iBatis enhanced (cglib) proxy for lazy loading our bean
> references.  One of these returned-proxied object is accessing a
> default-modifier method of another class in the same package. The code compiles
> without error but running it throws an IllegalAccessException thrown from the
> CGLIB-Proxy as it tries to invoke a non-public (default or protected) method
> from a different package.
> I wrote a test case for this problem (see attached patch).
> There is a solution (at least for default-modifier methods) for this problem
> using cglib LazyLoader callbacks. This is a replacement for the invocation handler
> which also has the advantage of increasing the performance of proxied objects
> as no methods are intercepted. This solution is contained in the attached
> patch. Unfortunately cglib handles protected methods differently to default so
> this solutions does not work with protected method calls.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message