@Test public void testMBeanRegisteredThroughFactory() throws Exception { final ManagedBasicDataSource testDataSource = (ManagedBasicDataSource) ManagedBasicDataSourceFactory.createDataSource(new Properties()); assertTrue(getMBeanServerConnection().isRegistered(new ObjectName(testDataSource.getMBeanName()))); }
public String getMBeanName() { return mBeanName; }
ManagedBasicDataSource extends BasicDataSource { public String getMBeanName() { return mBeanName; } }
ManagedBasicDataSource extends BasicDataSource { public String getMBeanName() { return mBeanName; } ManagedBasicDataSource();  ManagedBasicDataSource(String mBeanName);  ManagedBasicDataSource(MBeanServer mBeanServer, String mBeanName); }
ManagedBasicDataSource extends BasicDataSource { public String getMBeanName() { return mBeanName; } ManagedBasicDataSource();  ManagedBasicDataSource(String mBeanName);  ManagedBasicDataSource(MBeanServer mBeanServer, String mBeanName); String getMBeanName(); @Override boolean isWrapperFor(Class<?> iface); @Override T unwrap(Class<T> iface); @Managed(description = "The current number of active connections that have been allocated from this data source.") synchronized int getNumActive(); @Managed(description = "The current number of idle connections that are waiting to be allocated from this data source.") synchronized int getNumIdle(); @Managed(description = "The maximum number of active connections that can be allocated at the same time.") synchronized int getMaxActive(); @Managed(description = "Set the maximum number of active connections that can be allocated at the same time. Use a negative value for no limit.") synchronized void setMaxActive(int maxActive); @Managed(description = "The maximum number of connections that can remain idle in the pool.") synchronized int getMaxIdle(); @Managed(description = "Set the maximum number of connections that can remain idle in the pool.") synchronized void setMaxIdle(int maxIdle); @Managed(description = "The minimum number of idle connections in the pool.") synchronized int getMinIdle(); @Managed(description = "The minimum number of idle connections in the pool.") synchronized void setMinIdle(int minIdle); @Managed(description = "The maximum number of milliseconds that the pool will wait for a connection to be returned before throwing an exception.") synchronized long getMaxWait(); @Managed(description = "Set the maxWait property. Use -1 to make the pool wait indefinitely.") synchronized void setMaxWait(long maxWait); @Managed synchronized String getUrl(); @Managed String getUsername(); }
ManagedBasicDataSource extends BasicDataSource { public String getMBeanName() { return mBeanName; } ManagedBasicDataSource();  ManagedBasicDataSource(String mBeanName);  ManagedBasicDataSource(MBeanServer mBeanServer, String mBeanName); String getMBeanName(); @Override boolean isWrapperFor(Class<?> iface); @Override T unwrap(Class<T> iface); @Managed(description = "The current number of active connections that have been allocated from this data source.") synchronized int getNumActive(); @Managed(description = "The current number of idle connections that are waiting to be allocated from this data source.") synchronized int getNumIdle(); @Managed(description = "The maximum number of active connections that can be allocated at the same time.") synchronized int getMaxActive(); @Managed(description = "Set the maximum number of active connections that can be allocated at the same time. Use a negative value for no limit.") synchronized void setMaxActive(int maxActive); @Managed(description = "The maximum number of connections that can remain idle in the pool.") synchronized int getMaxIdle(); @Managed(description = "Set the maximum number of connections that can remain idle in the pool.") synchronized void setMaxIdle(int maxIdle); @Managed(description = "The minimum number of idle connections in the pool.") synchronized int getMinIdle(); @Managed(description = "The minimum number of idle connections in the pool.") synchronized void setMinIdle(int minIdle); @Managed(description = "The maximum number of milliseconds that the pool will wait for a connection to be returned before throwing an exception.") synchronized long getMaxWait(); @Managed(description = "Set the maxWait property. Use -1 to make the pool wait indefinitely.") synchronized void setMaxWait(long maxWait); @Managed synchronized String getUrl(); @Managed String getUsername(); static final String DEFAULT_MBEAN_NAME; }