Re: Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Christopher Schultz
Florian,
Is it completely up to the developers/deployers wether the necessary 
resources get declared in the server or in the application?
This is correct.

Is it just 
for convenience, so that deployer doesn't have to unpack the WAR?
No, this has nothing to do with unpacking WAR files.

Or -- 
like someone stated on this list (to my confusion) -- that the 
server.xml Resource element and the web.xml resource-ref have a relation 
that is similar to that of an implementation class instance and an 
interface?
This is an apt analogy. The server.xml sets up the actual resource 
(often in the GlobalNamingResources section), then allows the 
application to use it (by adding a ResourceLink section in the 
Context where you want to use it). The webapp signifies its desire to 
use that resource by including a complimentary resource-ref section in 
the deployment descriptor.

-chris

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


RE: Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Derek Mahar
Thanks!

Your reply is an excellent summary of the relationship between
GlobalNamingResources in server.xml, ResourceLink in Context, and
resource-ref in the deployment descriptor.  It's too bad that Tomcat:
The Definitive Guide does not describe it quite so well!  Because of
all of these references, I found resources to be one of the most
difficult Tomcat features to understand and configure.  Your summary of
this relationship and makes it so much easier to understand!

Derek

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: November 19, 2003 8:31 AM
To: Tomcat Users List
Subject: Re: Relationship between server.xml/Resource and
web.xml/resource-ref.


Florian,
 Is it completely up to the developers/deployers wether the necessary
 resources get declared in the server or in the application?

This is correct.

 Is it just
 for convenience, so that deployer doesn't have to unpack the WAR?

No, this has nothing to do with unpacking WAR files.

 Or --
 like someone stated on this list (to my confusion) -- that the 
 server.xml Resource element and the web.xml resource-ref have a
relation 
 that is similar to that of an implementation class instance and an 
 interface?

This is an apt analogy. The server.xml sets up the actual resource 
(often in the GlobalNamingResources section), then allows the 
application to use it (by adding a ResourceLink section in the 
Context where you want to use it). The webapp signifies its desire to 
use that resource by including a complimentary resource-ref section in

the deployment descriptor.

-chris


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



Re: Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Harry Mantheakis
Hello Chris

 This is an apt analogy. The server.xml sets up the actual resource
 (often in the GlobalNamingResources section), then allows the
 application to use it (by adding a ResourceLink section in the
 Context where you want to use it). The webapp signifies its desire to
 use that resource by including a complimentary resource-ref section in
 the deployment descriptor.

I'm out of my depths with JNDI, but am I right in presuming that a webapp
cannot 'set up' a JNDI resource all of its own, in its deployment
descriptor?

IOW, only the container (Tomcat) can set up a JNDI resource, which its
webapps are then able to use.

Sorry if this is labouring the point. A simple 'yes/no' will suffice!

Kind regards

Harry Mantheakis
London, UK


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



RE: Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Steph Richardson
Thanks Chris, but here is the part I don't exactly understand :

The webapp signifies its desire to use that resource by including a complimentary 
resource-ref section in the deployment
descriptor.

A webapp ( at least under tomcat 4.1 ) does not require the resource-ref section to 
be in place, for it to use a jndi resource
that is already defined in a resource section of it's context element.
Is Tomcat just being nice about this ?
Or is the point on the resource-ref to inform the container at deployment time, that 
the webapp requires such a resource to exist
?

I think that's what the servlet spec is saying, but the English is a little muddled :
These developer uses these elements describe certain objects that the web application 
requires to be registered in the JNDI
namespace in the web container at runtime



 -Original Message-
 From: Christopher Schultz [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 19, 2003 8:31 AM
 To: Tomcat Users List
 Subject: Re: Relationship between server.xml/Resource and
 web.xml/resource-ref.


 Florian,
  Is it completely up to the developers/deployers wether the necessary
  resources get declared in the server or in the application?

 This is correct.

  Is it just
  for convenience, so that deployer doesn't have to unpack the WAR?

 No, this has nothing to do with unpacking WAR files.

  Or --
  like someone stated on this list (to my confusion) -- that the
  server.xml Resource element and the web.xml resource-ref have a relation
  that is similar to that of an implementation class instance and an
  interface?

 This is an apt analogy. The server.xml sets up the actual resource
 (often in the GlobalNamingResources section), then allows the
 application to use it (by adding a ResourceLink section in the
 Context where you want to use it). The webapp signifies its desire to
 use that resource by including a complimentary resource-ref section in
 the deployment descriptor.

 -chris


 -
 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]