org.openejb
Interface EJBInvocation

All Superinterfaces:
org.apache.geronimo.core.service.Invocation
All Known Implementing Classes:
EJBInvocationImpl, EJBInvocationStream

public interface EJBInvocation
extends org.apache.geronimo.core.service.Invocation

Specialization of Invocation to define attributes specific to the invocation of an EJB. This provides a type-safe mechanism for Interceptors to access EJB specific information; it is the responsibility of the original to ensure the Invocation implementation supports this interface if it is going to be processed by an EJBContainer.

Version:
$Revision: 1.2 $ $Date: 2004/07/18 22:32:19 $

Method Summary
 Object[] getArguments()
          Any arguments to the invocation (e.g.
 EJBInstanceContext getEJBInstanceContext()
          The context representing the actual instance to use for processing this request.
 Object getId()
          The identity of the instance being invoked; for example, the primary key of an Entity EJB.
 int getMethodIndex()
          The index of the virtual EJB operation
 org.apache.geronimo.transaction.context.TransactionContext getTransactionContext()
          Gets the transaction context to use.
 EJBInterfaceType getType()
          The type of invocation, indicating which interface was invoked or which 'special' callback was should be invoked (e.g.
 void setEJBInstanceContext(EJBInstanceContext instanceContext)
          Set the instance context to use
 void setTransactionContext(org.apache.geronimo.transaction.context.TransactionContext transactionContext)
          Setx the transaction context to use.
 
Methods inherited from interface org.apache.geronimo.core.service.Invocation
get, put
 

Method Detail

getMethodIndex

public int getMethodIndex()
The index of the virtual EJB operation

Returns:
the index of the EJB operation being performed

getType

public EJBInterfaceType getType()
The type of invocation, indicating which interface was invoked or which 'special' callback was should be invoked (e.g. ejbTimeout).

Returns:
the type of invocation

getArguments

public Object[] getArguments()
Any arguments to the invocation (e.g. Method parameters).

Returns:
the arguments to the invocation; null indicates no arguments (equivalent to Object[0])

getId

public Object getId()
The identity of the instance being invoked; for example, the primary key of an Entity EJB.

Returns:
the identity of the instance to invoke; may be null for 'class' level operations

getEJBInstanceContext

public EJBInstanceContext getEJBInstanceContext()
The context representing the actual instance to use for processing this request. Is transient, not valid on the client side, and will not be valid on the server side until a suitable instance has been located by an Interceptor

Returns:
the context representing the instance to invoke

setEJBInstanceContext

public void setEJBInstanceContext(EJBInstanceContext instanceContext)
Set the instance context to use

Parameters:
instanceContext - the instance context to use

getTransactionContext

public org.apache.geronimo.transaction.context.TransactionContext getTransactionContext()
Gets the transaction context to use. Eventhough the tx context is available from a thread local we carry it in the invocation context to avoid the extra tx cost.

Returns:
the transaction context to use

setTransactionContext

public void setTransactionContext(org.apache.geronimo.transaction.context.TransactionContext transactionContext)
Setx the transaction context to use. Eventhough the tx context is available from a thread local we carry it in the invocation context to avoid the extra tx cost.

Parameters:
transactionContext - the transaction context to use


Copyright © 1999-2005 OpenEJB. All Rights Reserved.