Results 1 to 6 of 6

Thread: AutoProxyCreator, lookup-method and overloaded methods

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Amsterdam, The Netherlands
    Posts
    28

    Default 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. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Oct 2004
    Location
    Amsterdam, The Netherlands
    Posts
    28

    Default

    No, I'm overloading another method.

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

  4. #4
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    I'll look at it today. I've raised a JIRA issue: http://opensource.atlassian.com/proj...browse/SPR-391.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  5. #5
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    I've reproduced this in a test case, and am researching it further. I think it may be a CGLIB issue.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  6. #6
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Please attach any further comments to the issue in JIRA.

    Thanks,
    Rod
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Replies: 1
    Last Post: Jul 28th, 2005, 05:08 PM
  2. Factory method problem
    By virgo_ct in forum Container
    Replies: 3
    Last Post: Jul 13th, 2005, 06:47 AM
  3. Problem with static factory method constructors
    By halcyon in forum Container
    Replies: 1
    Last Post: Jun 24th, 2005, 05:39 PM
  4. Replies: 2
    Last Post: Jun 10th, 2005, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •