User: juha    
  Date: 00/06/03 08:24:15

  Modified:    src/main/org/jboss/verifier/strategy
                        VerificationStrategy.java EJBVerifier20.java
                        EJBVerifier11.java
  Log:
  VerificationStrategy interface defines a method for checking
  message driven beans. For EJB 1.1 bean verifier, this method can
  have an empty implementation.
  
  Revision  Changes    Path
  1.2       +6 -2      
jboss/src/main/org/jboss/verifier/strategy/VerificationStrategy.java
  
  Index: VerificationStrategy.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/strategy/VerificationStrategy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VerificationStrategy.java 2000/05/29 18:26:29     1.1
  +++ VerificationStrategy.java 2000/06/03 15:24:15     1.2
  @@ -19,7 +19,7 @@
    * 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: VerificationStrategy.java,v 1.1 2000/05/29 18:26:29 juha Exp $
  + * $Id: VerificationStrategy.java,v 1.2 2000/06/03 15:24:15 juha Exp $
    *
    * You can reach the author by sending email to [EMAIL PROTECTED] or
    * directly to [EMAIL PROTECTED]
  @@ -43,7 +43,7 @@
    * @see     << OTHER RELATED CLASSES >>
    *
    * @author   Juha Lindfors
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    * @since    JDK 1.3
    */
   public interface VerificationStrategy extends Strategy {
  @@ -58,6 +58,10 @@
        */
       abstract void checkSessions(Iterator sessions);
       
  +    /*
  +     * Checks the message driven beans (EJB 2.0 only).
  +     */
  +    abstract void checkMessageDriven(Iterator sessions);
       
   }
   
  
  
  
  1.2       +72 -9     jboss/src/main/org/jboss/verifier/strategy/EJBVerifier20.java
  
  Index: EJBVerifier20.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/strategy/EJBVerifier20.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJBVerifier20.java        2000/05/29 18:26:30     1.1
  +++ EJBVerifier20.java        2000/06/03 15:24:15     1.2
  @@ -18,22 +18,31 @@
    * 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: EJBVerifier20.java,v 1.1 2000/05/29 18:26:30 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: EJBVerifier20.java,v 1.2 2000/06/03 15:24:15 juha Exp $
    */
   
   
   // standard imports
  +import java.util.Iterator;
  +import java.net.URL;
  +import java.net.URLClassLoader;
  +import java.lang.reflect.Method;
   
   
   // non-standard class dependencies
  +import org.gjt.lindfors.pattern.StrategyContext;
  +
  +import org.jboss.verifier.event.VerificationEvent;
  +import org.jboss.verifier.event.VerificationEventFactory;
  +
  +import com.dreambean.ejx.ejb.Session;
  +import com.dreambean.ejx.ejb.Entity;
   
   
  +
   /**
  - * Not implemented. Uses the EJB1.1 implementation.
  + * EJB 2.0 bean verifier.
    *
    * For more detailed documentation, refer to the
    * <a href="" << INSERT DOC LINK HERE >> </a>
  @@ -41,17 +50,71 @@
    * @see     << OTHER RELATED CLASSES >>
    *
    * @author   Juha Lindfors
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    * @since    JDK 1.3
    */
  -public class EJBVerifier20 extends EJBVerifier11 {
  +public class EJBVerifier20 implements VerificationStrategy {
   
       /*
  -     *
  +     * [TODO]   The EJB 1.1 verifier and EJB 2.0 verifier are going to share
  +     *          some common code. These ought to be moved to an abstract
  +     *          verifier super class.
  +     */
  +     
  +    private VerificationContext context      = null; 
  +
  +
  +    /*
  +     * Constructor
        */
       public EJBVerifier20(VerificationContext context) {
  -        super(context);
  +        this.context = context;
  +    }
  +
  +    
  +    /*
  +     ***********************************************************************
  +     *
  +     *    IMPLEMENTS VERIFICATION STRATEGY INTERFACE
  +     *
  +     ***********************************************************************
  +     */
  +    
  +    public StrategyContext getContext() {
  +        return context;
  +    }
  +
  +    public void checkSessions(Iterator beans) {
  +
  +        while (beans.hasNext()) { 
  +            try {
  +                //checkSession((Session)beans.next());
  +            }
  +            catch (ClassCastException e) {
  +                System.err.println(e);
  +                // THROW INTERNAL ERROR   
  +            }
  +        }
  +    }            
  +
  +    public void checkEntities(Iterator beans) {
  +        
  +        while (beans.hasNext()) {
  +            try {
  +                //checkEntity((Entity)beans.next());
  +            }
  +            catch (ClassCastException e) {
  +                System.err.println(e);
  +                // THROW INTERNAL ERROR
  +            }
  +        }
  +    }        
  +        
  +    public void checkMessageDriven(Iterator beans) {
  +            
  +            // NOT IMPLEMENTED YET
       }
  +        
       
   }
   
  
  
  
  1.3       +6 -2      jboss/src/main/org/jboss/verifier/strategy/EJBVerifier11.java
  
  Index: EJBVerifier11.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/verifier/strategy/EJBVerifier11.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EJBVerifier11.java        2000/06/01 22:29:43     1.2
  +++ EJBVerifier11.java        2000/06/03 15:24:15     1.3
  @@ -19,7 +19,7 @@
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    *
    * This package and its source code is available at www.jboss.org
  - * $Id: EJBVerifier11.java,v 1.2 2000/06/01 22:29:43 juha Exp $
  + * $Id: EJBVerifier11.java,v 1.3 2000/06/03 15:24:15 juha Exp $
    */
   
   
  @@ -51,7 +51,7 @@
    * @see     << OTHER RELATED CLASSES >>
    *
    * @author   Juha Lindfors ([EMAIL PROTECTED]
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    * @since    JDK 1.3
    */
   public class EJBVerifier11 implements VerificationStrategy {
  @@ -168,6 +168,10 @@
           }
       }        
           
  +    public void checkMessageDriven(Iterator beans) {
  +            
  +            // EMPTY IMPLEMENTATION, EJB 2.0 ONLY
  +    }
           
           
   /*
  
  
  

Reply via email to