How does a ScopedProxy decide what Session to use?
问题 A Singleton can not autowire a SessionBean but a ScopedProxy can. Assuming 100 users have a valid Session at the same time in the same application, how does the ScopedProxy decide what session is meant? I don't think the ScopedProxy is choosing any random session, this would be nonsense in my opinion. How does the ScopedProxy decide what session to use? What if 0 users have a Session? Will a NullPointerException occur? A @Async is a different Thread than the invoking Request-Processing-Thread