Results 1 to 3 of 3

Thread: strange problem with BeanNameAutoProxyCreator

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Default strange problem with BeanNameAutoProxyCreator

    Hi at all.
    I have a strange problem with BeanNameAutoProxyCreator.
    My cfg file is:

    <bean id="com.bytecode.osw.interfaces.IObjectLocator" class=".."/>

    <bean id="oswBeanNameProxyCreator"
    class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames"><value>com.bytecode.osw.interface s.I*</value></property>
    <property name="interceptorNames">
    <list>
    <value>myInterceptor</value>
    </list>
    </property>
    </bean>

    But this doesn't work, but if I use:
    <property name="beanNames"><value>com.bytecode.osw.interface s.IObject*</value></property>

    it works!!!

    Can someone help me?

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    This is quite strange!!!
    What version are you using? could you show the log result?
    following method, from BeanNameAutoProxyCreator source returns true in both cases:
    Code:
      /**
       * Return if the given bean name matches the mapped name.
       * The default implementation checks for "xxx*" and "*xxx" matches.
       * Can be overridden in subclasses.
       * @param beanName the bean name to check
       * @param mappedName the name in the configured list of names
       * @return if the names match
       */
      protected boolean isMatch&#40;String beanName, String mappedName&#41; &#123;
        return &#40;mappedName.endsWith&#40;"*"&#41; && beanName.startsWith&#40;mappedName.substring&#40;0, mappedName.length&#40;&#41; - 1&#41;&#41;&#41; ||
            &#40;mappedName.startsWith&#40;"*"&#41; && beanName.endsWith&#40;mappedName.substring&#40;1, mappedName.length&#40;&#41;&#41;&#41;&#41;;
      &#125;
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

  3. #3
    Join Date
    Nov 2004
    Posts
    3

    Default

    I'm using 1.1.2 vesrion.

    Now I haven't the log , but spring simlply don't cretae a proxy and so the intreceptor
    does'nt fire.
    I have looked at source of isMatch too, and i really don't know why it doese't work.

Similar Threads

  1. Strange and bizarre jsp compilation problem:
    By Colin Yates in forum Web
    Replies: 1
    Last Post: Aug 19th, 2005, 06:08 AM
  2. pagination and continuation problem in SWF
    By yfmoan in forum Web Flow
    Replies: 6
    Last Post: Jun 29th, 2005, 03:42 AM
  3. really strange problem with session
    By a_wronski in forum Security
    Replies: 2
    Last Post: Jun 24th, 2005, 10:23 PM
  4. Strange problem setting a property
    By kdenehy in forum Container
    Replies: 8
    Last Post: Apr 28th, 2005, 09:16 PM
  5. Replies: 3
    Last Post: Jan 31st, 2005, 08:52 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
  •