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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]