/** * Get the initial naming context. */ public InitialContext getInitialContext() { return ctx.getInitialContext(); }
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 ; }
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 DelegatingClassLoader.ClassFinder getClassFinder(String raName) { List<DelegatingClassLoader.ClassFinder> delegates = globalConnectorCL.getDelegates(); DelegatingClassLoader.ClassFinder classFinder = null; for(DelegatingClassLoader.ClassFinder cf : delegates){ if(raName.equals(((ConnectorClassFinder)cf).getResourceAdapterName())){ classFinder = cf; break; } } return classFinder; }
static Config chooseConfig(final Target targetService, Config config, final String target) { Config targetConfig = targetService.getConfig(target); if (targetConfig != null) { config = targetConfig; } return config; }
/** * Get the server instance name */ public String getInstanceName() { return ctx.getInstanceName(); }
/** * {@inheritDoc} */ public DelegatingClassLoader getConnectorClassLoader() { return clh.getConnectorClassLoader(null); }
public boolean isPasswordAlias(String alias) { // Check if the passed string is specified using the alias syntax String aliasName = RelativePathResolver.getAlias(alias); return (aliasName != null); }
@Override public DelegatingClassLoader run() { return new DelegatingClassLoader(earLibCl); } });
private synchronized static RelativePathResolver getInstance() { if (_instance == null) { _instance = new RelativePathResolver(); } return _instance; }
public String resolve(String path) { return resolve(path, true); } /**
@Override protected URL findResource(String name) { for (ClassFinder d : delegates) { URL u = d.findResource(name); if (u!=null) return u; } return null; }
/** * Get the server command-line arguments */ public String[] getCmdLineArgs() { return ctx.getCmdLineArgs(); }
public Object run() throws Exception { return clh.getAppLibClassFinder(appLibs); } });
public EjbWebServiceServlet() { super(); if (org.glassfish.internal.api.Globals.getDefaultHabitat() != null) { secServ = org.glassfish.internal.api.Globals.get(SecurityService.class); } }
public SerialInitContextFactory() { // Issue 14396 ServiceLocator temp = defaultServices; if (temp == null) { temp = Globals.getDefaultHabitat() ; } if (temp == null) { // May need to initialize hk2 component model in standalone client temp = Globals.getStaticHabitat() ; } services = temp ; }
static Config updateConfigIfNeeded(final Config initConfig, final Target targetUtil, final String target) { Config result = initConfig; Config newConfig = targetUtil.getConfig(target); if (newConfig!=null) { result = newConfig; } return result; }
private synchronized static RelativePathResolver getInstance() { if (_instance == null) { _instance = new RelativePathResolver(); } return _instance; }