// Do we have an existing session?
T session = type.cast(userSessions.get(type));
if (session == null) {
session = getSessionFactory(type).createSession(user);
if (session != null) {
YAMLNode node = getSessionConfiguration(getType(user.getClass()), UUIDUtil.toUniqueString(user), type, false);
if (node != null) {
session.load(new YAMLNodeConfigurationNode(node));
}
session.handleReconnect(user);
userSessions.put(type, session);