Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ejb
Class EnterpriseContext

    java.lang.Object
      org.jboss.ejb.EnterpriseContext

All Implemented Interfaces:
  AllowedOperationsFlags

Direct Known Subclasses:
  EntityEnterpriseContext, MessageDrivenEnterpriseContext, StatefulSessionEnterpriseContext, StatelessSessionEnterpriseContext

public abstract class EnterpriseContext
extends Object
implements AllowedOperationsFlags

The EnterpriseContext is used to associate EJB instances with metadata about it.

Version:
  $Revision: 1.78.2.1 $
Author:
  Rickard Öberg, Marc Fleury, Sebastien Alborini, Juha Lindfors, Ole Husgaard, Thomas Diesler
See Also:
  `StatefulSessionEnterpriseContext`, `StatelessSessionEnterpriseContext`, `EntityEnterpriseContext`

Nested Class Summary
`protected class` | `EnterpriseContext.EJBContextImpl`
`protected class` | `EnterpriseContext.UserTransactionImpl`

Field Summary
`protected static org.jboss.logging.Logger` | `log` Instance logger.

Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
`IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED`

Constructor Summary
`EnterpriseContext(Object instance, Container con)`

Method Summary
`void` | `clear()` before reusing this context we clear it of previous state called by pool.free()
`abstract void` | `discard()`
`Principal` | `getCallerPrincipal()`
`Container` | `getContainer()` Gets the container that manages the wrapped bean.
`abstract javax.ejb.EJBContext` | `getEJBContext()` Get the EJBContext object
`Object` | `getId()`
`Object` | `getInstance()`
`Transaction` | `getTransaction()`
`Object` | `getTxLock()`
`protected boolean` | `isContainerManagedTx()`
`boolean` | `isLocked()`
`protected boolean` | `isUserManagedTx()`
`void` | `lock()`
`void` | `setId(Object id)`
`void` | `setPrincipal(Principal principal)`
`void` | `setTransaction(Transaction transaction)`
`static void` | `setUserTransactionStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener newTsl)` The `setUserTransactionStartedListener` method is called by CachedConnectionManager on start and stop.
`void` | `unlock()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static org.jboss.logging.Logger log

  Instance logger.

Constructor Detail

### EnterpriseContext

    public EnterpriseContext(Object instance,
                             Container con)

Method Detail

### setUserTransactionStartedListener

    public static void setUserTransactionStartedListener(ServerVMClientUserTransaction.UserTransactionStartedListener newTsl)

  The `setUserTransactionStartedListener` method is called by CachedConnectionManager on start and stop. The tsl is notified on UserTransaction.begin so it (the CachedConnectionManager) can enroll connections that are already checked out.

  Parameters:
    `newTsl` - a `ServerVMClientUserTransaction.UserTransactionStartedListener` value

### getInstance

    public Object getInstance()

### getContainer

    public Container getContainer()

  Gets the container that manages the wrapped bean.

### discard

    public abstract void discard()
                          throws RemoteException

  Throws:
    `RemoteException`

### getEJBContext

    public abstract javax.ejb.EJBContext getEJBContext()

  Get the EJBContext object

### setId

    public void setId(Object id)

### getId

    public Object getId()

### getTxLock

    public Object getTxLock()

### setTransaction

    public void setTransaction(Transaction transaction)

### getTransaction

    public Transaction getTransaction()

### setPrincipal

    public void setPrincipal(Principal principal)

### lock

    public void lock()

### unlock

    public void unlock()

### isLocked

    public boolean isLocked()

### getCallerPrincipal

    public Principal getCallerPrincipal()

### clear

    public void clear()

  before reusing this context we clear it of previous state called by pool.free()

### isContainerManagedTx

    protected boolean isContainerManagedTx()

### isUserManagedTx

    protected boolean isUserManagedTx()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.