User: starksm 
  Date: 01/06/12 21:55:50

  Modified:    src/main/org/jboss/test/security/ejb EntityBeanImpl.java
  Added:       src/main/org/jboss/test/security/ejb
                        IOStatefulSessionBean.java
                        IOStatelessSessionBean.java
  Log:
  Initial tests of the custom security proxy layer
  
  Revision  Changes    Path
  1.2       +2 -2      
jbosstest/src/main/org/jboss/test/security/ejb/EntityBeanImpl.java
  
  Index: EntityBeanImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/ejb/EntityBeanImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityBeanImpl.java       2001/03/05 10:10:59     1.1
  +++ EntityBeanImpl.java       2001/06/13 04:55:50     1.2
  @@ -9,8 +9,8 @@
   not a real entity bean. It is used to test Principal propagation
   using the echo method. 
   
  -@author [EMAIL PROTECTED]
  -@version $Revision: 1.1 $
  +@author [EMAIL PROTECTED]
  +@version $Revision: 1.2 $
   */
   public class EntityBeanImpl implements EntityBean
   {
  
  
  
  1.1                  
jbosstest/src/main/org/jboss/test/security/ejb/IOStatefulSessionBean.java
  
  Index: IOStatefulSessionBean.java
  ===================================================================
  package org.jboss.test.security.ejb;
  
  import java.io.IOException;
  import java.security.Principal;
  import javax.ejb.CreateException;
  import javax.ejb.EJBException;
  import javax.ejb.SessionBean;
  import javax.ejb.SessionContext;
  
  /** A simple session bean for testing custom security.
  
  @author [EMAIL PROTECTED]
  @version $Revision: 1.1 $
  */
  public class IOStatefulSessionBean implements SessionBean
  {
      private SessionContext sessionContext;
  
      public void ejbCreate() throws CreateException
      {
          System.out.println("IOStatefulSessionBean.ejbCreate() called");
      }
  
      public void ejbActivate()
      {
          System.out.println("IOStatefulSessionBean.ejbActivate() called");
      }
  
      public void ejbPassivate()
      {
          System.out.println("IOStatefulSessionBean.ejbPassivate() called");
      }
  
      public void ejbRemove()
      {
          System.out.println("IOStatefulSessionBean.ejbRemove() called");
      }
  
      public void setSessionContext(SessionContext context)
      {
          sessionContext = context;
      }
  
      public String read(String path) throws IOException
      {
          System.out.println("IOStatefulSessionBean.read, path="+path);
          Principal p = sessionContext.getCallerPrincipal();
          System.out.println("IOStatefulSessionBean.read, callerPrincipal="+p);
          return path;
      }
  
      public void write(String path) throws IOException
      {
          System.out.println("IOStatefulSessionBean.write, path="+path);
          Principal p = sessionContext.getCallerPrincipal();
          System.out.println("IOStatefulSessionBean.write, callerPrincipal="+p);
      }
  }
  
  
  
  1.1                  
jbosstest/src/main/org/jboss/test/security/ejb/IOStatelessSessionBean.java
  
  Index: IOStatelessSessionBean.java
  ===================================================================
  package org.jboss.test.security.ejb;
  
  import java.io.IOException;
  import java.security.Principal;
  import javax.ejb.CreateException;
  import javax.ejb.EJBException;
  import javax.ejb.SessionBean;
  import javax.ejb.SessionContext;
  
  /** A simple session bean for testing custom security.
  
  @author [EMAIL PROTECTED]
  @version $Revision: 1.1 $
  */
  public class IOStatelessSessionBean implements SessionBean
  {
      private SessionContext sessionContext;
  
      public void ejbCreate() throws CreateException
      {
          System.out.println("IOStatelessSessionBean.ejbCreate() called");
      }
  
      public void ejbActivate()
      {
          System.out.println("IOStatelessSessionBean.ejbActivate() called");
      }
  
      public void ejbPassivate()
      {
          System.out.println("IOStatelessSessionBean.ejbPassivate() called");
      }
  
      public void ejbRemove()
      {
          System.out.println("IOStatelessSessionBean.ejbRemove() called");
      }
  
      public void setSessionContext(SessionContext context)
      {
          sessionContext = context;
      }
  
      public String read(String path) throws IOException
      {
          System.out.println("IOStatelessSessionBean.read, path="+path);
          Principal p = sessionContext.getCallerPrincipal();
          System.out.println("IOStatelessSessionBean.read, callerPrincipal="+p);
          return path;
      }
  
      public void write(String path) throws IOException
      {
          System.out.println("IOStatelessSessionBean.write, path="+path);
          Principal p = sessionContext.getCallerPrincipal();
          System.out.println("IOStatelessSessionBean.write, callerPrincipal="+p);
      }
  }
  
  
  

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

Reply via email to