use more reflection in the database session module