No Valid ejbRemove Definitions in Message-Beans

This query determines all the message-beans that do not define a valid ejbRemove() method.

Pre-packaged Query

Query name="Semmle/StyleChecks/J2EE/Message-Bean/A message-bean must have a valid ejbRemove() method definition"

Reports all Message-Bean types that do not contain one ejbRemove() method that is public, not final and not static, takes no parameters, has return type void and throws no application exceptions.

from MessageBean mbean
where not exists(Method m | m.getName().matches("ejbRemove") and
mbean.inherits(m) and
m.hasModifier("public") and
not(m.hasModifier("final")) and
not(m.hasModifier("static")) and m.hasNoParams() and
m.getType().hasName("void") and not exists(Exception e |
m.getAnException() = e and
e.getType().fromSource())) select mbean, mbean.toString() + " message-bean must define an ejbRemove()" + " method that is public, not final, not static," + " has no arguments, has return type void and" + " throws no application exceptions"

References

Enterprise JavaBeans 2.1 - Specification, section 15.7.5

Digg!Reddit!Del.icio.us!Facebook!Slashdot!Technorati!StumbleUpon!Ma.gnolia!

Comments
Only registered users can write comments!
 
< Prev   Next >