[ http://jira.jboss.com/jira/browse/JBAS-1532?page=history ]
     
Adrian Brock closed JBAS-1532:
------------------------------

     Resolution: Done
    Fix Version:  JBossAS-4.0.2RC1

Fixed. It now looks for only onMessage(Message) and ignores 
other methods that might look similar in a misguided attempt
to try to point out what is wrong with the unrelated method.

> onMessage checking is not correct
> ---------------------------------
>
>          Key: JBAS-1532
>          URL: http://jira.jboss.com/jira/browse/JBAS-1532
>      Project: JBoss Application Server
>         Type: Bug
>   Components: JMS service
>     Versions: JBossAS-4.0.1 Final,  JBossAS-3.2.7 Final,  JBossAS-4.0.1 SP1
>     Reporter: Adrian Brock
>     Assignee: Adrian Brock
>      Fix For:  JBossAS-4.0.2RC1

>
>
> The checking of javax.jms.MessageListener.onMessage(javax.jms.Message) is not 
> correct.
> 1) It only applies to that interface
> 2) It shoud only check for methods of that extact name/signature
> The current code is wrong in at least the following ways:
> 1) It is checking any "onMessage" methods regardless of interface/signature
>          Iterator it = getOnMessageMethods(bean);
>          Method onMessage = (Method)it.next();
>          if (!isPublic(onMessage))
>          {
>             fireSpecViolationEvent(mdBean, onMessage, new 
> Section("15.7.4.b"));
>             status = false;
>          }
>          if ( (isFinal(onMessage)) || (isStatic(onMessage)) )
>          {
>             fireSpecViolationEvent(mdBean, onMessage, new 
> Section("15.7.4.c"));
>             status = false;
>          }
> etc.
> 2) The method of testing for onMessage is not correct:
>    /**
>     * Check if the given message is the onMessage() method
>     */
>    public boolean isOnMessageMethod( Method m )
>    {
>       return (m.getName().startsWith("onMessage"));
>    }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to