User: starksm 
  Date: 02/03/03 23:21:35

  Modified:    src/main/org/jboss/test/security/ejb
                        StatelessSessionBean4.java
  Log:
  Need to invoke a remote method to ensure ejbCreate is called
  
  Revision  Changes    Path
  1.3       +17 -12    
jbosstest/src/main/org/jboss/test/security/ejb/StatelessSessionBean4.java
  
  Index: StatelessSessionBean4.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/ejb/StatelessSessionBean4.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StatelessSessionBean4.java        3 Mar 2002 07:40:50 -0000       1.2
  +++ StatelessSessionBean4.java        4 Mar 2002 07:21:35 -0000       1.3
  @@ -7,35 +7,40 @@
   import javax.ejb.SessionBean;
   import javax.ejb.SessionContext;
   
  +import org.apache.log4j.Category;
  +
   /** A simple session bean for testing declarative security and
   the use of getCallerPrincipal in ejbCreate
   
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.2 $
  +@version $Revision: 1.3 $
   */
   public class StatelessSessionBean4 implements SessionBean
   {
  +    private static Category log = Category.getInstance(StatelessSessionBean4.class);
  +
       private SessionContext sessionContext;
   
       public void ejbCreate() throws CreateException
       {
  -        System.out.println("StatelessSessionBean4.ejbCreate() called");
  +        log.debug("StatelessSessionBean4.ejbCreate() called");
           Principal caller = sessionContext.getCallerPrincipal();
  +        log.debug("StatelessSessionBean4.getCallerPrincipal() called");
       }
   
       public void ejbActivate()
       {
  -        System.out.println("StatelessSessionBean4.ejbActivate() called");
  +        log.debug("StatelessSessionBean4.ejbActivate() called");
       }
   
       public void ejbPassivate()
       {
  -        System.out.println("StatelessSessionBean4.ejbPassivate() called");
  +        log.debug("StatelessSessionBean4.ejbPassivate() called");
       }
   
       public void ejbRemove()
       {
  -        System.out.println("StatelessSessionBean4.ejbRemove() called");
  +        log.debug("StatelessSessionBean4.ejbRemove() called");
       }
   
       public void setSessionContext(SessionContext context)
  @@ -45,24 +50,24 @@
   
       public String echo(String arg)
       {
  -        System.out.println("StatelessSessionBean4.echo, arg="+arg);
  +        log.debug("StatelessSessionBean4.echo, arg="+arg);
           Principal p = sessionContext.getCallerPrincipal();
  -        System.out.println("StatelessSessionBean4.echo, callerPrincipal="+p);
  +        log.debug("StatelessSessionBean4.echo, callerPrincipal="+p);
           return arg;
       }
       public String forward(String echoArg)
       {
  -        System.out.println("StatelessSessionBean4.forward, echoArg="+echoArg);
  +        log.debug("StatelessSessionBean4.forward, echoArg="+echoArg);
           return echo(echoArg);
       }
   
       public void noop()
       {
  -        System.out.println("StatelessSessionBean4.noop");
  +        log.debug("StatelessSessionBean4.noop");
       }
       public void npeError()
       {
  -        System.out.println("StatelessSessionBean4.npeError");
  +        log.debug("StatelessSessionBean4.npeError");
           Object obj = null;
           obj.toString();
       }
  @@ -70,13 +75,13 @@
       public void unchecked()
       {
           Principal p = sessionContext.getCallerPrincipal();
  -        System.out.println("StatelessSessionBean4.unchecked, callerPrincipal="+p);
  +        log.debug("StatelessSessionBean4.unchecked, callerPrincipal="+p);
       }
   
       public void excluded()
       {
           Principal p = sessionContext.getCallerPrincipal();
  -        System.out.println("StatelessSessionBean4.excluded, callerPrincipal="+p);
  +        log.debug("StatelessSessionBean4.excluded, callerPrincipal="+p);
       }
   
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to