Which of the Spring integration options would be best, I do not know. 

But try this for your router:

<!--  Define the router -->
<bean name="router" class="org.restlet.e​xt.spring.SpringBean​Router">
<property name="attachments">
<map>
<entry key="/hello" ref="helloResource" />
</map>
</property>
</bean>

<bean id="helloResource" class="packagename.MyResource" scope="prototype" 
autowire="byName" />


I haven't tested this though. But my guess is that you should use 'ref' instead 
of 'value', since you are referencing another bean. My own xml is formatted 
like this:
<bean name="router" class="org.restlet.ext.spring.SpringRouter">
<property name="attachments">
<map>
<entry key="/hello">
<bean class="org.restlet.ext.spring.SpringFinder">
<lookup-method name="create" bean="helloResource" />
</bean>
</entry>
</map>
</property>
</bean>

<bean id="helloResource" class="packagename.MyResource" scope="prototype" 
autowire="byName" />

> I found this post:
> 
> http://comments.gmane.org/gmane.comp.java.restlet/9092
> 
> and the patch to use the custom SpringBeanRouter with that specified in the 
> thread works.
> 
> But, it seems like this should be fixed after 2.0, but I just tried it with 
> 2.1.4 and it still occurs there.
> 
> Would it be better not to use the SpringBeanRouter and use one of the other 
> Spring integration options?
> 
> Thanks,
> Eric

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

Reply via email to