ThreadLocal usage in enterprise application
问题 If my web application and ejb application are on the same machine (on same JVM) and all the ejb calls are local calls , will the use of ThreadLocal create any issue while passing information from web to ejb? Any workaround if the ejb calls are remote? Will ThreadLocal information be available from web application to ejb application? Is use of ThreadLocal advisable in such scenario? 回答1: For the first question, there is no problem as long as you remove the ThreadLocal variables at the end of