Package com.sun.enterprise

Examples of com.sun.enterprise.Switch


         * outside of EJB container. 
         */
        public Timer getTimer() throws IllegalStateException,
            NoSuchObjectLocalException, EJBException {
            TimerWrapper timer = null;
            Switch theSwitch   = Switch.getSwitch();
            if( theSwitch != null ) {
               
                // Make sure use of timer service methods are allowed
                TimerWrapper.checkCallPermission();

View Full Code Here


                                       Map invocationInfoMap) {
        ejbClass_ = ejbClass;
        serviceEndpointIntfClass_ = serviceEndpointIntfClass;
        endpoint_ = endpoint;
        hasHandlers_ = endpoint.hasHandlers();
        Switch theSwitch = Switch.getSwitch();
        invManager_ = theSwitch.getInvocationManager();
        invocationInfoMap_ = invocationInfoMap;
    }
View Full Code Here

                }
                resourceReference.setAuthorization(resources[i].getAuth());
                ((WebBundleDescriptor)webBundleDescriptor).addResourceReference(resourceReference);
            }
       
            Switch sw = Switch.getSwitch();
            sw.getNamingManager().bindObjects((WebBundleDescriptor)webBundleDescriptor);
            sw.setDescriptorFor(context, (WebBundleDescriptor)webBundleDescriptor);
           
        } catch (Exception exception) {
            context.setAvailable(false);
            String msg = _rb.getString("webcontainer.webModuleDisabled");
            msg = MessageFormat.format(msg,
View Full Code Here

     * Process a "stop" event for this Context.
     */
    protected synchronized void stop() {
        super.stop();
        try {
            Switch sw = Switch.getSwitch();
            NamingManager namingMgr = sw.getNamingManager();
            if (namingMgr != null) {
                namingMgr.unbindObjects((WebBundleDescriptor)
                    webBundleDescriptor);
            }
        } catch (NamingException ex) {
View Full Code Here

        principal.set(p);
    }

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

        super.stop();

        // Remove the descriptor bindings for all the web applications
        // in this virtual server
        Switch sw = Switch.getSwitch();
        Container children[] = findChildren();
        if (children != null) {
            for (int i = 0; i < children.length; i++) {
                sw.removeDescriptorFor(children[i]);
            }
        }
    }
View Full Code Here

    private ComponentInvocation inv;
    private InvocationManager invMgr;
   
    public ResourceInjectorImpl(WebServiceEndpoint ep) {
        //
        Switch theSwitch = Switch.getSwitch();
        invMgr = theSwitch.getInvocationManager();
        inv = invMgr.getCurrentInvocation();
        //
        endpoint = ep;
    }
View Full Code Here

                                 
        endpoint = webServiceEndpoint;
        container  = ejbContainer;
        webServiceEndpointServant = servant;

        Switch theSwitch = Switch.getSwitch();
        invManager = theSwitch.getInvocationManager();
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.Switch

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.