• Post Reply Bookmark Topic Watch Topic
  • New Topic

Resource Referencing within a thread  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using resource referencing and have it working. I access my datasource using "hava:comp/env/dataSource" I can read and write to my database.
However, my program spawns a thread and in that thread I must update a row on the same database table. Within the thread, I cannot access the database. I get a NameNotFoundException. I believe that the namespace(comp/env) cannot be seen, so that the database name is unknown.
Has anyone seen this problem before? Did I miss something when I set this up? How do you get access to the namespace within the thread? Any help would be appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!