• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI connection returns null in thread when trigger inside web app

 
K. Tsang
Bartender
Posts: 3457
14
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have an web app with a database connection defined using JNDI. Then I have a method that does file upload and triggers a separate Runnable class. I noticed that in my Runnable class, I can't get the JNDI connection (returns null) inside the run() method. I'm not sure if this is because this separate thread is outside of the web context or some other reason? Any idea?




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic