[seam-dev] Re: [Resteasy-developers] Seam and RESTEasy integration

Bill Burke bburke at redhat.com
Mon Jul 14 08:47:27 EDT 2008



Christian Bauer wrote:
> On Jul 13, 2008, at 19:36 , Ryan J. McDonough wrote:
> 
>>> 2. You can put @Name on your @Provider class. It has to be
>>> ScopeType.APPLICATION or ScopeType.STATELESS. For the STATELESS
>>> providers I need an extension to RESTEasy. I need to tell RESTEasy  
>>> how
>>> it should look up an instance of a Provider from Seam at runtime.
>>> Right now you guys only support setProvider(clazz) and
>>> setProviderInstance(o) at bootstrap. I need
>>> setProviderLookup(anImplementationOfALookupInterface) or something
>>> similar.
>> Can you open a JIRA issue on that and assign it me?
> 
> http://jira.jboss.com/jira/browse/RESTEASY-79
> 
> I need one other thing, maybe you have that as an API already:
> 
> When a request hits the SeamResourceServlet, the mapped path  
> (configurable in Seam though) is:
> 
> /seam/resource/rest/<whatever>
> 
> Unfortunately, that means you have to use this in your resources:
> 
> @Path("/seam/resource/rest/catalog/item/123")
> 
> It would be much nicer if users could skip the /seam/resource/rest  
> part of the path. I could use HttpServletRequestWrapper before passing  
> the call to dispatcher.invoke() and override all methods that return  
> the path. It would be much better if we could tell RESTEasy to map  
> @Path with a customizable base.
> 

The Dispatcher is driven off of UriInfo.  So, you need to build your own 
since it is specific to Seam.  Look in HttpServletDispatcher to see how 
it builds it, its pretty easy and the methods are already there.

FYI, you should be working off of trunk as we've have recently changed 
packaged names (to org.jboss.resteasy) and are refactoring continuously. 
  You will also want to take advantage of our interceptor model when we 
get it in.

Do you want SVN access? Just send me your sf.net id privately and I'll 
give it to you.


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com



More information about the seam-dev mailing list