You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2011/06/02 05:13:47 UTC

[jira] [Created] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

check for non-proxyiable methods should exclude synthetic methods
-----------------------------------------------------------------

                 Key: OWB-579
                 URL: https://issues.apache.org/jira/browse/OWB-579
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.1.1
            Reporter: David Jencks
            Assignee: David Jencks


Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042957#comment-13042957 ] 

Joe Bergmark commented on OWB-579:
----------------------------------

This appears to contradict section 5.5.1 of the specification.  It explicitly says that classes with final methods can not be proxied and that this should be treated as a deployment error.

My gut feel is we should leave the spec behavior as the default, and then provide some way to opt-out when it makes sense.

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044626#comment-13044626 ] 

David Jencks commented on OWB-579:
----------------------------------

I found a lot more instances where synthetic fields and methods were breaking the tck.  I've excluded them from consideration in rev 1132497.

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043233#comment-13043233 ] 

David Jencks commented on OWB-579:
----------------------------------

revert the change in rev  1130915, cf ARIES-668 where I change aries to not mark the methods as final

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043065#comment-13043065 ] 

Mark Struberg commented on OWB-579:
-----------------------------------

4096 is Modifier.SYNTHETIC and as such fine for not being proxied. Question is how those synthetic methods will get called from inside aries?
Because those methods are not available via the proxy...

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043021#comment-13043021 ] 

Joe Bergmark commented on OWB-579:
----------------------------------

The second check you added ((modifier & 4096) == 0); is a check for the synthetic attribute?  The idea being that no one is ever going to try calling a synthetic method on the proxy object?



> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043422#comment-13043422 ] 

Kevan Miller commented on OWB-579:
----------------------------------

There were some comments/questions about why Aries should be marking their methods final. Their motivation seems to have been performance. I asked around to see if there was any truth in this. I got the following response from Derek Inglis, who works on IBM's JIT:

{quote}
Marking methods final does give JIT performance improvements for IBM JVM and Oracle's JVMs.   Having said that much of the JIT work over the years has been to decrease the overhead associated with nonfinal methods, such that the advantage of final has decreased.   In summary, I would encourage using final on methods, however the advantage for a small number of methods, isn't big enough to worry about if avoiding final for those methods solves other issues.
{quote}

Personally, I think OWB should ignore synthetic, final methods. I also think Aries should not create them... 



> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043009#comment-13043009 ] 

David Jencks commented on OWB-579:
----------------------------------

The original user supplied class doesn't have final methods, and AFAICT nether the jdk proxies nor javassist nor openjpa enhancement have any problems with these added synthetic methods.  I would like to see a scenario where this (modified) check causes a problem before changing it.

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052279#comment-13052279 ] 

David Jencks commented on OWB-579:
----------------------------------

rev 1137824 fixes two interceptor method checks and a decorator method check.  I think this brings the "with aries proxies" code to the same tck conformance as the "without aries proxies" version.

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044159#comment-13044159 ] 

David Jencks commented on OWB-579:
----------------------------------

After some more input from the aries folks I've reimplemented excluding synthetic and bridge methods from the proxyable evaluation, rev 1131301, using the method.isSynthetic() and method.isBridge() methods. 

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (OWB-579) check for non-proxyiable methods should exclude synthetic methods

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks resolved OWB-579.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.1

rev 1130394 also mentions the final methods that can't be proxied.

> check for non-proxyiable methods should exclude synthetic methods
> -----------------------------------------------------------------
>
>                 Key: OWB-579
>                 URL: https://issues.apache.org/jira/browse/OWB-579
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 1.1.1
>
>
> Aries trunk has some weaving code that adds some final synthetic methods to just about every class.  AFAICT javassist can still proxy these classes but OWB check for proxiablility fails.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira