Package org.glassfish.api.admin

Examples of org.glassfish.api.admin.ProcessEnvironment


        // remove all existing inhabitant to n
        habitat.removeAllByType(ProcessEnvironment.class);

        if (env.isEmbedded()) {
            habitat.add(new ExistingSingletonInhabitant<ProcessEnvironment>(ProcessEnvironment.class,
                    new ProcessEnvironment(ProcessEnvironment.ProcessType.Embedded)));
        } else {
            habitat.add(new ExistingSingletonInhabitant<ProcessEnvironment>(ProcessEnvironment.class,
                    new ProcessEnvironment(ProcessEnvironment.ProcessType.Server)));
        }

        Map<Class, Long> servicesTiming = new HashMap<Class, Long>();

        // run the init services
View Full Code Here


     * @Override
     */
    public String getInstanceName(){

      if(processType == null){
        ProcessEnvironment pe = Globals.get(ProcessEnvironment.class);
        processType = pe.getProcessType();

        // Only if this RA is running in a server environment and the server
        // is a clustered instance, set the variable instanceName as the real
        // server instance name. Otherwise keep the instance name as null.
        if(processType.isServer()){
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()) {
                    // Start ResourceManager if it hadn't started yet
                    habitat.getComponent(PostStartup.class,"ResourceManager");
                    value = properties.getProperty("pending-txn-cleanup-interval");
                    int interval = -1;
                    if (isValueSet(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
        masterListener.reset();
       
View Full Code Here

        habitat = registry.createHabitat("default");

        StartupContext startupContext = new StartupContext();
        habitat.add(new ExistingSingletonInhabitant(startupContext));

        habitat.addComponent(null, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other));
    }
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

        }
       
        if( testMode ) {
            processType = ProcessType.Server;
        } else {
            ProcessEnvironment processEnv = habitat.getComponent(ProcessEnvironment.class);
            processType = processEnv.getProcessType();
            if (_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE,
                    "Serial Context initializing with process environment {0}",
                    processEnv);
            }
View Full Code Here

            return obj;
        } catch (NamingException ex) {

            Habitat habitat = Globals.getDefaultHabitat();
            ProcessEnvironment processEnv = habitat.getComponent(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

           
            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

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.