User: fleury  
  Date: 00/08/07 12:43:25

  Modified:    src/java/org/jboss/zol/testbean/bean
                        EnterpriseEntityBean.java StatelessSessionBean.java
  Log:
  The getEJBObject bug is real in stateless.
  
  Will commit tests to do all types of beans.  We know the EnterpriseEntity ones work 
fine
  
  Revision  Changes    Path
  1.3       +4 -3      
zola/src/java/org/jboss/zol/testbean/bean/EnterpriseEntityBean.java
  
  Index: EnterpriseEntityBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/zola/src/java/org/jboss/zol/testbean/bean/EnterpriseEntityBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EnterpriseEntityBean.java 2000/06/12 22:38:26     1.2
  +++ EnterpriseEntityBean.java 2000/08/07 19:43:25     1.3
  @@ -72,12 +72,13 @@
       EnterpriseEntity newBean;
       try{
           EnterpriseEntityHome home = 
(EnterpriseEntityHome)entityContext.getEJBObject().getEJBHome();
  -        newBean = (EnterpriseEntity)home.create(newName);
  -    }catch(Exception e)
  +         newBean = (EnterpriseEntity)home.create(newName);
  +
  +    
  +     }catch(Exception e)
       {
           throw new RemoteException(e.getMessage());   
       }
  -        
        
        return newBean;
     }
  
  
  
  1.3       +15 -3     
zola/src/java/org/jboss/zol/testbean/bean/StatelessSessionBean.java
  
  Index: StatelessSessionBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/zola/src/java/org/jboss/zol/testbean/bean/StatelessSessionBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatelessSessionBean.java 2000/05/11 19:10:57     1.2
  +++ StatelessSessionBean.java 2000/08/07 19:43:25     1.3
  @@ -39,7 +39,7 @@
     }
   
     public void callBusinessMethodA() {
  -    //Do nothing just make sure the call works
  +      //Do nothing just make sure the call works
         System.out.println("StatelessSessionBean.callBusinessMethodA() called");
      }
   
  @@ -55,7 +55,7 @@
     }
   
     public String callBusinessMethodC() {
  -       System.out.println("StatelessSessionBean.callBusinessMethodD() called");
  +       System.out.println("StatelessSessionBean.callBusinessMethodC() called");
          try {
   
              Context context = new InitialContext();
  @@ -66,8 +66,20 @@
     }
   
      public void callBusinessMethodD() throws BusinessMethodException {
  -       System.out.println("StatelessSessionBean.callBusinessMethodC() called");
  +       System.out.println("StatelessSessionBean.callBusinessMethodD() called");
          throw new BusinessMethodException();
  +  }
  +  
  +  public String callBusinessMethodE() {
  +              System.out.println("StatelessSessionBean.callBusinessMethodE() 
called");
  +         // Check that my EJBObject is there
  +              EJBObject ejbObject = sessionContext.getEJBObject();
  +              if (ejbObject == null) {
  +                      return "ISNULL:NOT FOUND!!!!!";
  +              }
  +              else {
  +                     return ejbObject.toString();
  +              }                       
     }
     
      public void testClassLoading() throws BusinessMethodException {
  
  
  

Reply via email to