//IdentitySession session = new IdentitySessionImpl(realmName, repo, mapper);
IdentitySessionConfigurationContext sessionConfigCtx = sessionContextMap.get(realmName);
IdentitySession newSession =
new IdentitySessionImpl(sessionConfigCtx.getRealmName(),
sessionConfigCtx.getRepository(), sessionConfigCtx.getTypeMapper());
realmMap.put(realmName, newSession);
return newSession;