Setup codes to share session information only when it is sharable