[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

Max Andersen (JIRA) jira-events at lists.jboss.org
Thu Nov 25 10:42:59 EST 2010


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

Max Andersen commented on JBIDE-7669:
-------------------------------------

Ok, after talking with Jaikirian on #jboss-dev

pmuir
but the question is "if an ejb has N interface with zero @Local then the complete sum of public methods is the business methods ?"
16:32
Jaikiran
in EJB3.1, yes
it's called the no-interface view which exposes all the public methods of a bean as the business methods
16:34
pmuir
thanks 
16:34
maxandersen
Jaikiran: so even if I have @Local on one of these interfaces I can still make method public on a session bean and it will still be considered a business method ?
16:35
Jaikiran
maxandersen: if a bean has an explicit @Local, then only those methods in the interface are exposed as business methods
16:35
maxandersen
okey. so if no @Local its the total sum of concrete class and its interfaces. If 1 or more @Local it is just the sum of interfaces with @Local on it ?
16:36
Jaikiran
in such cases (where you have a explicit @Local) and still want to expose all public methods (i.e. methods available on @Local intf and methods available on bean impl class), then you explicitly add a @LocalBean (which represents no-interface view)
16:36
frainone [~fla at redhat/jboss/frainone] entered the room.
mode (+v frainone) by ChanServ
16:36
maxandersen
darn - too much flexibility  but ok - got it.
16:36
Jaikiran
btw, this is just for EJB3.1
for ejb3.0, either a @Local or @Remote is mandatory

Resulting in (ordering matters):

If 0 interfaces:
quickfix for making method public.

If N interfaces no @Local:
For each interface Provide quickfix for adding method  (ordered by what comes first on list)
quickfix for making method public.

If N interfaces Y @Local's
For each interface with @Local Provide quickfix for adding method (ordered by what comes first on list)
[to be complete you could also offer to add @LocalBean to class + making method public]




> 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