Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 253d50e0122b162d839c0c787af1f0d6 > files > 13

checkstyle-manual-4.4-0.0.1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!-- Content Stylesheet for Site -->

    
    

    
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />

                          <meta name="author" content="Checkstyle Development Team">
            <meta name="email" content="$au.getAttributeValue("email")">
    
    
            
        
    <title>Checkstyle - J2EE Checks</title>

    <style type="text/css" media="all">
      @import url("./css/cs-layout.css");
      @import url("./css/cs-style.css");
    </style>
  </head>

  <body>
    <div class="csTopBar">
      <div class="csTopBarContents">
        <div class="csLeft">
          <h1>J2EE Checks</h1>
        </div>
        <div class="csRight">
          <a href="http://checkstyle.sourceforge.net/">
            <img src="images/logo.png" alt="Checkstyle Logo" height="70"/>
          </a>
        </div>
      </div>
    </div>


    <div class="csMiddleContainer">
      <div class="csLeftBar">
        <div class="csLeftBarContents">
            <!-- ============================================================ -->
  <!-- start makeNavigationBar -->
  
  <ul>
          <li>
        <strong>About</strong>
      </li>
                        <li>    <a href="./index.html">Checkstyle</a>
</li>
                    
  
          <li>
        <strong>Documentation</strong>
      </li>
                        <li>    <a href="./releasenotes.html">Release Notes</a>
</li>
                    
                  <li>    <a href="./config.html">Configuration</a>
</li>
                                    <li>    <a href="./property_types.html">&nbsp;&nbsp;&nbsp;Property Types</a>
</li>
                    
  
                  <li>    <a href="./running.html">Running</a>
</li>
                                    <li>    <a href="./anttask.html">&nbsp;&nbsp;&nbsp;Ant Task</a>
</li>
                    
                  <li>    <a href="./cmdline.html">&nbsp;&nbsp;&nbsp;Command Line</a>
</li>
                    
  
                  <li>    <a href="./availablechecks.html">Available Checks</a>
</li>
                    
                  <li>    <a href="./checks.html">Standard Checks</a>
</li>
                                    <li>    <a href="./config_javadoc.html">&nbsp;&nbsp;&nbsp;Javadoc Comments</a>
</li>
                    
                  <li>    <a href="./config_naming.html">&nbsp;&nbsp;&nbsp;Naming Conventions</a>
</li>
                    
                  <li>    <a href="./config_header.html">&nbsp;&nbsp;&nbsp;Headers</a>
</li>
                    
                  <li>    <a href="./config_imports.html">&nbsp;&nbsp;&nbsp;Imports</a>
</li>
                    
                  <li>    <a href="./config_sizes.html">&nbsp;&nbsp;&nbsp;Size Violations</a>
</li>
                    
                  <li>    <a href="./config_whitespace.html">&nbsp;&nbsp;&nbsp;Whitespace</a>
</li>
                    
                  <li>    <a href="./config_modifier.html">&nbsp;&nbsp;&nbsp;Modifiers</a>
</li>
                    
                  <li>    <a href="./config_blocks.html">&nbsp;&nbsp;&nbsp;Block Checks</a>
</li>
                    
                  <li>    <a href="./config_coding.html">&nbsp;&nbsp;&nbsp;Coding</a>
</li>
                    
                  <li>    <a href="./config_design.html">&nbsp;&nbsp;&nbsp;Class Design</a>
</li>
                    
                  <li>    <a href="./config_duplicates.html">&nbsp;&nbsp;&nbsp;Duplicate Code</a>
</li>
                    
                  <li>    <a href="./config_metrics.html">&nbsp;&nbsp;&nbsp;Metrics</a>
</li>
                    
                  <li>    <a href="./config_misc.html">&nbsp;&nbsp;&nbsp;Miscellaneous</a>
</li>
                    
  
                  <li>    <a href="./optional.html">Optional Checks</a>
</li>
                                    <li><b>    <a href="./config_j2ee.html">&nbsp;&nbsp;&nbsp;J2EE Checks</a>
