In general, I would say no. Use frameworks to do this for you.
At the web tier of the web application, use the session context (or others in the context of the context of a particular structure) to store data and the status request area.
If you enter a business layer, it, of course, should not depend on the specific web context. spring and Java EE provide security, transaction, and contextual solutions.
If you touch this manually, you must be very careful; this can lead to cleaning problems, memory leaks and strange errors ...
source share