User: juha    
  Date: 00/06/01 15:29:43

  Modified:    src/main/org/jboss/verifier/event
                        VerificationEventFactory.java
  Log:
  Added checks for:
  6.5.3 SessionSynchronization
    - stateless session must not implement
    - bean-managed tx cannot implement
  6.5.5 Required at least one ejbCreate(...) method
  
  Revision  Changes    Path
  1.2       +61 -8     
jboss/src/main/org/jboss/verifier/event/VerificationEventFactory.java
  
  Index: VerificationEventFactory.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/event/VerificationEventFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VerificationEventFactory.java     2000/05/29 18:26:31     1.1
  +++ VerificationEventFactory.java     2000/06/01 22:29:43     1.2
  @@ -18,11 +18,8 @@
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    *
  - * This package and its source code is available at www.gjt.org
  - * $Id: VerificationEventFactory.java,v 1.1 2000/05/29 18:26:31 juha Exp $
  - *
  - * You can reach the author by sending email to [EMAIL PROTECTED] or
  - * directly to [EMAIL PROTECTED]
  + * This package and its source code is available at www.jboss.org
  + * $Id: VerificationEventFactory.java,v 1.2 2000/06/01 22:29:43 juha Exp $
    */
   
    
  @@ -51,8 +48,8 @@
    *
    * @see     << OTHER RELATED CLASSES >>
    *
  - * @author   Juha Lindfors
  - * @version $Revision: 1.1 $
  + * @author   Juha Lindfors   ([EMAIL PROTECTED])
  + * @version $Revision: 1.2 $
    * @since    JDK 1.3
    */
   public class VerificationEventFactory {
  @@ -75,6 +72,22 @@
           
           if (EJBVerifier11.SECTION_6_5_1.equals(section))
               buildNoSessionBeanEvent(event, name);
  +
  +            
  +        else if (EJBVerifier11.SECTION_6_5_3_a.equals(section))
  +            buildStatelessSessionCannotSynchEvent(event, name);
  +            
  +        else if (EJBVerifier11.SECTION_6_5_3_b.equals(section))
  +            buildBeanManagedTxSessionCannotSynchEvent(event, name);
  +        
  +        
  +        else if (EJBVerifier11.SECTION_6_5_5.equals(section))
  +            buildNoEJBCreateMethodEvent(event, name);
  +        
  +        
  +        else if (EJBVerifier11.SECTION_6_6_1.equals(section))
  +            buildBeanManagedTxBeanCannotSynchEvent(event, name);
  +            
               
           else if (EJBVerifier11.DTD_EJB_CLASS.equals(section))
               buildEJBClassNotFoundEvent(event, name);
  @@ -115,6 +128,30 @@
           event.setMessage(SESSION_DOES_NOT_IMPLEMENT_SESSIONBEAN);
           event.setVerbose(SPEC_SECTION_6_5_1);
       }
  +
  +    private void buildStatelessSessionCannotSynchEvent(VerificationEvent event, 
String name) {
  +        
  +    //    event.setMessage();
  +    //    event.setVerbose();
  +    }
  +    
  +    private void buildBeanManagedTxSessionCannotSynchEvent(VerificationEvent event, 
String name) {
  +        
  +    //    event.setMessage();
  +    //    event.setVerbose();
  +    }
  +    
  +    private void buildNoEJBCreateMethodEvent(VerificationEvent event, String name) {
  +        
  +        event.setMessage(SESSION_DOES_NOT_DEFINE_EJBCREATE);
  +        event.setVerbose(SPEC_SECTION_6_5_5);
  +    }
  +    
  +    private void buildBeanManagedTxBeanCannotSynchEvent(VerificationEvent event, 
String name) {
  +        
  +    //    event.setMessage();
  +    //    event.setVerbose();
  +    }
       
       private void buildEJBClassNotFoundEvent(VerificationEvent event, String name) {
           
  @@ -126,7 +163,7 @@
       
       
       private final static String SESSION_DOES_NOT_IMPLEMENT_SESSIONBEAN =
  -        "Session bean does not implement the required SessionBean interface.";
  +        "Session bean does not implement the required SessionBean interface.";      
  
           
       private final static String SPEC_SECTION_6_5_1 = 
       
  @@ -136,8 +173,24 @@
           
           "\n" +
           
  -        "All session beans must implement the SessionBean interface";
  +        "All session beans must implement the SessionBean interface.";
   
  +        
  +    private final static String SESSION_DOES_NOT_DEFINE_EJBCREATE     =
  +        "Session bean does not define the required ejbCreate method.";
  +
  +    private final static String SPEC_SECTION_6_5_5 =
  +
  +        VerificationContext.VERSION_1_1         + " " +
  +        "Section 6.5.5"                         + " " +
  +        "Session bean's ejbCreate(...) methods" + " " +
  +        
  +        "\n" +
  +        
  +        "Each session bean class must have at least one ejbCreate method. " +
  +        "The number and signatures of a session bean's create methods are " +
  +        "specific to each session bean class.";
  +        
           
       private final static String EJB_CLASS_ELEMENT_NOT_FOUND =
           "The enterprise bean's class was not found.";
  
  
  

Reply via email to