Re: Defining JNDI DataSource...why decl'd/def'd in server.xml and not in web.xml.

2003-10-30 Thread Christopher Schultz
Mike,
Why can't I describe the JNDI DataSource in the web.xml of my web 
application? I didn't notice this possibility in dtd for web.xml.
That's because the application developers and server deployment team 
might be different people. It's much more natural to have the JNDI 
resources setup by those who manage the server itself. The container is 
the one providing the services. The application simply uses them.

I
still had to hand-edit server.xml to describe its connection to database 
and it was done in a context only applying to juddi web app. This seems 
error-prone and just not clean/modular.
I would argue that it is actually more modular.

It also allows protection for the server. If applications were allowed 
to make arbitrary connections (which they actually still can, using 
Sockets, etc.) then it might make the server unstable. The container 
should be handling resource management, hence the JNDI resources are 
defined and provided by the container.

-chris

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


Defining JNDI DataSource...why decl'd/def'd in server.xml and not in web.xml.

2003-10-30 Thread Mike Klein
I like to make my web applications and their corresponding 
installations/deployments as modular/atomic as possible. I like hot 
deployments, etc, etc.

Unfortunately, every application I've seen that uses Tomcat JNDI 
DataSources requires hand-editing of server.xml...and then a reference 
to the resource in web.xml of web application.

Why can't I describe the JNDI DataSource in the web.xml of my web 
application? I didn't notice this possibility in dtd for web.xml.

As an example, I recently installed JUDDI, a Java application that 
manages a uddi registry. It came as a self-contained web application 
(directory or .war), and after dropping it into webapps directory...I 
still had to hand-edit server.xml to describe its connection to database 
and it was done in a context only applying to juddi web app. This seems 
error-prone and just not clean/modular.

I would understand defining JNDI datasources available to ALL web 
applications via Tomcat's admin or via the server.xmlbut why when 
it's per web application?

Please correct my thinking...

thanks in advance,

mike

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