org.apache.openejb.core
Class BaseContext

java.lang.Object
  extended by org.apache.openejb.core.BaseContext
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EJBContext
Direct Known Subclasses:
BaseSessionContext, EntityContext, MdbContext

public abstract class BaseContext
extends java.lang.Object
implements javax.ejb.EJBContext, java.io.Serializable

Version:
$Rev: 951613 $ $Date: 2010-06-05 01:15:45 +0200 (Sa, 05. Jun 2010) $
See Also:
Serialized Form

Nested Class Summary
static class BaseContext.State
           
 class BaseContext.UserTransactionWrapper
           
 
Field Summary
protected static BaseContext.State[] states
           
 
Constructor Summary
protected BaseContext(SecurityService securityService)
           
protected BaseContext(SecurityService securityService, javax.transaction.UserTransaction userTransaction)
           
 
Method Summary
 java.security.Identity getCallerIdentity()
           
 java.security.Principal getCallerPrincipal()
           
 javax.ejb.EJBHome getEJBHome()
           
 javax.ejb.EJBLocalHome getEJBLocalHome()
           
 java.util.Properties getEnvironment()
           
 boolean getRollbackOnly()
           
protected abstract  BaseContext.State getState()
           
static BaseContext.State[] getStates()
           
 javax.ejb.TimerService getTimerService()
           
 javax.transaction.UserTransaction getUserTransaction()
           
 boolean isCallerInRole(java.security.Identity identity)
           
 boolean isCallerInRole(java.lang.String roleName)
           
 boolean isEntityManagerAccessAllowed()
           
 boolean isEntityManagerFactoryAccessAllowed()
           
 boolean isJNDIAccessAllowed()
           
 boolean isMessageContextAccessAllowed()
           
 boolean isTimerAccessAllowed()
           
static boolean isTimerMethodAllowed()
           
 boolean isUserTransactionAccessAllowed()
           
 java.lang.Object lookup(java.lang.String name)
           
 void setRollbackOnly()
           
protected  java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

states

protected static BaseContext.State[] states
Constructor Detail

BaseContext

protected BaseContext(SecurityService securityService)

BaseContext

protected BaseContext(SecurityService securityService,
                      javax.transaction.UserTransaction userTransaction)
Method Detail

getStates

public static BaseContext.State[] getStates()

getState

protected abstract BaseContext.State getState()

getEJBHome

public javax.ejb.EJBHome getEJBHome()
Specified by:
getEJBHome in interface javax.ejb.EJBContext

getEJBLocalHome

public javax.ejb.EJBLocalHome getEJBLocalHome()
Specified by:
getEJBLocalHome in interface javax.ejb.EJBContext

getEnvironment

public final java.util.Properties getEnvironment()
Specified by:
getEnvironment in interface javax.ejb.EJBContext

getCallerIdentity

public final java.security.Identity getCallerIdentity()
Specified by:
getCallerIdentity in interface javax.ejb.EJBContext

getCallerPrincipal

public java.security.Principal getCallerPrincipal()
Specified by:
getCallerPrincipal in interface javax.ejb.EJBContext

isCallerInRole

public final boolean isCallerInRole(java.security.Identity identity)
Specified by:
isCallerInRole in interface javax.ejb.EJBContext

isCallerInRole

public boolean isCallerInRole(java.lang.String roleName)
Specified by:
isCallerInRole in interface javax.ejb.EJBContext

getUserTransaction

public javax.transaction.UserTransaction getUserTransaction()
                                                     throws java.lang.IllegalStateException
Specified by:
getUserTransaction in interface javax.ejb.EJBContext
Throws:
java.lang.IllegalStateException

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException
Specified by:
setRollbackOnly in interface javax.ejb.EJBContext
Throws:
java.lang.IllegalStateException

getRollbackOnly

public boolean getRollbackOnly()
                        throws java.lang.IllegalStateException
Specified by:
getRollbackOnly in interface javax.ejb.EJBContext
Throws:
java.lang.IllegalStateException

getTimerService

public javax.ejb.TimerService getTimerService()
                                       throws java.lang.IllegalStateException
Specified by:
getTimerService in interface javax.ejb.EJBContext
Throws:
java.lang.IllegalStateException

lookup

public java.lang.Object lookup(java.lang.String name)
Specified by:
lookup in interface javax.ejb.EJBContext

isUserTransactionAccessAllowed

public boolean isUserTransactionAccessAllowed()

isMessageContextAccessAllowed

public boolean isMessageContextAccessAllowed()

isJNDIAccessAllowed

public boolean isJNDIAccessAllowed()

isEntityManagerFactoryAccessAllowed

public boolean isEntityManagerFactoryAccessAllowed()

isEntityManagerAccessAllowed

public boolean isEntityManagerAccessAllowed()

isTimerAccessAllowed

public boolean isTimerAccessAllowed()

isTimerMethodAllowed

public static boolean isTimerMethodAllowed()

writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.