[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4247) Seam managed @Provider not registered

Matthew Bowman (JIRA) jira-events at lists.jboss.org
Tue Jun 16 05:58:56 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12472297#action_12472297 ] 

Matthew Bowman commented on JBSEAM-4247:
----------------------------------------

For my purposes, it's ok for my provider to not be a seam component.

The only thing I can think of off the top of my head would be to recurse the proxy chain to discover the generic type of the exception that is to be mapped.

Something like...

if (Proxy.isProxyClass(provider.getClass())) {
   // ... recurse ...
}

This is not the cleanest of things, and like I said, this is the only thing I can think of for the time being.

> Seam managed @Provider not registered
> -------------------------------------
>
>                 Key: JBSEAM-4247
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4247
>             Project: Seam
>          Issue Type: Bug
>          Components: WS
>    Affects Versions: 2.1.2.GA
>            Reporter: Matthew Bowman
>            Assignee: Christian Bauer
>         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