tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: JDBC driver of class '' for connect URL 'null' in Tomcat 5.5.12
Date Thu, 16 Aug 2007 17:31:34 GMT
As far as I'm aware, there is no difference between a <Resource ..../> 
element in context.xml and a <Resource ..../> element in a 
<GlobalNamingResources>...</GlobalNamingResources> block.  Well... other 
than the need to use a <ResourceLink .../> to make it available to an 
individual webapp.  Did you try it and get a failure?

--David


Matthew Kerle wrote:

> now that sounds good! the only thing is I don't see how that maps to a 
> DataSource declaration, the <Resource> element in 
> <GlobalNamingResources> doesn't seem to allow the full range of 
> properties that you need to define a database connection, eg - 
> username/password/driverClassName/url etc...
>
> Where would you define these?
>
> David Smith wrote:
>
>> In my experience, a resource is usually only relevant to one webapp.  
>> There's no need to put it in server.xml as a GlobalNamingResource 
>> unless you want that resource available in all your webapps.  Moving 
>> the resource to the <Context> block of a context.xml file also makes 
>> it so resources can come and go with deployment of an individual 
>> webapp without restarting tomcat and disrupting all the webapps.
>>
>> Developers could define their Resources in the 
>> <GlobalNamingResources> ... </GlobalNamingResources> block of 
>> server.xml and then add a <ResourceLink> element to the context.xml 
>> file.  That'll get you out of having database specific information in 
>> the <Context ..../> element.  See this page for further details on that:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html
>>
>> --David
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message