OpenEjbManagedDatasourceAccessor implements DatasourceAccessor { @Override public DataSourceInfo getInfo(Object resource) throws Exception { DataSourceInfo dataSourceInfo = null; if (canMap(resource)) { PoolConfiguration conf = (PoolConfiguration) unwrap(resource); DataSourceProxy proxy = (DataSourceProxy) conf; dataSourceInfo = new DataSourceInfo(); dataSourceInfo.setBusyConnections(proxy.getNumActive()); dataSourceInfo.setEstablishedConnections(proxy.getNumIdle() + proxy.getNumActive()); dataSourceInfo.setMaxConnections(conf.getMaxActive()); dataSourceInfo.setJdbcUrl(conf.getUrl()); dataSourceInfo.setUsername(conf.getUsername()); dataSourceInfo.setResettable(false); dataSourceInfo.setType("tomee-jdbc"); } return dataSourceInfo; }  @Override DataSourceInfo getInfo(Object resource); @Override boolean reset(Object resource); @Override boolean canMap(Object resource);  }
@Test public void getInfoTest() throws Exception { accessor.getInfo(source); }