protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { logger.info("Reloading configuration for " + getContext().getName()); processConfiguration(); } catch (LifecycleException e) { logger.error(e); } } }, timerInterval, timerInterval); } processConfiguration(); }
private static XMLOutputFactory getXMLOutputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(StaxUtil.class.getClassLoader()); } return XMLOutputFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { logger.info("Reloading configuration for " + getContext().getName()); processConfiguration(); } catch (LifecycleException e) { logger.error(e); } } }, timerInterval, timerInterval); } processConfiguration(); }
private static XMLInputFactory getXMLInputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(StaxParserUtil.class.getClassLoader()); } return XMLInputFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { logger.info("Reloading configuration for " + getContext().getName()); processConfiguration(); } catch (LifecycleException e) { logger.error(e); } } }, timerInterval, timerInterval); } processConfiguration(); }
/** * Get the JAXP {@link XMLInputFactory} * * @return */ protected XMLInputFactory getXMLInputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = getTCCL(); try { if (tccl_jaxp) { setTCCL(getClass().getClassLoader()); } return XMLInputFactory.newInstance(); } finally { if (tccl_jaxp) { setTCCL(prevTCCL); } } }
private PolicyDecisionPoint getPDP() throws PrivilegedActionException { SystemPropertiesUtil.ensure(); URL url = SecurityActions.loadResource(getClass(), policyConfigFileName); if (url == null) throw logger.fileNotLocated(policyConfigFileName); InputStream is; try { is = url.openStream(); } catch (IOException e) { throw new RuntimeException(logger.resourceNotFound(url.getPath())); } return new JBossPDP(is); } }
private static XMLOutputFactory getXMLOutputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(StaxUtil.class.getClassLoader()); } return XMLOutputFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
private PolicyDecisionPoint getPDP() throws PrivilegedActionException { SystemPropertiesUtil.ensure(); URL url = SecurityActions.loadResource(getClass(), policyConfigFileName); if (url == null) throw logger.fileNotLocated(policyConfigFileName); InputStream is; try { is = url.openStream(); } catch (IOException e) { throw new RuntimeException(logger.resourceNotFound(url.getPath())); } return new JBossPDP(is); } }
private static XMLInputFactory getXMLInputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(StaxParserUtil.class.getClassLoader()); } return XMLInputFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
public static Validator validator() throws SAXException, IOException { SystemPropertiesUtil.ensure(); if (validator == null) { Schema schema = getSchema(); if (schema == null) throw logger.nullValueError("schema"); validator = schema.newValidator(); validator.setErrorHandler(new CustomErrorHandler()); } return validator; }
/** * Get the JAXP {@link XMLInputFactory} * * @return */ protected XMLInputFactory getXMLInputFactory() { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = getTCCL(); try { if (tccl_jaxp) { setTCCL(getClass().getClassLoader()); } return XMLInputFactory.newInstance(); } finally { if (tccl_jaxp) { setTCCL(prevTCCL); } } }
public static Validator validator() throws SAXException, IOException { SystemPropertiesUtil.ensure(); if (validator == null) { Schema schema = getSchema(); if (schema == null) throw logger.nullValueError("schema"); validator = schema.newValidator(); validator.setErrorHandler(new CustomErrorHandler()); } return validator; }
/** * Create a new {@link DatatypeFactory} * * @return * * @throws DatatypeConfigurationException */ public static DatatypeFactory newDatatypeFactory() throws DatatypeConfigurationException { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(XMLTimeUtil.class.getClassLoader()); } return DatatypeFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); Handlers handlers = null; //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { logger.info("Reloading configuration for " + context.getName()); processConfiguration(); } }, timerInterval, timerInterval); } ServletContext servletContext = context.getServletContext(); this.processConfiguration(); new SessionManager(servletContext, new SessionManager.InitializationCallback() { @Override public void registerSessionListener(Class<? extends HttpSessionListener> listener) { context.addApplicationListener(listener.getName()); } }); }
/** * Create a new {@link DatatypeFactory} * * @return * * @throws DatatypeConfigurationException */ public static DatatypeFactory newDatatypeFactory() throws DatatypeConfigurationException { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(XMLTimeUtil.class.getClassLoader()); } return DatatypeFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } }
protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); Handlers handlers = null; //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { logger.info("Reloading configuration for " + context.getName()); processConfiguration(); } }, timerInterval, timerInterval); } ServletContext servletContext = context.getServletContext(); this.processConfiguration(); new SessionManager(servletContext, new SessionManager.InitializationCallback() { @Override public void registerSessionListener(Class<? extends HttpSessionListener> listener) { context.addApplicationListener(listener.getName()); } }); }
/** * <p>Creates a {@link TransformerFactory}. The returned instance is cached and shared between different * threads.</p> * * @return * * @throws TransformerFactoryConfigurationError */ public static TransformerFactory getTransformerFactory() throws TransformerFactoryConfigurationError { if (transformerFactory == null) { boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL(); try { if (tccl_jaxp) { SecurityActions.setTCCL(TransformerUtil.class.getClassLoader()); } transformerFactory = TransformerFactory.newInstance(); } finally { if (tccl_jaxp) { SecurityActions.setTCCL(prevTCCL); } } } return transformerFactory; }
protected void startPicketLink() throws LifecycleException { SystemPropertiesUtil.ensure(); Handlers handlers = null; //Introduce a timer to reload configuration if desired if (timerInterval > 0) { if (timer == null) { timer = new Timer(); } timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { logger.info("Reloading configuration for " + context.getName()); processConfiguration(); } }, timerInterval, timerInterval); } ServletContext servletContext = context.getServletContext(); this.processConfiguration(); new SessionManager(servletContext, new SessionManager.InitializationCallback() { @Override public void registerSessionListener(Class<? extends HttpSessionListener> listener) { context.addApplicationListener(listener.getName()); } }); }
boolean tccl_jaxp = SystemPropertiesUtil.getSystemProperty(GeneralConstants.TCCL_JAXP, "false") .equalsIgnoreCase("true"); ClassLoader prevTCCL = SecurityActions.getTCCL();