Package org.glassfish.api.naming

Examples of org.glassfish.api.naming.NamingClusterInfo


        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;

        if (useLB && !initialized) {
            synchronized( SerialInitContextFactory.class ) {
                if (!initialized) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                    namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                    membershipChangeForced = true ;
                    initialized = true ;
                }
            }
        }

        if (useLB || initialized)  {
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                // If the IIOP endpoint list is explicitly set in the env,
                // update rrPolicy to use that information, otherwise just
                // rotate rrPolicy to the next element.
                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }
                if (myEnv.containsKey( IIOP_ENDPOINTS_PROPERTY ) ||
                    myEnv.containsKey( LOAD_BALANCING_PROPERTY )) {
                    synchronized( SerialInitContextFactory.class ) {
                        namingClusterInfo.setClusterInstanceInfo(myEnv, defaultHost, defaultPort, membershipChangeForced);
                    }
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here


        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;

        if (useLB && !initialized) {
            synchronized( SerialInitContextFactory.class ) {
                if (!initialized) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                    namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                    membershipChangeForced = true ;
                    initialized = true ;
                }
            }
        }

        if (useLB || initialized)  {
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                // If the IIOP endpoint list is explicitly set in the env,
                // update rrPolicy to use that information, otherwise just
                // rotate rrPolicy to the next element.
                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }
                if (myEnv.containsKey( IIOP_ENDPOINTS_PROPERTY ) ||
                    myEnv.containsKey( LOAD_BALANCING_PROPERTY )) {
                    synchronized( SerialInitContextFactory.class ) {
                        namingClusterInfo.setClusterInstanceInfo(myEnv, defaultHost, defaultPort, membershipChangeForced);
                    }
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;

        if (useLB && !initialized) {
            synchronized( SerialInitContextFactory.class ) {
                if (!initialized) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                    namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                    membershipChangeForced = true ;
                    initialized = true ;
                }
            }
        }

        if (useLB && initialized)  {
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                // If the IIOP endpoint list is explicitly set in the env,
                // update rrPolicy to use that information, otherwise just
                // rotate rrPolicy to the next element.
                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }
                if (myEnv.containsKey( IIOP_ENDPOINTS_PROPERTY ) ||
                    myEnv.containsKey( LOAD_BALANCING_PROPERTY )) {
                    synchronized( SerialInitContextFactory.class ) {
                        namingClusterInfo.setClusterInstanceInfo(myEnv, defaultHost, defaultPort, membershipChangeForced);
                    }
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;

        if (useLB && !initialized) {
            synchronized( SerialInitContextFactory.class ) {
                if (!initialized) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                    namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                    membershipChangeForced = true ;
                    initialized = true ;
                }
            }
        }

        if (useLB && initialized)  {
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                // If the IIOP endpoint list is explicitly set in the env,
                // update rrPolicy to use that information, otherwise just
                // rotate rrPolicy to the next element.
                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }
                if (myEnv.containsKey( IIOP_ENDPOINTS_PROPERTY ) ||
                    myEnv.containsKey( LOAD_BALANCING_PROPERTY )) {
                    synchronized( SerialInitContextFactory.class ) {
                        namingClusterInfo.setClusterInstanceInfo(myEnv, defaultHost, defaultPort, membershipChangeForced);
                    }
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;


        if (useLB)  {
           if (!initialized) {
                 synchronized( SerialInitContextFactory.class ) {
                     if (!initialized) {
                         namingClusterInfo = services.getService(NamingClusterInfo.class);
                         namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                         initialized = true ;
                     }
                 }
             }
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here

        if (logger.isLoggable(Level.FINE)) {
            logger.log(Level.FINE, "getInitialContext: env={0}", env);
        }
        boolean useLB = propertyIsSet(myEnv, IIOP_ENDPOINTS_PROPERTY)
            || propertyIsSet(myEnv, LOAD_BALANCING_PROPERTY) ;
        NamingClusterInfo namingClusterInfo = null;


        if (useLB)  {
           if (!initialized) {
                 synchronized( SerialInitContextFactory.class ) {
                     if (!initialized) {
                         namingClusterInfo = services.getService(NamingClusterInfo.class);
                         namingClusterInfo.initGroupInfoService(myEnv, defaultHost, defaultPort, getORB(), services);
                         initialized = true ;
                     }
                 }
             }
            // If myEnv already contains the IIOP_URL, don't get a new one:
            // this getInitialContext call came from an internal
            // new InitialContext call.
            if (!myEnv.containsKey(IIOP_URL_PROPERTY)) {
                Context ctx = SerialContext.getStickyContext() ;
                if (ctx != null) {
                    return ctx ;
                }

                if(namingClusterInfo == null) {
                    namingClusterInfo = services.getService(NamingClusterInfo.class);
                }

                List<String> rrList = namingClusterInfo.getNextRotation();
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "getInitialContext: RoundRobinPolicy list = {0}", rrList);
                }
                myEnv.put(IIOP_URL_PROPERTY, getCorbalocURL(rrList));
            }
View Full Code Here

TOP

Related Classes of org.glassfish.api.naming.NamingClusterInfo

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.