Package org.glassfish.api.admin

Examples of org.glassfish.api.admin.ProcessEnvironment


           
            ModulesRegistry modulesRegistry = new StaticModulesRegistry(ACCModulesManager.class.getClassLoader());
            config.addActiveDescriptor(BuilderHelper.createConstantDescriptor(modulesRegistry));
           
            config.addActiveDescriptor(BuilderHelper.createConstantDescriptor(
                    new ProcessEnvironment(ProcessEnvironment.ProcessType.ACC)));

            /*
             * Create the ClientNamingConfigurator used by naming.
             */
            ClientNamingConfigurator cnc = new ClientNamingConfiguratorImpl();
View Full Code Here


            return obj;
        } catch (NamingException ex) {

            ServiceLocator services = Globals.getDefaultHabitat();
            ProcessEnvironment processEnv = services.getService(ProcessEnvironment.class);
            if( fullName.startsWith("java:app/") &&
                processEnv.getProcessType() == ProcessType.ACC ) {

                // This could either be an attempt by an app client to access a portable
                // remote session bean JNDI name via the java:app namespace or a lookup of
                // an application-defined java:app environment dependency.  Try them in
                // that order.
View Full Code Here

        }
       
        if( testMode ) {
            processType = ProcessType.Server;
        } else {
            ProcessEnvironment processEnv = services.getService(ProcessEnvironment.class);
            if (processEnv == null) {
                processEnv = services.create(ProcessEnvironment.class);
                services.inject(processEnv);
                services.postConstruct(processEnv);
            }
           
            processType = processEnv.getProcessType();
        }

        // using these two temp variables allows instance variables
        // to be 'final'.
        JavaURLContext urlContextTemp = null;
View Full Code Here

        }

        Properties jtsProperties = new Properties();
        if (habitat != null) {
            jtsProperties.put(HABITAT, habitat);
            ProcessEnvironment processEnv = habitat.getComponent(ProcessEnvironment.class);
            if( processEnv.getProcessType().isServer()) {
                TransactionService txnService = habitat.getComponent(TransactionService.class);

                if (txnService != null) {
                    jtsProperties.put(Configuration.HEURISTIC_DIRECTION, txnService.getHeuristicDecision());
                    jtsProperties.put(Configuration.KEYPOINT_COUNT, txnService.getKeypointInterval());
View Full Code Here

        if (force || (isValueSet(value) && "true".equals(value))) {
            recoveryInitialized = true;

            Habitat habitat = (Habitat)properties.get(HABITAT);
            if (habitat != null) {
                ProcessEnvironment processEnv = habitat.getComponent(ProcessEnvironment.class);
                if( processEnv.getProcessType().isServer()) {
                    value = properties.getProperty("pending-txn-cleanup-interval");
                    int interval = -1;
                    if (isValueSet(value)) {
                        interval = Integer.parseInt(value);
                    }
View Full Code Here

        config.addUnbindFilter(BuilderHelper.createContractFilter(ProcessEnvironment.class.getName()));

        config.addActiveDescriptor(BuilderHelper.createConstantDescriptor(
                env.isEmbedded() ?
                new ProcessEnvironment(ProcessEnvironment.ProcessType.Embedded):
                new ProcessEnvironment(ProcessEnvironment.ProcessType.Server)));
        config.commit();

        // activate the run level services
        if (proceedTo(InitRunLevel.VAL, new InitActivator())) {
            if (proceedTo(StartupRunLevel.VAL, new StartupActivator())) {
View Full Code Here

        config.addUnbindFilter(BuilderHelper.createContractFilter(ProcessEnvironment.class.getName()));

        config.addActiveDescriptor(BuilderHelper.createConstantDescriptor(
                env.isEmbedded() ?
                new ProcessEnvironment(ProcessEnvironment.ProcessType.Embedded):
                new ProcessEnvironment(ProcessEnvironment.ProcessType.Server)));
        config.commit();
       
       

        // activate the run level services
View Full Code Here

     * Constructs an <code>IIOPSSLSocketFactory</code>
     */
    public IIOPSSLSocketFactory() {
        try {
           
            ProcessEnvironment penv = null;
            ProcessType processType = null;
            boolean notServerOrACC =  Globals.getDefaultHabitat() == null ? true : false;
            if (!notServerOrACC) {
                penv = Globals.get(ProcessEnvironment.class);
                processType = penv.getProcessType();
            }
            //if (Switch.getSwitch().getContainerType() == Switch.EJBWEB_CONTAINER) {
            if((processType != null) && (processType.isServer())) {
                //this is the EJB container
                IiopService iiopBean = Globals.getDefaultHabitat().getComponent(IiopService.class);
View Full Code Here

            h ) ;
        habitat = h;

        iiopUtils = habitat.getComponent(IIOPUtils.class);

        ProcessEnvironment processEnv = habitat.getComponent(
            ProcessEnvironment.class);

        processType = processEnv.getProcessType();

        initProperties();
    }
View Full Code Here

            h ) ;
        habitat = h;

        iiopUtils = habitat.getComponent(IIOPUtils.class);

        ProcessEnvironment processEnv = habitat.getComponent(
            ProcessEnvironment.class);

        processType = processEnv.getProcessType();

        initProperties();
    }
View Full Code Here

TOP

Related Classes of org.glassfish.api.admin.ProcessEnvironment

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.