Checks for J2EE coding problems |
![]() |
EntityBeanDescriptionChecks that a direct entity bean, i.e. a class that directly implements javax.ejb.EntityBean, satisfies these class requirements:
Checks that methods of a direct entity bean satisfy these requirements:
When the check is configured to check direct entity beans as having bean-managed persistence, checks that methods satisfy these additional requirements:
When the check is configured to check direct entity beans as having container-managed persistence, checks that methods satisfy these additional requirements:
Properties
Reference: Enterprise JavaBeans™ Specification,Version 2.0, sections 10.6 and 12.2. ExampleTo configure the check:
<module name="j2ee.EntityBean"/>
To configure the check to apply the container policy to direct entity beans:
<module name="j2ee.EntityBean">
<property name="persistence" value="container"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleFinalStaticDescriptionChecks that all static fields are declared final. Rational: This check ensures consistent runtime semantics so that EJB containers have the flexibility to distribute instances across multiple JVMs. Reference: Programming restrictions on EJB. ExampleTo configure the check:
<module name="j2ee.FinalStatic"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleLocalHomeInterfaceDescriptionChecks that a direct local home interface, i.e. an interface that directly extends javax.ejb.EJBLocalHome, satisfies these requirements:
Reference: Enterprise JavaBeansTM Specification,Version 2.0, sections 6.4 and 9.6. ExampleTo configure the check:
<module name="j2ee.LocalHomeInterface"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleLocalInterfaceDescriptionChecks that a direct local interface, i.e. an interface that directly extends javax.ejb.EJBLocalObject, satisfies these requirements:
Reference: Enterprise JavaBeansTM Specification,Version 2.0, section 9.10. ExampleTo configure the check:
<module name="j2ee.LocalInterface"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleMessageBeanDescriptionChecks that a direct message bean, i.e. a class that directly implements javax.ejb.MessageDrivenBean and javax.jms.MessageListener, satisfies these class requirements:
Reference: Enterprise JavaBeans™ Specification,Version 2.0, section 15.7. ExampleTo configure the check:
<module name="j2ee.MessageBean"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleRemoteHomeInterfaceDescriptionChecks that a direct remote home interface, i.e. an interface that directly extends javax.ejb.EJBHome, satisfies these requirements:
Reference: Enterprise JavaBeansTM Specification,Version 2.0, sections 6.3 and 9.5. ExampleTo configure the check:
<module name="j2ee.RemoteHomeInterface"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleRemoteInterfaceDescriptionChecks that a direct remote interface, i.e. an interface that directly extends javax.ejb.EJBObject, satisfies these requirements:
Reference: Enterprise JavaBeansTM Specification,Version 2.0, section 9.9. ExampleTo configure the check:
<module name="j2ee.RemoteInterface"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleSessionBeanDescriptionChecks that a direct session bean, i.e. a class that directly implements javax.ejb.SessionBean, satisfies these class requirements:
Reference: Enterprise JavaBeans™ Specification,Version 2.0, section 7.10. ExampleTo configure the check:
<module name="j2ee.SessionBean"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleThisParameterDescriptionChecks that this is not a parameter of any method calls or constructors for a bean. Instead, you must use the result of the getEJBObject() available in SessionContext or EntityContext. Reference: Programming restrictions on EJB. ExampleTo configure the check:
<module name="j2ee.ThisParameter"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent ModuleThisReturnDescriptionChecks that this is not returned by a bean method. Instead, you must use the result of the getEJBObject() available in SessionContext or EntityContext. Reference: Programming restrictions on EJB. ExampleTo configure the check:
<module name="j2ee.ThisReturn"/>
Packagecom.puppycrawl.tools.checkstyle.checks.j2ee Parent Module |
Copyright © 2002-2003 Oliver Burn. All rights Reserved.