[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-7669) Quick fix for "Non-static method <method>() of a session bean class <class> is annotated @Produces, and the method is not a business method of the session bean [JSR-299 §3.3.2]" error marker

Daniel Azarov (JIRA) jira-events at lists.jboss.org
Thu Nov 25 08:52:59 EST 2010


    [ https://jira.jboss.org/browse/JBIDE-7669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565374#comment-12565374 ] 

Daniel Azarov commented on JBIDE-7669:
--------------------------------------

How we can make the method a business method of EJB:

1. If we have class which does not implement any interfaces

We should convert method to public, not static, not final, not starts with "ejb"

2. If we have class which implements one interface:

We should do the same as in 1. and add this method to interface

3. If we have class which implements many interfaces:

We should do the same as in 1. and we should add this method to first interface which annotated by @Local or @Remote


But what should we do if there are no interfaces annotated by @Local or @Remote?
Should we add annotation to interface? Which one?

> Quick fix for "Non-static method <method>() of a session bean class <class> is annotated @Produces, and the method is not a business method of the session bean [JSR-299 §3.3.2]" error marker
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-7669
>                 URL: https://jira.jboss.org/browse/JBIDE-7669
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: cdi (jsr-299)
>            Reporter: Daniel Azarov
>            Assignee: Daniel Azarov
>              Labels: new_and_noteworthy
>             Fix For: 3.3.x
>
>
> This quick fix should offer to delete @Produces annotation

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

       



More information about the jbosstools-issues mailing list