public void initialize(Object service) throws IOException { if (service == null && Globals.getDefaultHabitat() != null) { service = Globals.getDefaultHabitat().getService(SecurityService.class, ServerEnvironment.DEFAULT_INSTANCE_NAME); } if (service instanceof SecurityService) { processServerConfig((SecurityService) service,configMap); } /*else { throw new IOException("invalid configBean type passed to parser"); }*/ }
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); } }
/** * Return instance with all injected values from deserialization if possible */ Object readResolve() throws ObjectStreamException { ServiceLocator h = Globals.getDefaultHabitat(); if (h != null) { return h.getService(UserTransactionImpl.class); } return this; } }
public EjbWebServiceServlet() { super(); if (org.glassfish.internal.api.Globals.getDefaultHabitat() != null) { secServ = org.glassfish.internal.api.Globals.get(SecurityService.class); } }
/** * @return the descriptor instance to associate with this XMLNode */ public Application getDescriptor() { if (descriptor==null) { descriptor = new Application(Globals.getDefaultHabitat()); } return descriptor; }
private static synchronized RealmsManager _getRealmsManager() { if (realmsManager.get() == null) { if(Globals.getDefaultHabitat() != null) { realmsManager = new WeakReference<RealmsManager>(Globals.get(RealmsManager.class)); } else { return null; } } return realmsManager.get(); }
private synchronized static PasswordAliasStore getDomainPasswordAliasStore() { if (domainPasswordAliasStore == null) { domainPasswordAliasStore = Globals.getDefaultHabitat().getService(DomainScopedPasswordAliasStore.class); } return domainPasswordAliasStore; }
public AbstractEjbHandler() { ServiceLocator h = Globals.getDefaultHabitat(); if( h != null ) { provider = h.getService(AnnotationTypesProvider.class, "EJB"); } } /**
public AbstractEjbHandler() { Habitat h = Globals.getDefaultHabitat(); if( h != null ) { provider = h.getComponent(AnnotationTypesProvider.class, "EJB"); } } /**
private void initSSLUtils() { if (sslUtils == null) { if (Globals.getDefaultHabitat() != null) { sslUtils = Globals.getDefaultHabitat().getService(SSLUtils.class); } else { sslUtils = new SSLUtils(); sslUtils.postConstruct(); } } } }
/** * Returns the names of accessible realms. * @return set of realm names */ public static Enumeration getRealmNames() { Habitat habitat = Globals.getDefaultHabitat(); RealmsManager mgr = habitat.getComponent(RealmsManager.class); if (mgr != null) { return mgr.getRealmNames(); } throw new RuntimeException("Unable to locate RealmsManager Service"); }
public String getProtocolBinding() { WSDolSupport dolSupport = Globals.getDefaultHabitat().getComponent(WSDolSupport.class); if (protocolBinding==null) { if (dolSupport!=null) { protocolBinding = dolSupport.getProtocolBinding(null); } } return protocolBinding; }
public String getSoapAddressPrefix() { WSDolSupport dolSupport = Globals.getDefaultHabitat().getComponent(WSDolSupport.class); if (dolSupport!=null) { return dolSupport.getSoapAddressPrefix(protocolBinding); } // anything else should be soap11 return "so`ap"; }
RoleMapper(String appName) { this.appName = appName; secService = Globals.getDefaultHabitat().getComponent(SecurityService.class); defaultP2RMappingClassName = getDefaultP2RMappingClassName(); postConstruct(); }
RoleMapper(String appName) { this.appName = appName; secService = Globals.getDefaultHabitat().getService(SecurityService.class, ServerEnvironment.DEFAULT_INSTANCE_NAME); defaultP2RMappingClassName = getDefaultP2RMappingClassName(); postConstruct(); }
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 ServletWebServiceDelegate (ServletDelegate firstDelegate) { rpcDelegate_ = firstDelegate; rpcFactory_ = JaxRpcObjectFactory.newInstance(); wsEngine_ = WebServiceEngineImpl.getInstance(); if (Globals.getDefaultHabitat() != null) { secServ = Globals.get(org.glassfish.webservices.SecurityService.class); } }
/** * Do all ProtocolManager access lazily and only request orb if it has already been * initialized so that code doesn't make the assumption that an orb is available in * this runtime. */ private ProtocolManager getProtocolManager() { GlassFishORBHelper orbHelper = Globals.getDefaultHabitat().getComponent(GlassFishORBHelper.class); return orbHelper.isORBInitialized() ? orbHelper.getProtocolManager() : null; }
public ContainerCallbackHandler() { if (Globals.getDefaultHabitat() == null || SecurityServicesUtil.getInstance().isACC()) { handler = new ClientContainerCallbackHandler(); } else { handler = new ServerContainerCallbackHandler(); } }