I'm having the exact same issue.  I was assuming <DefaultContext> was
working, but maybe the resource links were left out of the context
propagation code for implicit contexts.

I'd really rather not have to explicitly define all contexts that use a
global datasource... kind of the idea of making it a global JNDI datasource
is that I don't have to define lots of stuff in the server.xml :)

Bug?  Missing feature?

-----Original Message-----
From: Cam Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 12:59 AM
To: Tomcat Users List
Subject: ResourceLink and DefaultContext


Hi all,

Summary of my problem is that I'm unable to access a global JNDI data 
source via a ResourceLink when that link is declared inside a 
DefaultContext element.  When I attempt the lookup, I get 
"javax.naming.NameNotFoundException: Name jdbc is not bound in this Context"

However, If I place the ResourceLink inside explicity declared Context 
elements, all works fine and I can access the data source from multiple 
webapps.

The non-working server.xml using a DefaultContext is here:
http://www.solidstate.com.au/temp/server-default.xml

The working server.xml using explicit Contexts is here:
http://www.solidstate.com.au/temp/server-explicit.xml

The diff of the two files, showing that the context declaration is the only 
difference, is here: http://www.solidstate.com.au/temp/server-diff.txt

My system is Tomcat 4.1.27 running on Sun Linux j2sdk1.4.1.  The data 
source configuration is commons DBCP over Postgres 7.3.2.

Anyone have any experience with this issue, or can see something I've 
missed in the config?

thanks,


Cam Smith
Solid State
----------------
p:  613 9525 5040
f:   613 9593 8594
m: 0416 150 422
e: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to