|
From: Bill B. <bb...@re...> - 2008-10-08 20:16:54
|
We wouldn't need a ResourceExposingService. That is the Registry. I
see your point of the same class instantiated as different beans, but
having the same relative resource API.
Maybe something as simple as:
public class ResteasyRegistration
{
String getRootPath();
Object getTarget();
}
<bean name="MyBean" class="org.any.MyService"/>
<bean name="MyBean2" class="org.any.MyService"/>
Leave out the @Path annotation on the MyService class.
<bean name="registration" class="org.jboss.resteasy.ResteasyRegistration">
<property name="rootPath">/x/1</property>
<property name="target" ref="MyBean"/>
</bean>
<bean name="registration2" class="org.jboss.resteasy.ResteasyRegistration">
<property name="rootPath">/x/2</property>
<property name="target" ref="MyBean2"/>
</bean>
Then we just modify the Spring adapter to look for instances of
ResteasyRegistration.
Solomon Duskis wrote:
> 2) Having RestEasy configured purely in spring, including
> configuration/management of the Registry and Dispatcher in Spring - I'll
> fill in this idea in a future email.
>
I don't want to be dependent on any IoC container. There are a bunch
out there: Spring, Seam, Guice, JBoss MC, and even Java EE to some
degree. This is why I've focused on configuration via web.xml
context-params.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|