Package com.sun.enterprise

Examples of com.sun.enterprise.ComponentInvocation


        try {
            InvocationManager invManager =
                Switch.getSwitch().getInvocationManager();

            ComponentInvocation inv = invManager.getCurrentInvocation();
            if (inv == null)
                throw new IllegalStateException
                    ("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.
View Full Code Here


        if( transaction == null ) {
            logger.log(Level.FINE, "Context transaction = null. Using " +
                       "invocation instead.");
            InvocationManager iMgr = Switch.getSwitch().getInvocationManager();
            ComponentInvocation i = iMgr.getCurrentInvocation();
            transaction = i.transaction;
        }
        if( transaction == null ) {
            throw new Exception("transaction = null in getContainerSynch " +
                                "for timerId = " + getTimerId());
View Full Code Here

        /** create a ComponentInvocation for this module during startup;
         *  as otherwise during Initialization ServerContext is not fully
         *  established.
         */
        lcmInvocation = new ComponentInvocation(slcl, invContext);
        postEvent(LifecycleEvent.STARTUP_EVENT, props, ctx.getInvocationManager());
    }
View Full Code Here

                }
            }

            InvocationManager invManager =
                Switch.getSwitch().getInvocationManager();
            ComponentInvocation inv = invManager.getCurrentInvocation();
            inv.setWebServiceTie(implementor.getTie());

        } catch(Throwable t) {
/* XXX FIXME
            JAXRPCServletException jse = new JAXRPCServletException
                ("error.implementorFactory.newInstanceFailed",
View Full Code Here

                // In that case the JDBC connection would have autoCommit=true
                // so the container doesnt have to do anything.
                throw new IllegalStateException("No transaction context.");
            }
           
            ComponentInvocation compInv = container.invocationManager.getCurrentInvocation();
            checkActivatePassivate(compInv);

            if (compInv instanceof Invocation) {
                Invocation inv = (Invocation) compInv;
                if (inv.invocationInfo != null) {
View Full Code Here

            if ( status == Status.STATUS_NO_TRANSACTION ) {
                // EJB which was invoked without a global transaction.
                throw new IllegalStateException("No transaction context.");
            }
           
            ComponentInvocation compInv = container.invocationManager.getCurrentInvocation();
            checkActivatePassivate(compInv);
            if (compInv instanceof Invocation) {
                Invocation inv = (Invocation) compInv;
                if (inv.invocationInfo != null) {
                    switch (inv.invocationInfo.txAttr) {
View Full Code Here

    public QName[] getHeaders() {
        return new QName[0];
    }

    public boolean handleRequest(MessageContext context) {
        ComponentInvocation inv = null;

        try {
            Switch theSwitch = Switch.getSwitch();
            InvocationManager invManager = theSwitch.getInvocationManager();
            inv = invManager.getCurrentInvocation();

            Method method = wsUtil.getInvMethod(inv.getWebServiceTie(),
                                                context);

            // Result can be null for some error cases.  This will be
            // handled by jaxrpc runtime so we don't treat it as an exception.
            if( method != null ) {
                inv.setWebServiceMethod(method);
            } else {
                inv.setWebServiceMethod(null);
            }

        } catch(Exception e) {
            logger.log(Level.WARNING, "preWebHandlerError", e);
            wsUtil.throwSOAPFaultException(e.getMessage(), context);
View Full Code Here

        String servletName = "unknown";
       
        try {
            InvocationManager invManager =
                Switch.getSwitch().getInvocationManager();
            ComponentInvocation inv = invManager.getCurrentInvocation();
            Object containerContext = inv.getContainerContext();

            WebBundleDescriptor webBundle = (WebBundleDescriptor)
                Switch.getSwitch().getDescriptorFor(containerContext);
            classLoader = Thread.currentThread().getContextClassLoader();
            servletName = servletConfig.getServletName();
View Full Code Here

        String servletName = "unknown";

        try {
            InvocationManager invManager =
                Switch.getSwitch().getInvocationManager();
            ComponentInvocation inv = invManager.getCurrentInvocation();
            Object containerContext = inv.getContainerContext();

            WebBundleDescriptor webBundle = (WebBundleDescriptor)
                Switch.getSwitch().getDescriptorFor(containerContext);
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            servletName = servletConfig.getServletName();
View Full Code Here

                // always creates a new ArrayList
                InvocationArray result = new InvocationArray();
                InvocationArray v = (InvocationArray) parentValue;
                if (v.size() > 0 && v.outsideStartup()) {
                    // get current invocation
                    ComponentInvocation parentInv =
                        (ComponentInvocation) v.get(v.size()-1);
                    if (parentInv.getInvocationType() ==
                        parentInv.SERVLET_INVOCATION) {

                        ComponentInvocation inv =
                            new ComponentInvocation(null,
                                            parentInv.getContainerContext());
                        result.add(inv);
                    } else if (parentInv.getInvocationType() != parentInv.EJB_INVOCATION) {
      // Push a copy of invocation onto the new result ArrayList
      ComponentInvocation cpy =
          new ComponentInvocation
          ( parentInv.getInstance(),
            parentInv.getContainerContext());
      cpy.setTransaction (parentInv.getTransaction());
      result.add(cpy);
        }
       
                }
                return result;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ComponentInvocation

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.