User: peter   
  Date: 01/01/10 19:55:46

  Modified:    src/main/org/jboss/test/cts/ejb StatefulSessionBean.java
  Added:       src/main/org/jboss/test/cts/ejb StatelessSessionBean.java
  Log:
  Fixed the getCallerPrincipal( ) problems.
  Addes some rudimentary tests for stateless session beans.
  Began some work on UserTransaction tests.
  
  Revision  Changes    Path
  1.7       +7 -5      
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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StatefulSessionBean.java  2001/01/07 23:14:37     1.6
  +++ StatefulSessionBean.java  2001/01/11 03:55:46     1.7
  @@ -16,7 +16,7 @@
    *
    *   @see <related>
    *   @author $Author: peter $
  - *   @version $Revision: 1.6 $
  + *   @version $Revision: 1.7 $
    */
   
   public class StatefulSessionBean
  @@ -172,11 +172,13 @@
         }
   
         ctx.principleName = principal.getName();
  -      //ctx.isCallerInRole = sessionCtx.isCallerInRole();
  -      //System.out.println("calling setRollbackOnly( ) on context");
  -      //sessionCtx.setRollbackOnly();
  +      ctx.isCallerInRole = 
  +        new Boolean(sessionCtx.isCallerInRole("bean tester"));
   
  -      //ctx.isRollbackOnly = new Boolean(sessionCtx.getRollbackOnly());
  +      System.out.println("calling setRollbackOnly( ) on context");
  +      sessionCtx.setRollbackOnly();
  +
  +      ctx.isRollbackOnly = new Boolean(sessionCtx.getRollbackOnly());
   
         return ctx;
      }
  
  
  
  1.1                  
jbosstest/src/main/org/jboss/test/cts/ejb/StatelessSessionBean.java
  
  Index: StatelessSessionBean.java
  ===================================================================
  package org.jboss.test.cts.ejb;
  
  import org.jboss.test.util.ejb.*;
  import java.util.*;
  import javax.ejb.*;
  import org.jboss.test.cts.interfaces.*;
  import org.jboss.test.util.ejb.SessionSupport;
  
  
  public class StatelessSessionBean
     extends SessionSupport 
  {
     /**
      * Method ejbCreate
      *
      *
      * @throws CreateException
      *
      */
  
     public void ejbCreate ()
        throws CreateException
     {
     }
  
     /* The following included will not deploy as per the 
        EJB 1.1 spec: [6.8] "There can be no other create methods
        in the home interface.
     public void ejbCreate (String aString)
        throws CreateException
     {
     }
     */
  
     /**
      * Method method1
      *
      *
      * @param msg
      *
      * @return
      *
      */
  
     public String method1 (String msg)
     {
        return msg;
     }
  
  }
  
  
  
  
  

Reply via email to