[jboss-jira] [JBoss JIRA] Commented: (AS7-1380) EJB component annotation scanning deployers should ignore component declaring annotations on interfaces

Abhijit Sarkar (JIRA) jira-events at lists.jboss.org
Fri Jul 22 09:23:24 EDT 2011


    [ https://issues.jboss.org/browse/AS7-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615910#comment-12615910 ] 

Abhijit Sarkar commented on AS7-1380:
-------------------------------------

I do not agree that @Stateless shouldn't be applied to an interface. The annotation target allows for interfaces and there is nothing in the spec preventing that. On the contrary, there are available examples which annotate similarly. JBoss AS should not warn the user against doing that. It may just ignore the annotation if present on an interface.

> EJB component annotation scanning deployers should ignore component declaring annotations on interfaces
> -------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-1380
>                 URL: https://issues.jboss.org/browse/AS7-1380
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EE
>    Affects Versions: 7.0.0.Final
>            Reporter: jaikiran pai
>            Assignee: jaikiran pai
>
> Consider this interface:
> {code}
> @Stateless
> public interface IAmAnInterface {
> ..
> {code}
> We should not be picking up this interface as a component. We should only pickup these annotations from a class. We can just log a WARN about this incorrect annotation and skip its processing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list