@Override protected void initInternal() throws LifecycleException { if (this.delegate instanceof LifecycleBase) { try { ReflectionUtils.invokeMethod(this.initInternal, this.delegate); } catch (Exception ex) { throw new LifecycleException(ex); } } }
@Override protected RedissonClient buildClient() throws LifecycleException { InitialContext context = null; try { context = new InitialContext(); Context envCtx = (Context) context.lookup("java:comp/env"); return (RedissonClient) envCtx.lookup(jndiName); } catch (NamingException e) { throw new LifecycleException("Unable to locate Redisson instance by name: " + jndiName, e); } finally { if (context != null) { try { context.close(); } catch (NamingException e) { throw new LifecycleException("Unable to close JNDI context", e); } } } }
@Override protected RedissonClient buildClient() throws LifecycleException { InitialContext context = null; try { context = new InitialContext(); Context envCtx = (Context) context.lookup("java:comp/env"); return (RedissonClient) envCtx.lookup(jndiName); } catch (NamingException e) { throw new LifecycleException("Unable to locate Redisson instance by name: " + jndiName, e); } finally { if (context != null) { try { context.close(); } catch (NamingException e) { throw new LifecycleException("Unable to close JNDI context", e); } } } }
@Override protected RedissonClient buildClient() throws LifecycleException { InitialContext context = null; try { context = new InitialContext(); Context envCtx = (Context) context.lookup("java:comp/env"); return (RedissonClient) envCtx.lookup(jndiName); } catch (NamingException e) { throw new LifecycleException("Unable to locate Redisson instance by name: " + jndiName, e); } finally { if (context != null) { try { context.close(); } catch (NamingException e) { throw new LifecycleException("Unable to close JNDI context", e); } } } }
@Override protected RedissonClient buildClient() throws LifecycleException { InitialContext context = null; try { context = new InitialContext(); Context envCtx = (Context) context.lookup("java:comp/env"); return (RedissonClient) envCtx.lookup(jndiName); } catch (NamingException e) { throw new LifecycleException("Unable to locate Redisson instance by name: " + jndiName, e); } finally { if (context != null) { try { context.close(); } catch (NamingException e) { throw new LifecycleException("Unable to close JNDI context", e); } } } }
protected RedissonClient buildClient() throws LifecycleException { Config config = null; try { config = Config.fromJSON(new File(configPath), getClass().getClassLoader()); } catch (IOException e) { // trying next format try { config = Config.fromYAML(new File(configPath), getClass().getClassLoader()); } catch (IOException e1) { log.error("Can't parse json config " + configPath, e); throw new LifecycleException("Can't parse yaml config " + configPath, e1); } } try { return Redisson.create(config); } catch (Exception e) { throw new LifecycleException(e); } }
@Override public void stop() throws LifecycleException { try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } lifecycle.fireLifecycleEvent(STOP_EVENT, null); }
protected RedissonClient buildClient() throws LifecycleException { Config config = null; try { config = Config.fromJSON(new File(configPath), getClass().getClassLoader()); } catch (IOException e) { // trying next format try { config = Config.fromYAML(new File(configPath), getClass().getClassLoader()); } catch (IOException e1) { log.error("Can't parse json config " + configPath, e); throw new LifecycleException("Can't parse yaml config " + configPath, e1); } } try { return Redisson.create(config); } catch (Exception e) { throw new LifecycleException(e); } }
protected RedissonClient buildClient() throws LifecycleException { Config config = null; try { config = Config.fromJSON(new File(configPath), getClass().getClassLoader()); } catch (IOException e) { // trying next format try { config = Config.fromYAML(new File(configPath), getClass().getClassLoader()); } catch (IOException e1) { log.error("Can't parse json config " + configPath, e); throw new LifecycleException("Can't parse yaml config " + configPath, e1); } } try { return Redisson.create(config); } catch (Exception e) { throw new LifecycleException(e); } }
protected RedissonClient buildClient() throws LifecycleException { Config config = null; try { config = Config.fromJSON(new File(configPath), getClass().getClassLoader()); } catch (IOException e) { // trying next format try { config = Config.fromYAML(new File(configPath), getClass().getClassLoader()); } catch (IOException e1) { log.error("Can't parse json config " + configPath, e); throw new LifecycleException("Can't parse yaml config " + configPath, e1); } } try { try { Config c = new Config(config); Codec codec = c.getCodec().getClass().getConstructor(ClassLoader.class) .newInstance(Thread.currentThread().getContextClassLoader()); config.setCodec(codec); } catch (Exception e) { throw new IllegalStateException("Unable to initialize codec with ClassLoader parameter", e); } return Redisson.create(config); } catch (Exception e) { throw new LifecycleException(e); } }
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
@Override protected void stopInternal() throws LifecycleException { super.stopInternal(); setState(LifecycleState.STOPPING); try { shutdownRedisson(); } catch (Exception e) { throw new LifecycleException(e); } }
load(); } catch (ClassNotFoundException e) { throw new LifecycleException("Exception starting manager", e); } catch (IOException e) { throw new LifecycleException("Exception starting manager", e);
load(); } catch (ClassNotFoundException e) { throw new LifecycleException("Exception starting manager", e); } catch (IOException e) { throw new LifecycleException("Exception starting manager", e);
load(); } catch (ClassNotFoundException e) { throw new LifecycleException("Exception starting manager", e); } catch (IOException e) { throw new LifecycleException("Exception starting manager", e);
/** * {@inheritDoc} */ @Override public void stop() throws LifecycleException { if (log.isDebugEnabled()) { log.debug("Stopping"); } // Validate and update our current component state if (!_started) { throw new LifecycleException (sm.getString("standardManager.notStarted")); } _lifecycle.fireLifecycleEvent(STOP_EVENT, null); _started = false; // Require a new random number generator if we are restarted random = null; if ( initialized ) { if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); destroy(); } }
@Override protected void startInternal() throws LifecycleException { throw new LifecycleException( sm.getString("failedContext.start", getName())); }
@Override protected synchronized void startInternal() throws LifecycleException { if (!allowValid || !denyValid) { throw new LifecycleException( sm.getString("requestFilterValve.configInvalid")); } super.startInternal(); }
public void start() throws LifecycleException { super.start(); try { CommonUtils.assertNotNull(this.proxyCallbackUrl, "the proxy callback url cannot be null"); CommonUtils.assertTrue(this.proxyCallbackUrl.startsWith("/"), "proxy callback url must start with \"/\""); PROXY_GRANTING_TICKET_STORAGE = ReflectUtils.newInstance(proxyGrantingTicketStorageClass); } catch (final Exception e) { throw new LifecycleException(e); } logger.info("Startup completed."); }