out.println(); final String value = properties.getProperty(name);
out.println(); final String value = properties.getProperty(name);
String value = properties.getProperty(name); String comment = properties.getComment(name);
final String passwordCipher = properties.getProperty("PasswordCipher"); if (passwordCipher != null && "PlainText".equals(passwordCipher)) { // no need to warn about it properties.remove("PasswordCipher"); } else { final String password = properties.getProperty("Password"); if (passwordCipher != null) { final PasswordCipher cipher = PasswordCipherFactory.getPasswordCipher(passwordCipher); if (!value.isEmpty()) { if ("MaxOpenPreparedStatements".equalsIgnoreCase(key) || "PoolPreparedStatements".equalsIgnoreCase(key)) { if ("0".equalsIgnoreCase(properties.getProperty("MaxOpenPreparedStatements", "0")) || "false".equalsIgnoreCase(properties.getProperty("PoolPreparedStatements", "false"))) { continue; final String interceptors = properties.getProperty("jdbcInterceptors"); if (interceptors == null) { converted.setProperty("jdbcInterceptors", "StatementCache(max=" + properties.getProperty("MaxOpenPreparedStatements", "128") + ")"); LOGGER.debug("Tomcat-jdbc StatementCache added to handle prepared statement cache/pool"); } else if (!interceptors.contains("StatementCache")) { converted.setProperty("jdbcInterceptors", interceptors + ";StatementCache(max=" + properties.getProperty("MaxOpenPreparedStatements", "128") + ")"); LOGGER.debug("Tomcat-jdbc StatementCache added to handle prepared statement cache/pool");
private void buildDestinationDefinition(final JndiConsumer consumer, final JMSDestinationDefinition definition) { final JMSDestination destination = new JMSDestination(); destination.setName(definition.name()); destination.setClassName(definition.className()); destination.setInterfaceName(definition.interfaceName()); destination.setResourceAdapter(definition.resourceAdapter()); destination.setDestinationName(definition.destinationName()); for (final String s : definition.properties()) { final int equal = s.indexOf('='); if (equal < s.length() - 1) { final SuperProperties props = new SuperProperties(); try { props.load(new ByteArrayInputStream(s.getBytes())); for (final String key : props.stringPropertyNames()) { if (!key.isEmpty()) { destination.property(key, props.getProperty(key)); } } } catch (final IOException e) { final String key = s.substring(0, equal).trim(); final String value = s.substring(equal + 1).trim(); destination.property(key, value); } } else { destination.property(s.trim(), ""); } } consumer.getJMSDestination().add(destination); }
for (final String key : props.stringPropertyNames()) { if (!key.isEmpty()) { connectionFactory.property(key, props.getProperty(key));
for (final String key : props.stringPropertyNames()) { if (!key.isEmpty()) { dataSource.property(key, props.getProperty(key));
for (final String key : props.stringPropertyNames()) { if (!key.isEmpty()) { dataSource.property(key, props.getProperty(key));