On Thu, Mar 25, 2010 at 9:42 AM, Raymond Feng <[email protected]> wrote:
> Hi,
>
> Do we really want to allow arbitrary SCA services to be exposed to be
> RESTful? REST (resource-oriented) is quite different from RPC
> (operation-oriented). IMO, the component has to be designed following the
> RESTful style where we might have a few different options:
>
> * Use an interface that is compatible with the Collection pattern
> * Use JAX-WS annotations to customize the mapping
>

I agree, in a way, that we don't want to try to mix REST with RPC as
they are two different approaches and should be used separately, as
appropriate. Having said that, there are scenarios where you are
really dealing with resource/collection type of things (e.g a
customer/user service) but your interface does not really follow the
Collection pattern (e.g getCustomerByName(String name) method compared
to get(Key name)) and then some sort of mapping needs to happen...
from this thread it seems that people are proposing two ways : when
possible use JAX-RS annotations, but when this is not possible, we
could use the operationSelector approach to try to do this mapping...
the problem is that either the operation selection configuration gets
very complicated, or we use some kind of convention over configuration
and expect some specific method signature as we do for the collection
interface. But, if the developer do have access to follow the
convention, then why not use the JAX-RS annotations :)

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to