SSOInterceptorInitializationContext(FilterConfig filterConfig, InitParams initParams, ExoContainerContext containerContext) { this.filterConfig = filterConfig; this.initParams = initParams; this.containerContext = containerContext; this.containerName = containerContext == null ? null : containerContext.getName(); this.initializedFromServletAPI = filterConfig != null; }
public FileCleaner(String prefix, ExoContainerContext ctx, long timeout) { this(ctx == null ? prefix : (prefix == null ? "" : prefix + " ") + ctx.getName(), timeout, true); }
public Thread newThread(Runnable arg0) { return new Thread(arg0, ctx.getName() + "-MailServiceThread-" + mailServiceThreadCounter++); } });
/** * Gives the name of the cluster that will be able to support several portal containers * since the name will be post fixed with "-${container-name}" * @param ctx the context from which we extract the name of the container * @param params the list of initial parameters from which we get the value of the parameter * <code>PARAM_CLUSTER_NAME</code> if it exists otherwise the value will be "RPCService-Cluster" */ private static String getClusterName(ExoContainerContext ctx, InitParams params) { String clusterName = getValueParam(params, PARAM_CLUSTER_NAME); if (clusterName == null) { clusterName = CLUSTER_NAME; } return clusterName += "-" + ctx.getName(); }
public Void run() { context.setName(repositoryContainer.getContext().getName() + "-" + name); return null; } });
public SessionRegistry(ExoContainerContext ctx, RepositoryEntry entry) { sessionsMap = new ConcurrentHashMap<String, SessionImpl>(); if (entry != null) { this.timeOut = entry.getSessionTimeOut() > 0 ? entry.getSessionTimeOut() : DEFAULT_SESSION_TIMEOUT; } this.repositoryId = ctx != null ? ctx.getName() : (entry == null ? null : entry.getName()); }
/** * @param containerContext eXo container context * @param invokerFactory method invoker producer * @throws Exception if can't set instance of {@link RuntimeDelegate} * @see MethodInvokerFactory */ public ResourceBinder(ExoContainerContext containerContext, MethodInvokerFactory invokerFactory) throws Exception { this.invokerFactory = invokerFactory; // Initialize RuntimeDelegate instance // This is first component in life cycle what needs. SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>() { public Void run() { RuntimeDelegate.setInstance(new RuntimeDelegateImpl()); return null; } }); rd = RuntimeDelegate.getInstance(); container = containerContext.getContainer(); this.containerName = containerContext.getName(); }
/** * Constructor. * @param ctx - The {@link ExoContainerContext} in which the {@link LockRemoverHolder} * is registered * @param entry - RepositoryEntry that may contain lock-remover-max-threads parameter. */ public LockRemoverHolder(ExoContainerContext ctx, RepositoryEntry entry) { int threadCount = DEFAULT_THREAD_COUNT; if (entry != null && entry.getLockRemoverThreadsCount() > 0) { threadCount = entry.getLockRemoverThreadsCount(); } workerService = new WorkerService(threadCount, "Lock Remover " + (ctx != null ? ctx.getName() : (entry == null ? "" : entry.getName()))); }
private DataSourceProvider getDataSourceProvider() { ExoContainer container = ExoContainerContext.getCurrentContainer(); if (container == null) { LOG.warn("The current container cannot be found which prevents to retrieve the DataSourceProvider"); return null; } DataSourceProvider dsProvider = (DataSourceProvider)container.getComponentInstanceOfType(DataSourceProvider.class); if (dsProvider == null) { LOG.warn("The DataSourceProvider cannot be found in the container " + container.getContext().getName() + ", it will be considered as non managed "); } return dsProvider; }
/** * If some JGoups properties has been set, it will load the configuration and set * the cluster name by adding as suffix the name of the {@link ExoContainerContext} * * @param config the global configuration from which the JGroups config will be extracted * @param configBuilder the related configuration builder * @throws ExoCacheInitException if any exception occurs while configuring JGroups */ private void configureJGroups(GlobalConfiguration config, GlobalConfigurationBuilder configBuilder) throws ExoCacheInitException { if (loadJGroupsConfig(config, configBuilder)) { // The JGroups Config could be loaded which means that the configuration is for a cluster configBuilder.transport().clusterName(config.transport().clusterName() + "-" + ctx.getName()); } }
public Void run() throws RepositoryConfigurationException { context.setName(parent.getContext().getName() + "-" + name); try { parent.registerComponentInstance(name, RepositoryContainer.this); initAllWorkspaceComponentEntries(parent); registerComponents(); } catch (Throwable t) // NOSONAR { unregisterAllComponents(); parent.unregisterComponent(name); throw new RepositoryConfigurationException("Can not register repository container " + name + " in parent container.", t); } return null; } });
if ("portal".equals(context.getName())) { if (params != null) { producerConfigLocation = computePath(params.getValueParam(PRODUCER_CONFIG_LOCATION).getValue()); } else { log.info("The WSRP service can only be started in the default portal context. WSRP was not started for '" + context.getName() + "'");
gc.globalJmxStatistics().cacheManagerName() + "_" + region + "_" + ctx.getName());
/** * Configure the cache manager * * @param configBuilder the configuration builder on which we applied all the required changes * @throws ExoCacheInitException */ private void configureCacheManager(GlobalConfigurationBuilder configBuilder) throws ExoCacheInitException { GlobalConfiguration config = configBuilder.build(); // Configure JGroups configureJGroups(config, configBuilder); // Configure the name of the cache manager configBuilder.globalJmxStatistics().enable() .cacheManagerName(config.globalJmxStatistics().cacheManagerName() + "_" + ctx.getName()). // Configure the MBeanServerLookup mBeanServerLookup(MBEAN_SERVER_LOOKUP); }
ExoContainer container = ExoContainerContext.getCurrentContainer(); configBuilder.transport().clusterName(gc.transport().clusterName() + "_" + container.getContext().getName()) .globalJmxStatistics() .cacheManagerName(gc.globalJmxStatistics().cacheManagerName() + "_" + container.getContext().getName()). + " and the container " + container.getContext().getName()); + container.getContext().getName());
@SuppressWarnings("unchecked") public DistributedExoCache(ExoContainerContext ctx, ExoCacheConfig config, Cache<K, V> cache) { this.fullName = ctx.getName() + "-" + config.getName(); this.cache = (AdvancedCache<CacheKey<K>, V>)cache.getAdvancedCache(); setDistributed(config.isDistributed()); setLabel(config.getLabel()); setName(config.getName()); setLogEnabled(config.isLogEnabled()); setReplicated(config.isRepicated()); }
this.ownerId = ctx.getName(); if (LOG.isDebugEnabled())