</b></li>
                                                      <li><a href="#EntityBean">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityBean</a></li>
                                                        <li><a href="#FinalStatic">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FinalStatic</a></li>
                                                        <li><a href="#LocalHomeInterface">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalHomeInterface</a></li>
                                                        <li><a href="#LocalInterface">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalInterface</a></li>
                                                        <li><a href="#MessageBean">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MessageBean</a></li>
                                                        <li><a href="#RemoteHomeInterface">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoteHomeInterface</a></li>
                                                        <li><a href="#RemoteInterface">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoteInterface</a></li>
                                                        <li><a href="#SessionBean">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SessionBean</a></li>
                                                        <li><a href="#ThisParameter">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ThisParameter</a></li>
                                                        <li><a href="#ThisReturn">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ThisReturn</a></li>
                                      
  
                  <li>    <a href="./extending.html">Extending Checkstyle</a>
</li>
                                    <li>    <a href="./writingchecks.html">&nbsp;&nbsp;&nbsp;Writing checks</a>
</li>
                    
                  <li>    <a href="./writingfilters.html">&nbsp;&nbsp;&nbsp;Writing filters</a>
</li>
                    
                  <li>    <a href="./writinglisteners.html">&nbsp;&nbsp;&nbsp;Writing listeners</a>
</li>
                    
  
                  <li>    <a href="./api/index.html">Javadoc</a>
</li>
                    
  
          <li>
        <strong>SourceForge</strong>
      </li>
                        <li>    <a href="http://sourceforge.net/mail/?group_id=29721">Mailing Lists</a>
</li>
                    
                  <li>    <a href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse">Bug Database</a>
</li>
                    
                  <li>    <a href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse">Feature Requests</a>
</li>
                    
  
          <li>
        <strong>Developers</strong>
      </li>
                        <li>    <a href="http://sourceforge.net/projects/checkstyle">Project Page</a>
</li>
                    
                  <li>    <a href="http://checkstyle.svn.sourceforge.net/viewvc/checkstyle/">SVN Repository</a>
</li>
                    
                  <li>    <a href="./contributing.html">Contributing</a>
</li>
                    
  
      </ul>

  <ul>
    <li>
      <strong>Hosted by:</strong>
      <div align="center">
        <p><a href="http://sourceforge.net">
        <img src="http://sourceforge.net/sflogo.php?group_id=29721&amp;type=1" width="88" height="31" alt="SourceForge Logo"/></a>
         </p>
       </div>
    </li>
  </ul>

  <!-- end makeNavigationBar -->
  <!-- ============================================================ -->
        </div>
      </div>

      <div class="csMain">
                          <a id="EntityBean"></a>
  <h2>EntityBean</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct entity bean, i.e. a class that directly
          implements <span class="code">javax.ejb.EntityBean</span>,
          satisfies these class requirements:
        </p>
                                                <ul>
          <li>
            The class is defined as <span class="code">public</span>.
          </li>
          <li>
            The class cannot be defined as <span class="code">final</span>.
          </li>
          <li>
            It contains a <span class="code">public</span> constructor with no
            parameters.
          </li>
          <li>
            It must not define the <span class="code">finalize</span> method.
          </li>
        </ul>
                                                <p>
          Checks that methods of a direct entity bean satisfy these
          requirements:
        </p>
                                                <ul>
          <li>
            All <span class="code">ejbCreate&lt;METHOD&gt;(...)</span> methods
            are <span class="code">public</span>, not <span class="code">final</span>, and not <span class="code">static</span>.
          </li>
          <li>
            The return type of all <span class="code">ejbCreate&lt;METHOD&gt;(...)</span> methods is not
            <span class="code">void</span>, because the return type must be
            the entity bean's primary key type.
          </li>
          <li>
            All <span class="code">ejbPostCreate&lt;METHOD&gt;(...)</span>
            methods are <span class="code">public</span>, not <span class="code">final</span>, and not <span class="code">static</span>.
          </li>
          <li>
            The return type of all <span class="code">ejbPostCreate&lt;METHOD&gt;(...)</span> methods is
            <span class="code">void</span>.
          </li>
          <li>
            For each <span class="code">ejbCreate&lt;METHOD&gt;(...)</span>
            method there is a matching <span class="code">ejbPostCreate&lt;METHOD&gt;(...)</span> method.
          </li>
          <li>
            All <span class="code">ejbHome&lt;METHOD&gt;(...)</span> methods
            are <span class="code">public</span>, and not <span class="code">static</span>.
          </li>
          <li>
            The throws clause of all <span class="code">ejbHome&lt;METHOD&gt;(...)</span> methods does not
            define the <span class="code">java.rmi.RemoteException</span>.
          </li>
        </ul>
                                                <p>
          When the check is configured to check direct entity beans as having
          bean-managed persistence, checks that methods satisfy these
          additional requirements:
        </p>
                                                <ul>
          <li>
            All <span class="code">ejbFind&lt;METHOD&gt;(...)</span> methods
            are <span class="code">public</span>, not <span class="code">final</span>, and not <span class="code">static</span>.
          </li>
          <li>
            The return type of all <span class="code">ejbFind&lt;METHOD&gt;(...)</span> methods is not
            <span class="code">void</span>, because the return type must be
            the entity bean's primary key type, or a collection of primary
            keys.
          </li>
          <li>
            There is a <span class="code">ejbFindByPrimaryKey</span> method
            with one parameter.
          </li>
        </ul>
                                                <p>
          When the check is configured to check direct entity beans as having
          container-managed persistence, checks that methods satisfy these
          additional requirements:
        </p>
                                                <ul>
          <li>
            The throws clause of all <span class="code">ejbCreate&lt;METHOD&gt;(...)</span> methods defines
            the <span class="code">javax.ejb.CreateException</span>.
          </li>
          <li>
            All <span class="code">ejbSelect&lt;METHOD&gt;(...)</span> methods
            are <span class="code">public</span> and <span class="code">abstract</span>.
          </li>
          <li>
            The throws clause of all <span class="code">ejbSelect&lt;METHOD&gt;(...)</span> methods defines
            the <span class="code">javax.ejb.FinderException</span>.
          </li>
        </ul>
                                                                            <h3>Properties</h3>
                                    <table>
                                            <tr class="even">
                        <th valign="top" align="left"
