}
public Map<String, Object> pingJdbcConnectionPool(final String poolName)
{
final Map<String, Object> result = new HashMap<String, Object>();
final Habitat habitat = getHabitat();
ConnectorRuntime connRuntime = null;
result.put(PING_SUCCEEDED_KEY, false);
if (habitat == null)
{
result.put(REASON_FAILED_KEY, "Habitat is null");
return result;
}
// check pool name
final Resources resources = getDomainRootProxy().child(Domain.class).getResources();
final Map<String, JdbcConnectionPool> pools = resources.childrenMap(JdbcConnectionPool.class);
final JdbcConnectionPool cfg = pools.get(poolName);
if (cfg == null)
{
result.put(REASON_FAILED_KEY, "The JdbcConnectionPool \"" + poolName + "\" does not exist");
return result;
}
// get connector runtime
try
{
connRuntime = habitat.getComponent(ConnectorRuntime.class, null);
}
catch (final ComponentException e)
{
result.putAll(ExceptionUtil.toMap(e));
result.put(REASON_FAILED_KEY, ExceptionUtil.toString(e));