[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-4247) Remove Seam component support for JAX RS providers

Christian Bauer (JIRA) jira-events at lists.jboss.org
Mon Oct 12 13:37:18 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Bauer closed JBSEAM-4247.
-----------------------------------

    Fix Version/s: 2.2.1.CR1
       Resolution: Done


Removed the support for JAX RS providers as Seam components, and documented the limitation. There are two possible clean solutions for a future version of Seam:

- enhance RESTEasy with a metadata SPI for registration of a Provider instance/type/factory, to avoid scanning of the supplied instance (in other words, instead of scanning the supplied class for interfaces and annotations, RE would use the metadata supplied externally by Seam bootstrap)

- if RE can or is not improved with this SPI, write a custom ResteasyProviderFactory instance (this is not ideal because a lot of RE code would have to be duplicated in Seam)

Note that not all kinds of providers are affected. For example, MessageBodyReader/Writer would be fine as Seam components, because these are not scanned by RE, their API actually has a isWritable()/isReadable() method that is used to detect metadata about the provider. ExceptionMapper on the other hand can not be supported because the parameterized type of the instance has to be scanned. 

So a third alternative would be enabling support for Seam component providers again but documenting and logging a WARN for unsupported providers such as ExceptionMappers. If there are strong reactions against removing this support with the candidate releases of 2.2.1, we can go that route for 2.2.1 GA and put it back in.






> Remove Seam component support for JAX RS providers
> --------------------------------------------------
>
>                 Key: JBSEAM-4247
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4247
>             Project: Seam
>          Issue Type: Task
>          Components: WS
>    Affects Versions: 2.1.2.GA
>            Reporter: Matthew Bowman
>            Assignee: Christian Bauer
>             Fix For: 2.2.1.CR1
>
>         Attachments: resteasy-debug.log
>
>
> Example:
> @Name("serviceExceptionMapper")
> @Scope(ScopeType.APPLICATION)
> @Provider
> public class ServiceExceptionMapper implements ExceptionMapper<ServiceException> {
>   public Resposne toResponse(ServiceException ex) {
>     return Response.noContent().build();
>   }
> }
> This custom ExceptionMapper provider will not be registered with ResteasyProviderFactory. If I remove the @Name + @Scope annotations, the provider is registered.
>    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list