public MethodInvocation(java.lang.Object id,
java.lang.reflect.Method m,
java.lang.Object[] args,
javax.transaction.Transaction tx,
java.security.Principal identity,
java.lang.Object credential)
Create a new instance.
Parameters:
id - The id of target EJB of this method invocation.
m - The method to invoke. This method is declared in the remote or
home interface of the bean.
args - The arguments for this invocation.
tpc - The transaction propagation context of this invocation.
identity - The security identity to use in this invocation.
credential - The security credentials to use in this invocation.
MethodInvocation
public MethodInvocation(java.lang.Object id,
java.lang.reflect.Method m,
java.lang.Object[] args,
java.security.Principal identity,
java.lang.Object credential,
java.lang.Object tpc)
Create a new instance.
Parameters:
id - The id of target EJB of this method invocation.
m - The method to invoke. This method is declared in the remote or
home interface of the bean.
args - The arguments for this invocation.
identity - The security identity to use in this invocation.
credential - The security credentials to use in this invocation.
tpc - The transaction propagation context of this invocation.
Method Detail
getId
public java.lang.Object getId()
getMethod
public java.lang.reflect.Method getMethod()
getArguments
public java.lang.Object[] getArguments()
setTransaction
public void setTransaction(javax.transaction.Transaction tx)
This method sets the transaction associated with the method.
Note that this doesn't mean that the transaction is associated
with the thread. In fact this is the only place it exists until
the TxInterceptor logic. Notably it might be the case that the
tx associated here is different than the one on the target instance.
getTransaction
public javax.transaction.Transaction getTransaction()
Return the transaction associated with the method.
If no transaction is associated with this method but we have
a transaction propagation context, import the TPC into the
transaction manager, and associate the resulting transaction
with this method before returning it.
setPrincipal
public void setPrincipal(java.security.Principal identity)
getPrincipal
public java.security.Principal getPrincipal()
setCredential
public void setCredential(java.lang.Object credential)
Set the enterprise context of this invocation.
Once a context is associated to a Method Invocation,
the MI can pass it all the relevant information.
We set Transaction and Principal.