Reputation: 7641
Can i replace request scope of spring with thread scope.As for non http request when operating in multithreading the access to bean service is not bound for the current thread. The thread scope allows every thread to access bean service.In the case if thread is accessing bean with request scope outside of http(say interceptor sometime call within http and sometime calling within serviceImpl to serviceImpl outside of http ).For http it is fine with request scope but when callfrom outside of http within multihreading environment the thread cannot get bean service because the request was not within http and there is error in creating the bean where the current thread tries to get bean service scope with request.If i scope thead instead of request does it create a problem if i have to operate in both http and non http outside of web request?
Upvotes: 0
Views: 3721