FileDocCategorySizeDatePackage
ComponentInvocation.javaAPI DocGlassfish v2 API6754Fri May 04 22:33:14 BST 2007com.sun.enterprise

ComponentInvocation

public class ComponentInvocation extends Object
represents a general component invocation
author
Tony Ng

Fields Summary
private static Logger
_logger
public static final int
SERVLET_INVOCATION
public static final int
EJB_INVOCATION
public static final int
APP_CLIENT_INVOCATION
public static final int
UN_INITIALIZED
public static final int
SERVICE_STARTUP
private int
invocationType
public Object
instance
public Object
container
public Transaction
transaction
public com.sun.ejb.ComponentContext
context
public com.sun.enterprise.security.SecurityContext
oldSecurityContext
public Boolean
auth
public boolean
preInvokeDone
private boolean
transactionCompleting
private com.sun.xml.rpc.spi.runtime.Tie
webServiceTie
Used by container within handler processing code.
private Method
webServiceMethod
Constructors Summary
public ComponentInvocation()

    
      
    
public ComponentInvocation(int invocationType)

        this.invocationType = invocationType;
    
public ComponentInvocation(Object instance, Object container)

	this.instance = instance;
	this.container = container;
    
public ComponentInvocation(Object instance, Object container, com.sun.ejb.ComponentContext context)

        this.instance = instance;
        this.container = container;
        this.context = context;
    
Methods Summary
public java.lang.ObjectgetContainerContext()
Return the Container/ServletContext

        return container;
    
public java.lang.ObjectgetInstance()

        return instance;
    
public intgetInvocationType()

        if (invocationType == UN_INITIALIZED) {
            if (container instanceof Context) {
                invocationType = SERVLET_INVOCATION;
                return SERVLET_INVOCATION;
            } else if (container instanceof Container) {
                invocationType = EJB_INVOCATION;
                return EJB_INVOCATION;
            } else {
                invocationType = APP_CLIENT_INVOCATION;
                return APP_CLIENT_INVOCATION;
            }
        }
        else
            return invocationType;
    
public com.sun.enterprise.security.SecurityContextgetOldSecurityContext()
gets the security context of the call that came in before a new context for runas is made

	return oldSecurityContext;
    
public javax.transaction.TransactiongetTransaction()

        return transaction;
    
public java.lang.reflect.MethodgetWebServiceMethod()

        return webServiceMethod;
    
public com.sun.xml.rpc.spi.runtime.TiegetWebServiceTie()

        return webServiceTie;
    
public booleanisTransactionCompleting()

        return transactionCompleting;
    
public voidsetOldSecurityContext(com.sun.enterprise.security.SecurityContext sc)
Sets the security context of the call coming in

	this.oldSecurityContext = sc;
    
public voidsetTransaction(javax.transaction.Transaction tran)

        this.transaction = tran;
    
public voidsetTransactionCompeting(boolean value)

        transactionCompleting = value;
    
public voidsetWebServiceMethod(java.lang.reflect.Method method)

        webServiceMethod = method;
    
public voidsetWebServiceTie(com.sun.xml.rpc.spi.runtime.Tie tie)

        webServiceTie = tie;
    
public java.lang.StringtoString()

        String str = instance + "," + container;
        if (transaction != null) {
            try {
                str += "," + transaction.getStatus();
            } catch (SystemException ex) {
// IASRI 4660742                ex.printStackTrace();
// START OF IASRI 4660742
            _logger.log(Level.SEVERE,"enterprise.system_exception",ex);
// END OF IASRI 4660742
            }
        } else {
            str += ",no transaction";
        }
        return str;