User: osh     
  Date: 01/01/21 09:59:39

  Modified:    src/main/org/jboss/test/cts/ejb StatefulSessionBean.java
                        StatelessSessionBean.java
  Log:
  Have to catch declared checked exceptions.
  
  Revision  Changes    Path
  1.8       +8 -2      
jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java
  
  Index: StatefulSessionBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/cts/ejb/StatefulSessionBean.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StatefulSessionBean.java  2001/01/11 03:55:46     1.7
  +++ StatefulSessionBean.java  2001/01/21 17:59:39     1.8
  @@ -15,8 +15,8 @@
   /**
    *
    *   @see <related>
  - *   @author $Author: peter $
  - *   @version $Revision: 1.7 $
  + *   @author $Author: osh $
  + *   @version $Revision: 1.8 $
    */
   
   public class StatefulSessionBean
  @@ -197,7 +197,13 @@
           Context             ctx         = new InitialContext();
           StatefulSessionHome home        =
              ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
  -        StatefulSession     sessionBean = home.create();
  +        StatefulSession     sessionBean;
  +        try {
  +           sessionBean = home.create();
  +        } catch (CreateException ex) {
  +           System.out.println("Loopback CreateException: " + ex);
  +           throw new EJBException(ex);
  +        }
           sessionBean.loopbackTest(sessionCtx.getEJBObject());
         }
         catch( javax.naming.NamingException nex )
  
  
  
  1.3       +7 -1      
jbosstest/src/main/org/jboss/test/cts/ejb/StatelessSessionBean.java
  
  Index: StatelessSessionBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/cts/ejb/StatelessSessionBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatelessSessionBean.java 2001/01/16 03:10:35     1.2
  +++ StatelessSessionBean.java 2001/01/21 17:59:39     1.3
  @@ -62,7 +62,13 @@
           Context             ctx         = new InitialContext();
           StatelessSessionHome home        =
              ( StatelessSessionHome ) ctx.lookup("ejbcts/StatelessSessionBean");
  -        StatelessSession     sessionBean = home.create();
  +        StatelessSession     sessionBean;
  +        try {
  +           sessionBean = home.create();
  +        } catch (CreateException ex) {
  +           System.out.println("Loopback CreateException: " + ex);
  +           throw new EJBException(ex);
  +        } 
           sessionBean.loopbackTest(sessionCtx.getEJBObject());
         }
         catch( javax.naming.NamingException nex )
  
  
  

Reply via email to