Re: Context class loader of worker thread got null (using parallelStream)

2017-11-30 Thread Johan Compagner
Why do you depend on the context classloader inside that? Op 1 dec. 2017 04:41 schreef "Xueheng Wu" : > Johan, thanks a lot. > > This way could be a huge project, because parallelStream is used > everywhere. > Maybe we got wrong usage from the beginning. > > > > On 30 Nov 2017, at 19:23, Johan Co

Re: Context class loader of worker thread got null (using parallelStream)

2017-11-30 Thread Xueheng Wu
Johan, thanks a lot. This way could be a huge project, because parallelStream is used everywhere. Maybe we got wrong usage from the beginning. > On 30 Nov 2017, at 19:23, Johan Compagner wrote: > > I think tomcat has nothing todo with this. > > This is the Threadpool that parallelStream() use

Re: Context class loader of worker thread got null (using parallelStream)

2017-11-30 Thread Johan Compagner
I think tomcat has nothing todo with this. This is the Threadpool that parallelStream() uses. So this is a problem of the streaming api of java The threadpool needs to set the context classloader on its created threads.. So you need to use i think your own ThreadPool, i think that is doable: http