org.openejb
Class EJBContextImpl

java.lang.Object
  extended byorg.openejb.EJBContextImpl
Direct Known Subclasses:
EntityContextImpl, MDBContext, StatefulSessionContext, StatelessSessionContext

public abstract class EJBContextImpl
extends Object

Implementation of EJBContext that uses the State pattern to determine which operations can be performed for a given EJB.

Version:
$Revision: 445265 $ $Date: 2005-03-09 06:01:02 +0100 (Wed, 09 Mar 2005) $

Nested Class Summary
static class EJBContextImpl.EJBContextState
           
 
Field Summary
protected  EJBInstanceContext context
           
protected  EJBContextImpl.EJBContextState state
           
protected  org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction
           
 
Constructor Summary
EJBContextImpl(EJBInstanceContext context, org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager, org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction)
           
 
Method Summary
 Identity getCallerIdentity()
           
 Principal getCallerPrincipal()
           
 Subject getCallerSubject()
           
 javax.ejb.EJBHome getEJBHome()
           
 javax.ejb.EJBLocalHome getEJBLocalHome()
           
 javax.ejb.EJBLocalObject getEJBLocalObject()
           
 javax.ejb.EJBObject getEJBObject()
           
 Properties getEnvironment()
           
 boolean getRollbackOnly()
           
 javax.ejb.TimerService getTimerService()
           
 UserTransaction getUserTransaction()
           
 boolean isCallerInRole(Identity identity)
           
 boolean isCallerInRole(String s)
           
 void setCallerSubject(Subject callerSubject)
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected final EJBInstanceContext context

userTransaction

protected final org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction

state

protected EJBContextImpl.EJBContextState state
Constructor Detail

EJBContextImpl

public EJBContextImpl(EJBInstanceContext context,
                      org.apache.geronimo.transaction.context.TransactionContextManager transactionContextManager,
                      org.apache.geronimo.transaction.context.UserTransactionImpl userTransaction)
Method Detail

getCallerSubject

public Subject getCallerSubject()

setCallerSubject

public void setCallerSubject(Subject callerSubject)

getEJBHome

public javax.ejb.EJBHome getEJBHome()

getEJBLocalHome

public javax.ejb.EJBLocalHome getEJBLocalHome()

getEJBObject

public javax.ejb.EJBObject getEJBObject()
                                 throws IllegalStateException
Throws:
IllegalStateException

getEJBLocalObject

public javax.ejb.EJBLocalObject getEJBLocalObject()
                                           throws IllegalStateException
Throws:
IllegalStateException

getCallerPrincipal

public Principal getCallerPrincipal()

isCallerInRole

public boolean isCallerInRole(String s)

getUserTransaction

public UserTransaction getUserTransaction()

setRollbackOnly

public void setRollbackOnly()

getRollbackOnly

public boolean getRollbackOnly()

getTimerService

public javax.ejb.TimerService getTimerService()

getEnvironment

public Properties getEnvironment()

getCallerIdentity

public Identity getCallerIdentity()

isCallerInRole

public boolean isCallerInRole(Identity identity)


Copyright © 1999-2006 OpenEJB. All Rights Reserved.