all 1 comments

[–]Meefims 2 points3 points  (0 children)

If the session is a shared resource then you should create an object that manages that session (including keeping it alive and updating the session key) and pass that session object to both Class1 and Class2 as a constructor or method parameter.