*
The moose likes JDBC and the fly likes Resource Referencing within a thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Resource Referencing within a thread" Watch "Resource Referencing within a thread" New topic
Author

Resource Referencing within a thread

Dale Robert
Greenhorn

Joined: Jul 03, 2003
Posts: 1
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.
Thanks,
DRR


DRR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource Referencing within a thread
 
Similar Threads
java:comp/env issue in JBOSS
Thread cannot find resource reference?
Difference between resource-ref and env-entry
ejb using datasource best practice
SQLNestedException