set = select.executeQuery();
while (set.next()) {
long destinationId = set.getLong("destination_id");
String name = set.getString("name");
boolean isQueue = set.getBoolean("is_queue");
JmsDestination destination = (isQueue)
? (JmsDestination) new JmsQueue(name)
: (JmsDestination) new JmsTopic(name);
destination.setPersistent(true);
cache(destination, destinationId);
}
} catch (SQLException exception) {
throw new PersistenceException("FGailed to load destinations",
exception);