Jsr181HandlerMapping: Trying to map handler to already mapped url causes spring 
exception
-----------------------------------------------------------------------------------------

                 Key: XFIRE-1108
                 URL: http://jira.codehaus.org/browse/XFIRE-1108
             Project: XFire
          Issue Type: Bug
          Components: Spring
    Affects Versions: 1.2.6
            Reporter: Maxim Shovtuk
            Assignee: Dan Diephouse


When I tried to setup a proxy interface to my service implementation I got an 
exception saying that handler already mapped to the url.

Spring bean settings:

    <bean id="userManager" class="com.mycompany.service.impl.UserManagerImpl">
        <property name="userDao" ref="userDao"/>
        <property name="authenticationProvider" 
ref="daoAuthenticationProvider"/>
    </bean>
    <bean id="userService" 
class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces" 
value="com.mycompany.service.UserService"/>
        <property name="target" ref="userManager"/>
    </bean>

if  I define bean 'userManager' inside property 'target', no exception throwed:

    <bean id="userService" 
class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces" 
value="com.mycompany.service.UserService"/>
        <property name="target">
            <bean id="userManager" 
class="com.mycompany.service.impl.UserManagerImpl">
                <property name="userDao" ref="userDao"/>
                <property name="authenticationProvider" 
ref="daoAuthenticationProvider"/>
            </bean>
        </property>
    </bean>

But I have to use both 'userManager' and 'userService' within my application.


Suggested solution is add the following line to the 'customizeService' method:

        protected void customizeService(Object bean, Service endpoint) {
            if 
(xFire.getServiceRegistry().hasService(endpoint.getSimpleName())) return;

            // here goes unchanged content ...
        }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to