Package org.glassfish.api.invocation

Examples of org.glassfish.api.invocation.InvocationManager


        return null;
    }

    private void checkUserTransactionLookupAllowed() throws NamingException {
        InvocationManager iv = habitat.getService(InvocationManager.class);
        if (iv != null) {
            ComponentInvocation inv = iv.getCurrentInvocation();
            if (inv != null) {
                TransactionOperationsManager toMgr =
                        (TransactionOperationsManager)inv.getTransactionOperationsManager();
                if ( toMgr != null ) {
                    toMgr.userTransactionLookupAllowed();
View Full Code Here


            "org.glassfish.jsp.monitor.probeEmitter",
            new JspProbeEmitterImpl(webModule));

        // Pass BeanManager's ELResolver as ServletContext attribute
        // (see IT 11168)
        InvocationManager invocationMgr =
            webContainer.getInvocationManager();
        WebComponentInvocation inv = new WebComponentInvocation(webModule);
        try {
            invocationMgr.preInvoke(inv);
            JCDIService jcdiService = defaultHabitat.getByContract(JCDIService.class);
            // JCDIService can be absent if weld integration is missing in the runtime, so check for null is needed.
            if (jcdiService != null && jcdiService.isCurrentModuleJCDIEnabled()) {
                jcdiService.setELResolver(servletContext);
            }
        } catch (NamingException e) {
            // Ignore
        } finally {
            invocationMgr.postInvoke(inv);
        }

    }
View Full Code Here

        currentInvocation.setTransactionOperationsManager(preexistingTransactionOperationsManager);
    }

    ComponentInvocation getCurrentInvocation() {
        ServiceLocator serviceLocator = Globals.getDefaultHabitat();
        InvocationManager invocationManager =
                serviceLocator == null ? null : serviceLocator.getService(InvocationManager.class);
        return invocationManager == null ? null : invocationManager.getCurrentInvocation();
    }
View Full Code Here

            return habitat.getComponent(UserTransactionImpl.class);
        }
    }

    private void checkUserTransactionLookupAllowed() throws NamingException {
        InvocationManager iv = habitat.getByContract(InvocationManager.class);
        if (iv != null) {
            ComponentInvocation inv = iv.getCurrentInvocation();
            if (inv != null) {
                TransactionOperationsManager toMgr =
                        (TransactionOperationsManager)inv.getTransactionOperationsManager();
                if ( toMgr != null ) {
                    toMgr.userTransactionLookupAllowed();
View Full Code Here

        currentInvocation.setTransactionOperationsManager(preexistingTransactionOperationsManager);
    }

    ComponentInvocation getCurrentInvocation() {
        ServiceLocator serviceLocator = Globals.getDefaultHabitat();
        InvocationManager invocationManager =
                serviceLocator == null ? null : serviceLocator.getService(InvocationManager.class);
        return invocationManager == null ? null : invocationManager.getCurrentInvocation();
    }
View Full Code Here

        this.invocation = invocation;
    }

    @Override
    protected void beforeHandle() {
        final InvocationManager invocationMgr = V3Module.getInvocationManager();
        invocationMgr.preInvoke(invocation);
    }
View Full Code Here

        invocationMgr.preInvoke(invocation);
    }

    @Override
    protected void postHandle() {
        final InvocationManager invocationMgr = V3Module.getInvocationManager();
        invocationMgr.postInvoke(invocation);
    }
View Full Code Here

        return ((BaseContainer) getContainer()).getUserTransaction();
    }

    public MessageContext getMessageContext() {
        InvocationManager invManager = EjbContainerUtilImpl.getInstance().getInvocationManager();
        try {
            ComponentInvocation inv = invManager.getCurrentInvocation();

            if ((inv != null) && isWebServiceInvocation(inv)) {
                return ((EjbInvocation) inv).messageContext;
            } else {
                throw new IllegalStateException("Attempt to access " +
View Full Code Here

        return ((BaseContainer) getContainer()).getUserTransaction();
    }

    public MessageContext getMessageContext() {
        InvocationManager invManager = EjbContainerUtilImpl.getInstance().getInvocationManager();
        try {
            ComponentInvocation inv = invManager.getCurrentInvocation();

            if ((inv != null) && isWebServiceInvocation(inv)) {
                return ((EjbInvocation) inv).messageContext;
            } else {
                throw new IllegalStateException("Attempt to access " +
View Full Code Here

        this.services = services;
    }

    public void registerInterceptor(Object systemInterceptor) {

        InvocationManager invManager = services.getService(InvocationManager.class);

        ComponentInvocation currentInv = invManager.getCurrentInvocation();

        if(currentInv == null) {
            throw new IllegalStateException("no current invocation");
        } else if (currentInv.getInvocationType() !=
                       ComponentInvocation.ComponentInvocationType.SERVLET_INVOCATION) {
View Full Code Here

TOP

Related Classes of org.glassfish.api.invocation.InvocationManager

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.