Announcement Announcement Module
Collapse
No announcement yet.
AutoProxyCreator, lookup-method and overloaded methods Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AutoProxyCreator, lookup-method and overloaded methods

    I have a class that has a overloaded method. This class is cglib proxied by AutoProxyCreator so it participates in Hibernate transactions.

    In the bean tag I define a lookup method:
    Code:
    <lookup-method name="createPage" bean="page"/>
    On startup a java.lang.ClassFormatException is thrown with the message:
    Code:
    Repetitive method name/signature in class file &#123;...&#125;$$EnhancerByCGLIB$$fd52ded2$$EnhancerByCGLIB$$25b980a8
    The lookup method process works fine in other proxied beans. The only difference I've been able to find is the overloaded message.

    If I don't proxy the bean, the lookup-method works to.

    Is using overloaded methods in this setup not supported? Am I missing something?

  • #2
    Do you overload the lookup method itself, or another method? Overloading the lookup method is not supported: the assumption is that there is one no-arg method with that name. It would be possible to change this, but it would make the implementation more complex and their might be a performance cost. If there's an issue with other overloaded methods, it's a bug and I'll try to address it.

    Comment


    • #3
      No, I'm overloading another method.

      The method I'm trying to reimplement with Spring is a single no-argument method.

      Comment


      • #4
        I'll look at it today. I've raised a JIRA issue: http://opensource.atlassian.com/proj...browse/SPR-391.

        Comment


        • #5
          I've reproduced this in a test case, and am researching it further. I think it may be a CGLIB issue.

          Comment


          • #6
            Please attach any further comments to the issue in JIRA.

            Thanks,
            Rod

            Comment

            Working...
            X