Hi Infinity,

On Oct 5, 2009, at 10:03 AM, infinity wrote:

> I'm trying to setup a SpringBeanRouter as per the javadocs since I  
> cannot use
> SpringRouter if I use spring prototype beans for attachements acc to  
> this
> http://n2.nabble.com/Unable-to-inject-Protoype-beans-into-a-singleton-bean-via-value-ref-for-a-Spring-Router-td3756435.html#a3756435
> issue .
>
> Is there something wrong with the following configuration?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:util="http://www.springframework.org/schema/util";
>    xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>
>
>    <!-- Components -->
>    <bean name="component" id="component"
> class="org.restlet.ext.spring.SpringComponent">
>        <property name="clientsList">
>            <list>
>               <value>HTTP, HTTPS</value>
>            </list>
>         </property>
>        <property name="hosts">
>            <list>
>                <ref bean="virtualHost" />
>            </list>
>        </property>
>
>    </bean>
>
>    <!-- Virtual Hosts -->
>    <bean id="virtualHost" class="org.restlet.ext.spring.SpringHost">
>        <constructor-arg ref="component" />
>        <property name="attachments">
>            <map>
>                <entry key="/" value-ref="router" />
>            </map>
>        </property>
>    </bean>
>
>    <!-- Routers -->
>    <bean name="router"  
> class="org.restlet.ext.spring.SpringBeanRouter"/>
>
>    <!-- Resources -->
>     <bean name="/ws/contact/{operation}"
> class="com.xx.rest.resource.ContactData" scope="prototype"
> autowire="byName"/>
>    <bean name="/mock/1/data/Contact/{userId}"
> class="com.xxx.mock.resource.ContactData" scope="prototype"
> autowire="byName"/>
>
> The server loads fine but none of Server Resources are invoked.  
> There is no
> stacktrace either. Pl suggest.

What sort of server are you using?  How are you loading the beans from  
this context and attaching them to the server?

Rhett

>
> </beans>
> -- 
> View this message in context: 
> http://n2.nabble.com/Unable-to-setup-SpringBeanRouter-configure-tp3769405p3769405.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2403701

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2403785

Reply via email to