Gang,
The
second time if the value of the Id is null then it will over write the value you
set the first time as the session keeps only one value of the attribute, in your
case ID. Also there is no need to get and re set the attributes on the sessions
as they are valid for the duration of the session.
Ram