}
}
for (Object c: connectorResources) {
ConnectorResource cr = (ConnectorResource) c;
ConnectorConnectionPool cp = (ConnectorConnectionPool) ConnectorsUtil.getResourceByName(
domain.getResources(), ConnectorConnectionPool.class, cr.getPoolName());
if (cp != null && JMSRA.equals(cp.getResourceAdapterName())){
Map<String,String> m = new HashMap<>();
m.put("name", cr.getJndiName());
list.add(m);
}
}
} catch (Exception e) {
report.setMessage(localStrings.getLocalString("list.jms.resources.fail",
"Unable to list JMS Resources") + " " + e.getLocalizedMessage());
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setFailureCause(e);
return;
}
} else {
switch (resourceType) {
case TOPIC_CF:
case QUEUE_CF:
case UNIFIED_CF:
for (Object c : connectorResources) {
ConnectorResource cr = (ConnectorResource)c;
ConnectorConnectionPool cp = (ConnectorConnectionPool)
ConnectorsUtil.getResourceByName(domain.getResources(), ConnectorConnectionPool.class, cr.getPoolName());
if(cp != null && resourceType.equals(cp.getConnectionDefinitionName()) && JMSRA.equals(cp.getResourceAdapterName())) {
Map<String,String> m = new HashMap<>();
m.put("name", cr.getJndiName());
list.add(m);
}
}