private List<String> getSubscribers(DestinationConfig destination)
throws AQException, SQLException, JMSException {
Connection conn = session.getDBConnection();
List<String> list = new ArrayList<String>();
AQSession aqSession = new AQOracleSession(conn);
AQQueue queue = aqSession.getQueue(conn.getMetaData().getUserName(),
destination.getName());
if (queue != null) {
AQAgent[] subscribers = queue.getSubscribers();
if (subscribers != null) {
for (int index = 0; index < subscribers.length; index++) {
list.add(subscribers[index].getName());
}
}
}
queue.close();
aqSession.close();
return list;
}