maguro      2005/03/09 00:01:01

  Modified:    modules/core/src/java/org/openejb/entity
                        EntityContextImpl.java EntityInstanceContext.java
  Log:

  Fixed getCallerPrincipal()
  
  Revision  Changes    Path
  1.8       +5 -4      
openejb/modules/core/src/java/org/openejb/entity/EntityContextImpl.java
  
  Index: EntityContextImpl.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/EntityContextImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EntityContextImpl.java    14 Feb 2005 18:32:29 -0000      1.7
  +++ EntityContextImpl.java    9 Mar 2005 05:01:01 -0000       1.8
  @@ -58,6 +58,7 @@
   import javax.ejb.EntityContext;
   import javax.ejb.TimerService;
   import javax.transaction.UserTransaction;
  +import javax.security.auth.Subject;
   
   import org.openejb.EJBContextImpl;
   import org.openejb.EJBInstanceContext;
  @@ -132,7 +133,7 @@
               throw new IllegalStateException("getPrimaryKey() cannot be 
called when inactive");
           }
   
  -        public Principal getCallerPrincipal() {
  +        public Principal getCallerPrincipal(Subject callerSubject) {
               throw new IllegalStateException("getCallerPrincipal() cannot be 
called when inactive");
           }
   
  @@ -170,7 +171,7 @@
               throw new IllegalStateException("getPrimaryKey() cannot be 
called from set/unsetEntityContext");
           }
   
  -        public Principal getCallerPrincipal() {
  +        public Principal getCallerPrincipal(Subject callerSubject) {
               throw new IllegalStateException("getCallerPrincipal() cannot be 
called from set/unsetEntityContext");
           }
   
  @@ -244,7 +245,7 @@
       };
   
       public static EntityContextState EJBACTIVATE = new EntityContextState() {
  -        public Principal getCallerPrincipal() {
  +        public Principal getCallerPrincipal(Subject callerSubject) {
               throw new IllegalStateException("getCallerPrincipal() cannot be 
called from ejbActivate/ejbPassivate");
           }
   
  
  
  
  1.14      +6 -1      
openejb/modules/core/src/java/org/openejb/entity/EntityInstanceContext.java
  
  Index: EntityInstanceContext.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/EntityInstanceContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- EntityInstanceContext.java        25 Feb 2005 23:06:09 -0000      1.13
  +++ EntityInstanceContext.java        9 Mar 2005 05:01:01 -0000       1.14
  @@ -57,6 +57,7 @@
   import org.openejb.AbstractInstanceContext;
   import org.openejb.EJBInvocation;
   import org.openejb.EJBOperation;
  +import org.openejb.EJBContextImpl;
   import org.openejb.cache.InstancePool;
   import org.openejb.dispatch.SystemMethodIndices;
   import org.openejb.proxy.EJBProxyFactory;
  @@ -110,6 +111,10 @@
   
       public boolean setTimerState(EJBOperation operation) {
           return entityContext.setTimerState(operation);
  +    }
  +
  +    public EJBContextImpl getEJBContextImpl() {
  +        return entityContext;
       }
   
       public EntityContext getEntityContext() {
  
  
  

Reply via email to