Re: Tomcat's data-source issue with Fork Join Tasks

2018-03-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Priyam, On 3/17/18 12:10 AM, Priyam Srivastava wrote: > Many Thanks for your response. I was able to resolve this issue by > writing the below code just before JNDI Look Up: > > Thread l_thread = Thread.currentThread(); > l_thread.setContextClassL

Re: Tomcat's data-source issue with Fork Join Tasks

2018-03-17 Thread Mark Thomas
On 17/03/18 04:10, Priyam Srivastava wrote: > Hi Mark, > > Many Thanks for your response. I was able to resolve this issue by writing > the below code just before JNDI Look Up: > > Thread l_thread = Thread.currentThread(); > l_thread.setContextClassLoader(this.getClass().getClassLoader()); > init

Re: Tomcat's data-source issue with Fork Join Tasks

2018-03-16 Thread Priyam Srivastava
Hi Mark, Many Thanks for your response. I was able to resolve this issue by writing the below code just before JNDI Look Up: Thread l_thread = Thread.currentThread(); l_thread.setContextClassLoader(this.getClass().getClassLoader()); initialContext = new InitialContext(); I have a questions

Re: Tomcat's data-source issue with Fork Join Tasks

2018-03-16 Thread Mark Thomas
On 16/03/18 12:06, Priyam Srivastava wrote: > I have a scenario where we have to run some random number of independent > tasks to load data from DB. So I am using Java's fork Join framework to > create those task and then invoke them. See: https://bz.apache.org/bugzilla/show_bug.cgi?id=60620 and t

Tomcat's data-source issue with Fork Join Tasks

2018-03-16 Thread Priyam Srivastava
I have a scenario where we have to run some random number of independent tasks to load data from DB. So I am using Java's fork Join framework to create those task and then invoke them. Each task opens its own connection using datasource and closes it. But in Tomcat, I am getting below error at li