com.caucho.ejb
Class AbstractContext

java.lang.Object
  extended by com.caucho.ejb.AbstractContext
All Implemented Interfaces:
EJBContext
Direct Known Subclasses:
AbstractSessionContext, MessageDrivenContextImpl

public abstract class AbstractContext
extends java.lang.Object
implements EJBContext

Base class for an abstract context


Constructor Summary
AbstractContext()
           
 
Method Summary
 void __caucho_setInvokedBusinessInterface(java.lang.Class invokedBusinessInterface)
           
 void __caucho_timeout_callback(Timer timer)
          Runs the timeout callbacks.
 EJBLocalHome createLocalHome()
          Create the local home view.
 EJBHome createRemoteHomeView()
          Create the home view.
 java.lang.Object createRemoteView()
          Create the 3.0 remote view.
 java.lang.Object createRemoteView21()
          Create the 2.1 remote view.
 void destroy()
          Destroy the context.
 java.security.Identity getCallerIdentity()
          Obsolete method returns null.
 java.security.Principal getCallerPrincipal()
          Returns the principal
 EJBHome getEJBHome()
          Returns the EJBHome stub for the container.
 EJBLocalHome getEJBLocalHome()
          Returns the EJBLocalHome stub for the container.
 EJBLocalObject getEJBLocalObject()
          Returns the local object in the context.
 EJBMetaData getEJBMetaData()
          Returns the EJB's meta data.
 EJBObject getEJBObject()
          Returns the EJBObject stub for the container.
 java.util.Properties getEnvironment()
          Obsolete method which returns the EJB 1.0 environment.
 Handle getHandle()
          Returns the object's handle.
 HomeHandle getHomeHandle()
          Returns the object's home handle.
 java.lang.Class getInvokedBusinessInterface()
           
 EJBObject getRemoteView()
          Returns the underlying bean
 boolean getRollbackOnly()
          Returns true if the current transaction will rollback.
abstract  AbstractServer getServer()
          Returns the server which owns this bean.
 TimerService getTimerService()
          Looks the timer service.
 UserTransaction getUserTransaction()
          Returns the current UserTransaction.
 boolean isCallerInRole(java.security.Identity role)
          Obsolete method returns false.
 boolean isCallerInRole(java.lang.String roleName)
          Returns true if the caller is in the named role.
 boolean isDead()
          Returns true if the context is dead.
 java.lang.Object lookup(java.lang.String name)
          Looks up an object in the current JNDI context.
 void remove()
           
 void setRollbackOnly()
          Forces a rollback of the current transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContext

public AbstractContext()
Method Detail

isDead

public boolean isDead()
Returns true if the context is dead.


getServer

public abstract AbstractServer getServer()
Returns the server which owns this bean.


getEJBMetaData

public EJBMetaData getEJBMetaData()
Returns the EJB's meta data.


getEJBHome

public EJBHome getEJBHome()
Returns the EJBHome stub for the container.

Specified by:
getEJBHome in interface EJBContext

getEJBLocalHome

public EJBLocalHome getEJBLocalHome()
Returns the EJBLocalHome stub for the container.

Specified by:
getEJBLocalHome in interface EJBContext

getHandle

public Handle getHandle()
Returns the object's handle.


getHomeHandle

public HomeHandle getHomeHandle()
Returns the object's home handle.


getEJBLocalObject

public EJBLocalObject getEJBLocalObject()
                                 throws java.lang.IllegalStateException
Returns the local object in the context.

Throws:
java.lang.IllegalStateException

lookup

public java.lang.Object lookup(java.lang.String name)
Looks up an object in the current JNDI context.

Specified by:
lookup in interface EJBContext

getEJBObject

public EJBObject getEJBObject()
Returns the EJBObject stub for the container.


getRemoteView

public EJBObject getRemoteView()
Returns the underlying bean


createRemoteHomeView

public EJBHome createRemoteHomeView()
Create the home view.


createLocalHome

public EJBLocalHome createLocalHome()
Create the local home view.


createRemoteView21

public java.lang.Object createRemoteView21()
Create the 2.1 remote view.


createRemoteView

public java.lang.Object createRemoteView()
Create the 3.0 remote view.


getEnvironment

public java.util.Properties getEnvironment()
Obsolete method which returns the EJB 1.0 environment.

Specified by:
getEnvironment in interface EJBContext

getCallerIdentity

public java.security.Identity getCallerIdentity()
Obsolete method returns null.

Specified by:
getCallerIdentity in interface EJBContext

getCallerPrincipal

public java.security.Principal getCallerPrincipal()
Returns the principal

Specified by:
getCallerPrincipal in interface EJBContext

isCallerInRole

public boolean isCallerInRole(java.security.Identity role)
Obsolete method returns false.

Specified by:
isCallerInRole in interface EJBContext

isCallerInRole

public boolean isCallerInRole(java.lang.String roleName)
Returns true if the caller is in the named role.

Specified by:
isCallerInRole in interface EJBContext

remove

public void remove()
            throws RemoveException
Throws:
RemoveException

getUserTransaction

public UserTransaction getUserTransaction()
                                   throws java.lang.IllegalStateException
Returns the current UserTransaction. Only Session beans with bean-managed transactions may use this.

Specified by:
getUserTransaction in interface EJBContext
Throws:
java.lang.IllegalStateException

getTimerService

public TimerService getTimerService()
                             throws java.lang.IllegalStateException
Looks the timer service.

Specified by:
getTimerService in interface EJBContext
Throws:
java.lang.IllegalStateException

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException
Forces a rollback of the current transaction.

Specified by:
setRollbackOnly in interface EJBContext
Throws:
java.lang.IllegalStateException

getRollbackOnly

public boolean getRollbackOnly()
                        throws java.lang.IllegalStateException
Returns true if the current transaction will rollback.

Specified by:
getRollbackOnly in interface EJBContext
Throws:
java.lang.IllegalStateException

destroy

public void destroy()
             throws java.lang.Exception
Destroy the context.

Throws:
java.lang.Exception

getInvokedBusinessInterface

public java.lang.Class getInvokedBusinessInterface()
                                            throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

__caucho_setInvokedBusinessInterface

public void __caucho_setInvokedBusinessInterface(java.lang.Class invokedBusinessInterface)

__caucho_timeout_callback

public void __caucho_timeout_callback(Timer timer)
Runs the timeout callbacks.