Refine search
public static RealmsManager getRealmsManager() { final RealmsManager mgr = Globals.getDefaultHabitat().getService(RealmsManager.class); return mgr; }
public WebServiceContextImpl() { if (Globals.getDefaultHabitat() != null) { secServ = Globals.get(org.glassfish.webservices.SecurityService.class); } }
public SerialInitContextFactory() { // Issue 14396 Habitat temp = defaultHabitat ; if (temp == null) { temp = Globals.getDefaultHabitat() ; } if (temp == null) { // May need to initialize hk2 component model in standalone client temp = Globals.getStaticHabitat() ; } habitat = temp ; }
public AbstractEjbHandler() { Habitat h = Globals.getDefaultHabitat(); if( h != null ) { provider = h.getComponent(AnnotationTypesProvider.class, "EJB"); } } /**
services = Globals.getStaticHabitat(); processType = ProcessType.Server; } else { ProcessEnvironment processEnv = services.getService(ProcessEnvironment.class); if (processEnv == null) { processEnv = services.create(ProcessEnvironment.class); services.inject(processEnv); services.postConstruct(processEnv);
if (Globals.getDefaultHabitat() == null) { Globals.setDefaultHabitat(habitat); habitat.getService(EnableSecureAdminCommand.class); stage = "upgrading secure admin set-up"; try {
protected BaseContainerCallbackHandler() { if(Globals.getDefaultHabitat() == null){ sslUtils = new SSLUtils(); secSup = SecuritySupport.getDefaultInstance(); masterPasswordHelper = null; sslUtils.postConstruct(); } else { sslUtils = Globals.getDefaultHabitat().getComponent(SSLUtils.class); secSup = Globals.getDefaultHabitat().getByContract(SecuritySupport.class); masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service"); } }
private void initServletInterceptors() { try { ServiceLocator services = org.glassfish.internal.api.Globals.getDefaultHabitat(); interceptors = services.getAllServices(ServletContainerInterceptor.class); } catch (Throwable th) { log.log(Level.SEVERE, LogFacade.FAILED_TO_INITIALIZE_THE_INTERCEPTOR, th); } }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); //Initialize the transients that were passed at ctor. Habitat defaultHabitat = Globals.getDefaultHabitat(); invMgr = defaultHabitat.getByContract(InvocationManager.class); compEnvMgr = defaultHabitat.getByContract(ComponentEnvManager.class); }
habitat = Globals.getStaticHabitat(); processType = ProcessType.Server; } else { ProcessEnvironment processEnv = habitat.getComponent(ProcessEnvironment.class); processType = processEnv.getProcessType(); if (_logger.isLoggable(Level.FINE)) { ServerContext sc = habitat.getByContract(ServerContext.class); if (sc != null) { commonCL = sc.getCommonClassLoader();
protected ActionReport getReport() { // First of all, we can't get a reference to GlassFish service when server is stopping, because // GlassFish is first unregistered from registry when shutdown is called. Even if we we cache a reference to // GlassFish during startup, we can't use GlassFish.getService, because GlassFish would be in stopping state // and that would lead to IllegalStateException. So, use the ugly Globals API. return Globals.get(ActionReport.class); }
private void initSSLUtils() { if (sslUtils == null) { if (Globals.getDefaultHabitat() != null) { sslUtils = Globals.getDefaultHabitat().getByType(SSLUtils.class); } else { sslUtils = new SSLUtils(); sslUtils.postConstruct(); } } } }
static private Habitat getHabitat() { Habitat habitat = Globals.getStaticHabitat(); StartupContext startupContext = new StartupContext(); habitat.add(new ExistingSingletonInhabitant(startupContext)); habitat.addComponent(null, new ProcessEnvironment(ProcessEnvironment.ProcessType.Other)); return habitat; } }
public static ServiceLocator getStaticBaseServiceLocator() { return getStaticHabitat(); }
@Override protected void validate() throws CommandException { super.validate(); Globals.setDefaultHabitat(habitat); installDir = resolver.resolve(installDir); }
public static WebServiceContractImpl getInstance() { // Create the instance first to access the logger. wscImpl = Globals.getDefaultHabitat().getComponent( WebServiceContractImpl.class); return wscImpl; }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); //Initialize the transients that were passed at ctor. Habitat defaultHabitat = Globals.getDefaultHabitat(); txManager = defaultHabitat.getByContract(TransactionManager.class); invMgr = defaultHabitat.getByContract(InvocationManager.class); compEnvMgr = defaultHabitat.getByContract(ComponentEnvManager.class); callFlowAgent = defaultHabitat.getByContract(CallFlowAgent.class); }
public IORToSocketInfoImpl() { selector = Globals.get(SecurityMechanismSelector.class); }
S1ASThreadPoolManager() { try { _iiopUtils = Globals.getDefaultHabitat().getByType(IIOPUtils.class); Collection<com.sun.grizzly.config.dom.ThreadPool> tpCol = _iiopUtils.getAllThreadPools(); com.sun.grizzly.config.dom.ThreadPool[] allThreadPools = tpCol.toArray(new com.sun.grizzly.config.dom.ThreadPool[tpCol.size()]); for (int i = 0; i < allThreadPools.length; i++) { createThreadPools(allThreadPools[i], i); } defaultID = (String) indexToIdTable.get(new Integer(0)); } catch (NullPointerException npe) { _logger.log(Level.FINE, "Server Context is NULL. Ignoring and proceeding."); } }