Package com.sun.enterprise

Examples of com.sun.enterprise.InvocationManager


            throw new IllegalStateException
                ("EJBTimerService is not available");
        }

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

            ComponentInvocation inv = invManager.getCurrentInvocation();
            if (inv == null)
                throw new IllegalStateException
                    ("Invocation cannot be null");

            int invType = inv.getInvocationType();
View Full Code Here


        Transaction transaction = context_.getTransaction();

        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

   
    private void doInit(ServletConfig servletConfig) throws ServletException {
        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();
View Full Code Here

                    implementor = createImplementor(targetEndpoint);
                    implementorCache_.put(targetEndpoint, implementor);
                }
            }

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

        } catch(Throwable t) {
/* XXX FIXME
            JAXRPCServletException jse = new JAXRPCServletException
View Full Code Here

    }

    public Principal getUserPrincipal() {
        // This could be an EJB endpoint; check the threadlocal variable
        Switch sw = Switch.getSwitch();
        InvocationManager mgr = sw.getInvocationManager();
        Object o = mgr.getCurrentInvocation().getContainerContext();
        if (o instanceof StatelessSessionContainer) {
            WebPrincipal p = (WebPrincipal) principal.get();
            if (p != null) {
                return p;
            }
View Full Code Here

        return ctx.getCallerPrincipal();
    }

     public boolean isUserInRole(String role) {
        Switch sw = Switch.getSwitch();
        InvocationManager mgr = sw.getInvocationManager();
        Object o = mgr.getCurrentInvocation().getContainerContext();
        if(o instanceof StatelessSessionContainer) {
            StatelessSessionContainer cont = (StatelessSessionContainer) o;
            boolean res = cont.getSecurityManager().isCallerInRole(role);
            return res;
        } else if (o instanceof WebModule) {
View Full Code Here

    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
View Full Code Here

        servletConfig_ = servletConfig;
        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();
View Full Code Here

     * This is required since an application thread might end up in starting
     * a container. Thread pools managed by that container should not
     * inherit the properties by the application, since both are unrelated.
     */
    private ComponentInvocation preInvoke() {
        InvocationManager im = Switch.getSwitch().getInvocationManager();
        ComponentInvocation dummy =
        new ComponentInvocation(ComponentInvocation.SERVICE_STARTUP);
        im.preInvoke(dummy);
        return dummy;
    }
View Full Code Here

    /**
     * See the comment on preInvoke.
     */
    private void postInvoke(ComponentInvocation dummy) {
        InvocationManager im = Switch.getSwitch().getInvocationManager();
        im.postInvoke(dummy);
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.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.