org.apache.tomcat.jdbc.pool.PoolUtilities Java Examples
The following examples show how to use
org.apache.tomcat.jdbc.pool.PoolUtilities.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JmxPasswordTest.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Test public void testPassword() throws Exception { Assert.assertEquals("Passwords should match when not using JMX.",password,datasource.getPoolProperties().getPassword()); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ConnectionPoolMBean mbean = JMX.newMBeanProxy(mbs, oname, ConnectionPoolMBean.class); String jmxPassword = mbean.getPassword(); Properties jmxProperties = mbean.getDbProperties(); Assert.assertFalse("Passwords should not match.", password.equals(jmxPassword)); Assert.assertFalse("Password property should be missing", jmxProperties.containsKey(PoolUtilities.PROP_PASSWORD)); }
Example #2
Source File: JmxPasswordTest.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
@Test public void testPassword() throws Exception { Assert.assertEquals("Passwords should match when not using JMX.",password,datasource.getPoolProperties().getPassword()); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ConnectionPoolMBean mbean = JMX.newMBeanProxy(mbs, oname, ConnectionPoolMBean.class); String jmxPassword = mbean.getPassword(); Properties jmxProperties = mbean.getDbProperties(); Assert.assertFalse("Passwords should not match.", password.equals(jmxPassword)); Assert.assertFalse("Password property should be missing", jmxProperties.containsKey(PoolUtilities.PROP_PASSWORD)); }
Example #3
Source File: JmxPasswordTest.java From tomcatsrc with Apache License 2.0 | 5 votes |
@Test public void testPassword() throws Exception { Assert.assertEquals("Passwords should match when not using JMX.",password,datasource.getPoolProperties().getPassword()); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ConnectionPoolMBean mbean = JMX.newMBeanProxy(mbs, oname, ConnectionPoolMBean.class); String jmxPassword = mbean.getPassword(); Properties jmxProperties = mbean.getDbProperties(); Assert.assertFalse("Passwords should not match.", password.equals(jmxPassword)); Assert.assertFalse("Password property should be missing", jmxProperties.containsKey(PoolUtilities.PROP_PASSWORD)); }
Example #4
Source File: ConnectionPool.java From Tomcat8-Source-Read with MIT License | 4 votes |
@Override public Properties getDbProperties() { return PoolUtilities.cloneWithoutPassword(getPoolProperties().getDbProperties()); }
Example #5
Source File: ConnectionPool.java From Tomcat7.0.67 with Apache License 2.0 | 4 votes |
@Override public Properties getDbProperties() { return PoolUtilities.cloneWithoutPassword(getPoolProperties().getDbProperties()); }
Example #6
Source File: ConnectionPool.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override public Properties getDbProperties() { return PoolUtilities.cloneWithoutPassword(getPoolProperties().getDbProperties()); }