private <AdapterType> AdapterType getAdapter(Session session,
Class<AdapterType> type) {
if ( session instanceof JackrabbitSession) {
String userID = session.getUserID();
JackrabbitSession jrSession = (JackrabbitSession) session;
try {
Authorizable authorizable = jrSession.getUserManager()
.getAuthorizable(userID);
String userHome = authorizable.getPath();
// tries to get tenant information from user home
// i.e. /home/users/tenant1/a/admin