public boolean isActiveRoute(String username, String resource) {
boolean hasRoute = false;
Session session = routingTable.getClientRoute(new JID(username, serverName, resource));
// Makes sure the session is still active
if (session != null && !session.isClosed()) {
hasRoute = session.validate();
}
return hasRoute;
}