@Override
public Collection<String> getDataSourceNames() throws AdminException {
ArrayList<String> names = new ArrayList<String>();
try {
for (String type:DS_TYPES) {
ComponentType ct = new ComponentType("DataSource", type); //$NON-NLS-1$
Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
for (ManagedComponent mc:mcs) {
names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
}
}
for (String type:CF_TYPES) {
ComponentType ct = new ComponentType("ConnectionFactory", type); //$NON-NLS-1$
Set<ManagedComponent> mcs = getView().getComponentsForType(ct);
for (ManagedComponent mc:mcs) {
names.add(((SimpleValue)mc.getProperty("jndi-name").getValue()).getValue().toString()); //$NON-NLS-1$
}
}