User: fleury  
  Date: 00/09/29 18:00:55

  Modified:    src/main/org/jboss/test/bank/ejb CustomerBean.java
                        TellerBean.java
  Log:
  Updated bank tests to work with new jBoss version
  
  Revision  Changes    Path
  1.2       +21 -13    jbosstest/src/main/org/jboss/test/bank/ejb/CustomerBean.java
  
  Index: CustomerBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/bank/ejb/CustomerBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CustomerBean.java 2000/06/21 15:52:37     1.1
  +++ CustomerBean.java 2000/09/30 01:00:54     1.2
  @@ -14,8 +14,8 @@
   /**
    *      
    *   @see <related>
  - *   @author $Author: oberg $
  - *   @version $Revision: 1.1 $
  + *   @author $Author: fleury $
  + *   @version $Revision: 1.2 $
    */
   public class CustomerBean
      extends EntitySupport
  @@ -25,6 +25,7 @@
      // Attributes ----------------------------------------------------
      public String id;
      public String name;
  +   public Collection accounts;
      
      // Static --------------------------------------------------------
   
  @@ -53,21 +54,25 @@
      
      public Collection getAccounts()
      {
  -      try
  -      {
  -         AccountHome home = (AccountHome)new 
InitialContext().lookup(AccountHome.COMP_NAME);
  -         return home.findByOwner((Customer)entityCtx.getEJBObject());
  -      } catch (Exception e)
  -      {
  -         return new ArrayList();
  -      }
  +             return accounts;
      }
      
  +   public void addAccount(Account acct)
  +   {
  +             accounts.add(acct);
  +   }
  +   
  +   public void removeAccount(Account acct)
  +   {
  +             accounts.remove(acct);
  +   }
  +   
      // EntityHome implementation -------------------------------------
      public String ejbCreate(String id, String name) 
      { 
         setId(id);
         setName(name);
  +       accounts = new ArrayList();
         
         return id;
      }
  @@ -78,12 +83,15 @@
   }
   
   /*
  - *   $Id: CustomerBean.java,v 1.1 2000/06/21 15:52:37 oberg Exp $
  + *   $Id: CustomerBean.java,v 1.2 2000/09/30 01:00:54 fleury Exp $
    *   Currently locked by:$Locker:  $
    *   Revision:
    *   $Log: CustomerBean.java,v $
  - *   Revision 1.1  2000/06/21 15:52:37  oberg
  - *   Initial revision
  + *   Revision 1.2  2000/09/30 01:00:54  fleury
  + *   Updated bank tests to work with new jBoss version
  + *
  + *   Revision 1.1.1.1  2000/06/21 15:52:37  oberg
  + *   Initial import of jBoss test. This module contains CTS tests, some simple 
examples, and small bean suites.
    *
    *
    *  
  
  
  
  1.2       +9 -5      jbosstest/src/main/org/jboss/test/bank/ejb/TellerBean.java
  
  Index: TellerBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/bank/ejb/TellerBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TellerBean.java   2000/06/21 15:52:37     1.1
  +++ TellerBean.java   2000/09/30 01:00:55     1.2
  @@ -14,8 +14,8 @@
   /**
    *      
    *   @see <related>
  - *   @author $Author: oberg $
  - *   @version $Revision: 1.1 $
  + *   @author $Author: fleury $
  + *   @version $Revision: 1.2 $
    */
   public class TellerBean
      extends SessionSupport
  @@ -56,6 +56,7 @@
            data.setBalance(balance);
            data.setOwner(customer);
            Account acct = home.create(data);
  +              customer.addAccount(acct);
            
            return acct;
         } catch (Exception e)
  @@ -135,12 +136,15 @@
      }
   }
   /*
  - *   $Id: TellerBean.java,v 1.1 2000/06/21 15:52:37 oberg Exp $
  + *   $Id: TellerBean.java,v 1.2 2000/09/30 01:00:55 fleury Exp $
    *   Currently locked by:$Locker:  $
    *   Revision:
    *   $Log: TellerBean.java,v $
  - *   Revision 1.1  2000/06/21 15:52:37  oberg
  - *   Initial revision
  + *   Revision 1.2  2000/09/30 01:00:55  fleury
  + *   Updated bank tests to work with new jBoss version
  + *
  + *   Revision 1.1.1.1  2000/06/21 15:52:37  oberg
  + *   Initial import of jBoss test. This module contains CTS tests, some simple 
examples, and small bean suites.
    *
    *
    *  
  
  
  

Reply via email to