maguro      2005/03/13 21:12:46

  Modified:    modules/itests/src/java/org/openejb/test/interop/slsb
                        Interop.java InteropBean.java LocalInterop.java
  Log:

  Added distinguished names to roles.
  
  Revision  Changes    Path
  1.2       +11 -3     
openejb/modules/itests/src/java/org/openejb/test/interop/slsb/Interop.java
  
  Index: Interop.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/itests/src/java/org/openejb/test/interop/slsb/Interop.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Interop.java      8 Mar 2005 04:08:35 -0000       1.1
  +++ Interop.java      14 Mar 2005 02:12:46 -0000      1.2
  @@ -53,6 +53,14 @@
    */
   public interface Interop extends EJBObject {
   
  -    public String callRemote(String argument1) throws RemoteException;
  +    public String callNoAccess(String argument1) throws RemoteException;
  +
  +    public String callLowAccess(String argument1) throws RemoteException;
  +
  +    public String callMedAccess(String argument1) throws RemoteException;
  +
  +    public String callHighAccess(String argument1) throws RemoteException;
  +
  +    public String callAllAccess(String argument1) throws RemoteException;
   
   }
  
  
  
  1.5       +67 -3     
openejb/modules/itests/src/java/org/openejb/test/interop/slsb/InteropBean.java
  
  Index: InteropBean.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/itests/src/java/org/openejb/test/interop/slsb/InteropBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InteropBean.java  12 Mar 2005 17:04:56 -0000      1.4
  +++ InteropBean.java  14 Mar 2005 02:12:46 -0000      1.5
  @@ -64,7 +64,71 @@
   
       private SessionContext sessionContext;
   
  -    public String callRemote(String argument1) throws RemoteException {
  +    public String callNoAccess(String argument1) throws RemoteException {
  +        try {
  +            InitialContext ic = new InitialContext();
  +            Object ref = ic.lookup("java:comp/env/ejb/interop/InteropBean");
  +
  +            BasicStatelessHome home = (BasicStatelessHome) 
PortableRemoteObject.narrow(ref, BasicStatelessHome.class);
  +            BasicStateless bean = home.create();
  +
  +            return bean.noAccessMethod(argument1);
  +        } catch (NamingException e) {
  +            throw new RemoteException("Unable to lookup 
java:comp/env/ejb/interop/InteropBean", e);
  +        } catch (CreateException e) {
  +            throw new RemoteException("Unable to create BasicStateless EJB", 
e);
  +        }
  +    }
  +
  +    public String callLowAccess(String argument1) throws RemoteException {
  +        try {
  +            InitialContext ic = new InitialContext();
  +            Object ref = ic.lookup("java:comp/env/ejb/interop/InteropBean");
  +
  +            BasicStatelessHome home = (BasicStatelessHome) 
PortableRemoteObject.narrow(ref, BasicStatelessHome.class);
  +            BasicStateless bean = home.create();
  +
  +            return bean.lowSecurityMethod(argument1);
  +        } catch (NamingException e) {
  +            throw new RemoteException("Unable to lookup 
java:comp/env/ejb/interop/InteropBean", e);
  +        } catch (CreateException e) {
  +            throw new RemoteException("Unable to create BasicStateless EJB", 
e);
  +        }
  +    }
  +
  +    public String callMedAccess(String argument1) throws RemoteException {
  +        try {
  +            InitialContext ic = new InitialContext();
  +            Object ref = ic.lookup("java:comp/env/ejb/interop/InteropBean");
  +
  +            BasicStatelessHome home = (BasicStatelessHome) 
PortableRemoteObject.narrow(ref, BasicStatelessHome.class);
  +            BasicStateless bean = home.create();
  +
  +            return bean.mediumSecurityMethod(argument1);
  +        } catch (NamingException e) {
  +            throw new RemoteException("Unable to lookup 
java:comp/env/ejb/interop/InteropBean", e);
  +        } catch (CreateException e) {
  +            throw new RemoteException("Unable to create BasicStateless EJB", 
e);
  +        }
  +    }
  +
  +    public String callHighAccess(String argument1) throws RemoteException {
  +        try {
  +            InitialContext ic = new InitialContext();
  +            Object ref = ic.lookup("java:comp/env/ejb/interop/InteropBean");
  +
  +            BasicStatelessHome home = (BasicStatelessHome) 
PortableRemoteObject.narrow(ref, BasicStatelessHome.class);
  +            BasicStateless bean = home.create();
  +
  +            return bean.highSecurityMethod(argument1);
  +        } catch (NamingException e) {
  +            throw new RemoteException("Unable to lookup 
java:comp/env/ejb/interop/InteropBean", e);
  +        } catch (CreateException e) {
  +            throw new RemoteException("Unable to create BasicStateless EJB", 
e);
  +        }
  +    }
  +
  +    public String callAllAccess(String argument1) throws RemoteException {
           try {
               InitialContext ic = new InitialContext();
               Object ref = ic.lookup("java:comp/env/ejb/interop/InteropBean");
  
  
  
  1.2       +11 -3     
openejb/modules/itests/src/java/org/openejb/test/interop/slsb/LocalInterop.java
  
  Index: LocalInterop.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/itests/src/java/org/openejb/test/interop/slsb/LocalInterop.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalInterop.java 8 Mar 2005 04:08:36 -0000       1.1
  +++ LocalInterop.java 14 Mar 2005 02:12:46 -0000      1.2
  @@ -53,6 +53,14 @@
    */
   public interface LocalInterop extends EJBLocalObject {
   
  -    public String callRemote(String argument1) throws RemoteException;
  +    public String callNoAccess(String argument1) throws RemoteException;
  +
  +    public String callLowAccess(String argument1) throws RemoteException;
  +
  +    public String callMedAccess(String argument1) throws RemoteException;
  +
  +    public String callHighAccess(String argument1) throws RemoteException;
  +
  +    public String callAllAccess(String argument1) throws RemoteException;
   
   }
  
  
  

Reply via email to