Package org.glassfish.internal.api

Examples of org.glassfish.internal.api.ServerContext


        Clusters clusters = domain.getClusters();
        if (clusters == null) return false;

        List clusterList = clusters.getCluster();

        ServerContext serverctx = Globals.get(ServerContext.class);
        return JmsRaUtil.isClustered(clusterList, serverctx.getInstanceName());
    }
View Full Code Here


        return getDomainName() + SEPARATOR + getClusterName();
    }

    private String getClusterName() {

        ServerContext serverctx = Globals.get(ServerContext.class);
        String instanceName = serverctx.getInstanceName();

        Domain domain = Globals.get(Domain.class);
        Server server = domain.getServerNamed(instanceName);

        return server.getCluster() != null? server.getCluster().getName(): null;
View Full Code Here

    public void setMdbContainerProperties(){
        MdbContainer mdbc = null;
        try {

            ServerContext sc = Globals.get(ServerContext.class);
            mdbc = Globals.get(MdbContainer.class);

            //com.sun.enterprise.server.ServerContext sc =
              //  com.sun.enterprise.server.ApplicationServer.getServerContext();
View Full Code Here

                    // ServerId in the request will match the new server.
       
                    String serverId = String.valueOf(DEFAULT_SERVER_ID);
                    System.setProperty(J2EE_SERVER_ID_PROP, serverId);
   
                    ServerContext ctx = serviceLocator.getService(ServerContext.class);
                    String instanceName = ctx.getInstanceName();

                    /**
                     * if the auto recovery is true, always transaction logs will be written irrespective of
                     * disable_distributed_transaction_logging.
                     * if the auto recovery is false, then disable_distributed_transaction_logging will be used
View Full Code Here

            }
        }

        orb = orbFromEnv;
        if (services != null) { // can happen in test mode
            ServerContext sc = services.getService(ServerContext.class);
            if (sc != null) {
                commonCL = sc.getCommonClassLoader();
            }
        }
    }
View Full Code Here

    private void setAvailabilityProperties() throws ConnectorRuntimeException {
      if(!isClustered()) return;
        try {
            Domain domain = Globals.get(Domain.class);
            ServerContext serverContext = Globals.get(ServerContext.class);
            Server server = domain.getServerNamed(serverContext.getInstanceName());

            JmsService jmsService = server.getConfig().getJmsService();
            AvailabilityService as = server.getConfig().getAvailabilityService();
            boolean useMasterBroker = true;
            if(as != null && as.getJmsAvailability() != null && ! MASTERBROKER.equalsIgnoreCase(as.getJmsAvailability().getConfigStoreType()))
View Full Code Here

        }
    }

    private boolean isDBEnabled(){
        Domain domain = Globals.get(Domain.class);
        ServerContext serverContext = Globals.get(ServerContext.class);
        Server server = domain.getServerNamed(serverContext.getInstanceName());

        AvailabilityService as = server.getConfig().getAvailabilityService();

        JmsService jmsService = server.getConfig().getJmsService();
View Full Code Here

        Clusters clusters = domain.getClusters();
        if (clusters == null) return false;

        List clusterList = clusters.getCluster();

        ServerContext serverctx = Globals.get(ServerContext.class);
        return JmsRaUtil.isClustered(clusterList, serverctx.getInstanceName());
    }
View Full Code Here

        return getDomainName() + SEPARATOR + getClusterName();
    }

    private String getClusterName() {

        ServerContext serverctx = Globals.get(ServerContext.class);
        String instanceName = serverctx.getInstanceName();

        Domain domain = Globals.get(Domain.class);
        Server server = domain.getServerNamed(instanceName);

        return server.getCluster() != null? server.getCluster().getName(): null;
View Full Code Here

    protected void startResourceAdapter(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
        try{
        if (this.moduleName_.equals(ConnectorRuntime.DEFAULT_JMS_ADAPTER)) {
            if (connectorRuntime.isServer()) {
                Domain domain = Globals.get(Domain.class);
                ServerContext serverContext = Globals.get(ServerContext.class);
                Server server = domain.getServerNamed(serverContext.getInstanceName());
                JmsService jmsService = server.getConfig().getExtensionByType(JmsService.class);
                initializeLazyListener(jmsService);
            }
    //System.setProperty("imq.jmsra.direct.clustered", "true");
                AccessController.doPrivileged
View Full Code Here

TOP

Related Classes of org.glassfish.internal.api.ServerContext

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.