>
                name
        </th>
                                <th valign="top" align="left"
>
                description
        </th>
                                <th valign="top" align="left"
>
                type
        </th>
                                <th valign="top" align="left"
>
                default value
        </th>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                persistence
        </td>
                                <td class="odd"
>
                type of persistence management
        </td>
                                <td class="odd"
>
                
              <a href="property_types.html#persistence">persistence policy</a>
            
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
            </tr>
            </table>
                                                <p>
          Reference: Enterprise JavaBeans? Specification,Version 2.0,
          sections 10.6 and 12.2.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.EntityBean&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                <p>
          To configure the check to apply the <span class="code">container</span> policy to direct entity beans:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.EntityBean&quot;&gt;
    &lt;property name=&quot;persistence&quot; value=&quot;container&quot;/&gt;
&lt;/module&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="FinalStatic"></a>
  <h2>FinalStatic</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that all static fields are declared final.
        </p>
                                                <p>
          Rational: This check ensures consistent runtime semantics so that
          EJB containers have the flexibility to distribute instances across
          multiple JVMs.
        </p>
                                                <p>
          Reference: <a href="http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html">Programming
          restrictions on EJB</a>.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.FinalStatic&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="LocalHomeInterface"></a>
  <h2>LocalHomeInterface</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct local home interface, i.e. an interface that
          directly extends <span class="code">javax.ejb.EJBLocalHome</span>,
          satisfies these requirements:
        </p>
                                                <ul>
          <li>
            The return type of all <span class="code">create&lt;METHOD&gt;(...)</span> methods is not <span class="code">void</span>, because the return type must be the
            bean's local interface.
          </li>
          <li>
            The throws clause of all <span class="code">create&lt;METHOD&gt;(...)</span> methods defines the
            <span class="code">javax.ejb.CreateException</span>.
          </li>
          <li>
            The throws clause of all methods does not define the <span class="code">java.rmi.RemoteException</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeansTM Specification,Version 2.0,
          sections 6.4 and 9.6.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.LocalHomeInterface&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="LocalInterface"></a>
  <h2>LocalInterface</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct local interface, i.e. an interface that
          directly extends <span class="code">javax.ejb.EJBLocalObject</span>,
          satisfies these requirements:
        </p>
                                                <ul>
          <li>
            The throws clause of all methods does not define the <span class="code">java.rmi.RemoteException</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeansTM Specification,Version 2.0, section
          9.10.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.LocalInterface&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="MessageBean"></a>
  <h2>MessageBean</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct message bean, i.e. a class that directly
          implements <span class="code">javax.ejb.MessageDrivenBean</span> and
          <span class="code">javax.jms.MessageListener</span>, satisfies these
          class requirements:
        </p>
                                                <ul>
          <li>
            The class is defined as <span class="code">public</span>.
          </li>
          <li>
            The class cannot be defined as <span class="code">final</span>.
          </li>
          <li>
            The class cannot be defined as <span class="code">abstract</span>.
          </li>
          <li>
            It contains a <span class="code">public</span> constructor with no
            parameters.
          </li>
          <li>
            It must not define the <span class="code">finalize</span> method.
          </li>
          <li>
            It defines an <span class="code">ejbCreate()</span> method this is
            <span class="code">public</span>, not <span class="code">final</span>, not <span class="code">static</span>,
            has no parameters, and has return type <span class="code">void</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeans? Specification,Version 2.0,
          section 15.7.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.MessageBean&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="RemoteHomeInterface"></a>
  <h2>RemoteHomeInterface</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct remote home interface, i.e. an interface that
          directly extends <span class="code">javax.ejb.EJBHome</span>,
          satisfies these requirements:
        </p>
                                                <ul>
          <li>
            The return type of all <span class="code">create&lt;METHOD&gt;(...)</span> methods is not <span class="code">void</span>, because the return type must be the
            bean's remote interface.
          </li>
          <li>
            The throws clause of all <span class="code">create&lt;METHOD&gt;(...)</span> methods defines the
            <span class="code">javax.ejb.CreateException</span>.
          </li>
          <li>
            The throws clause of all methods defines the <span class="code">java.rmi.RemoteException</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeansTM Specification,Version 2.0,
          sections 6.3 and 9.5.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.RemoteHomeInterface&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="RemoteInterface"></a>
  <h2>RemoteInterface</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct remote interface, i.e. an interface that
          directly extends <span class="code">javax.ejb.EJBObject</span>,
          satisfies these requirements:
        </p>
                                                <ul>
          <li>
            The throws clause of all methods defines the <span class="code">java.rmi.RemoteException</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeansTM Specification,Version 2.0, section
          9.9.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.RemoteInterface&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="SessionBean"></a>
  <h2>SessionBean</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that a direct session bean, i.e. a class that directly
          implements <span class="code">javax.ejb.SessionBean</span>,
          satisfies these class requirements:
        </p>
                                                <ul>
          <li>
            The class is defined as <span class="code">public</span>.
          </li>
          <li>
            The class cannot be defined as <span class="code">final</span>.
          </li>
          <li>
            The class cannot be defined as <span class="code">abstract</span>.
          </li>
          <li>
            It contains a <span class="code">public</span> constructor with no
            parameters.
          </li>
          <li>
            It must not define the <span class="code">finalize</span> method.
          </li>
          <li>
            It defines an <span class="code">ejbCreate&lt;METHOD&gt;()</span>
            method this is <span class="code">public</span>, not <span class="code">final</span>, not <span class="code">static</span>,
            and has return type <span class="code">void</span>.
          </li>
        </ul>
                                                <p>
          Reference: Enterprise JavaBeans? Specification,Version 2.0,
          section 7.10.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.SessionBean&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="ThisParameter"></a>
  <h2>ThisParameter</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that <span class="code">this</span> is not a parameter of any
          method calls or constructors for a bean.  Instead, you must use the
          result of the <span class="code">getEJBObject()</span> available in
          <span class="code">SessionContext</span> or <span class="code">EntityContext</span>.
        </p>
                                                <p>
          Reference: <a href="http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html">Programming
          restrictions on EJB</a>.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.ThisParameter&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="ThisReturn"></a>
  <h2>ThisReturn</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that <span class="code">this</span> is not returned by a bean
          method.  Instead, you must use the result of the <span class="code">getEJBObject()</span> available in <span class="code">SessionContext</span> or <span class="code">EntityContext</span>.
        </p>
                                                <p>
          Reference: <a href="http://www.javaworld.com/javaworld/jw-08-2000/jw-0825-ejbrestrict.html">Programming
          restrictions on EJB</a>.
        </p>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;j2ee.ThisReturn&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.j2ee
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                            </div>
    </div>

    <div class="csBottomBar">
      <div class="csBottomBarContents">
        Copyright &copy; 2001-2007, Oliver Burn
      </div>
    </div>
  </body>
</html>

<!-- end the processing -->