Package com.sun.ejb

Examples of com.sun.ejb.ComponentContext


                    ("Invocation cannot be null");

            int invType = inv.getInvocationType();
            if( invType == ComponentInvocation.EJB_INVOCATION ) {
                if ( inv instanceof Invocation ) {
                    ComponentContext context = ((Invocation) inv).context;
                    // Delegate check to EJB context.  Let any
                    // IllegalStateException bubble up.
                    context.checkTimerServiceMethodAccess();
                    allowed = true;
                } else {
                    // NOTE : There shouldn't be any cases where an EJB
                    // container uses com.sun.enterprise.ComponentInvocation
                    // instead of com.sun.ejb.Invocation and timer method
View Full Code Here


        new Object[] { methodBefore, inv.method }));
        throw inv.exception;
                }
      }

            ComponentContext ctx = container.getContext(inv);
            inv.context  = ctx;
            inv.ejb      = ctx.getEJB();
            inv.instance = inv.ejb;

            container.preInvokeTx(inv);

            // Enterprise Bean class doesn't necessarily implement
View Full Code Here

    public List getExistingResourceList(Object instance, ComponentInvocation inv) {
       if (inv == null)
           return null;
        List l = null;
        if (inv.getInvocationType() == ComponentInvocation.EJB_INVOCATION) {
            ComponentContext ctx = inv.context;
            if (ctx != null)
                l = ctx.getResourceList();
            return l;
        }
        else {
            Object key = getInstanceKey(instance);
            if (key == null)
View Full Code Here

    public List getResourceList(Object instance, ComponentInvocation inv) {
        if (inv == null)
            return new ArrayList(0);
        List l = null;
        if (inv.getInvocationType() == ComponentInvocation.EJB_INVOCATION) {
            ComponentContext ctx = inv.context;
            if (ctx != null)
                l = ctx.getResourceList();
            else {
          l = new ArrayList(0);
            }
        }
        else {
View Full Code Here

            _logger.log(Level.FINE, "Passivating SFSBs before container shutdown");

            sessionBeanCache.shutdown();

            while (true) {
                ComponentContext ctx = null;
                synchronized (asyncTaskSemaphore) {
                    int sz = passivationCandidates.size();
                    if (sz > 0) {
                        ctx = (ComponentContext)
                                passivationCandidates.remove(sz - 1);
View Full Code Here

                                    currentThread.setContextClassLoader(myClassLoader);
                                    return null;
                                }
                            });
                }
                ComponentContext ctx = null;

                do {
                    synchronized (asyncTaskSemaphore) {
                        int sz = passivationCandidates.size();
                        if (sz > 0) {
View Full Code Here

            // Cache value of txManager.getStatus() in invocation to avoid
            // multiple thread-local accesses of that value during pre-invoke
            // stage.
            inv.setPreInvokeTxStatus(transactionManager.getStatus());

            ComponentContext ctx = getContext(inv);
            inv.context = ctx;
           
            inv.instance = inv.ejb = ctx.getEJB();
            InvocationInfo info = inv.invocationInfo;
           
            inv.useFastPath = (info.isTxRequiredLocalCMPField) && (inv.foundInTxCache);
            //    _logger.log(Level.INFO, "Use fastPath() ==> " + info.method);
           
View Full Code Here

            }
           
            sessionBeanCache.shutdown();

            while (true) {
                ComponentContext ctx = null;
                synchronized (asyncTaskSemaphore) {
                    int sz = passivationCandidates.size();
                    if (sz > 0) {
                        ctx = (ComponentContext)
                                passivationCandidates.remove(sz - 1);
View Full Code Here

                                    currentThread.setContextClassLoader(myClassLoader);
                                    return null;
                                }
                            });
                }
                ComponentContext ctx = null;

                do {
                    synchronized (asyncTaskSemaphore) {
                        int sz = passivationCandidates.size();
                        if (sz > 0) {
View Full Code Here

        // this method in the ReadOnlyBean case should be a no-op
        // and should not throw any exception.
    }
   
    protected ComponentContext _getContext(EjbInvocation inv) {
        ComponentContext ctx = super._getContext(inv);

        InvocationInfo info = inv.invocationInfo; // info cannot be null
        if (info.isTxRequiredLocalCMPField) {
            if (! inv.foundInTxCache) {
                EntityContextImpl entityCtx = (EntityContextImpl) ctx;
View Full Code Here

TOP

Related Classes of com.sun.ejb.ComponentContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.