Context placement question

2008-12-10 Thread János Löbb

Hi,

I am in the process to convert our production Apache2 + mod_jk +   
Tomcat setup  on Max OSx 10.5 to a cluster, so some applications can  
run on the cluster, other applications will run only on one of the two  
participating balance members.  The Apache in one of the machines will  
also act as a reversed proxy.  There will be just one tomcat instance  
per machine.


The default context.xml in the conf directory - $CATALINA_BASE/conf/ 
context.xml -, starts up the StandardContext by default if I  
understand well.  It will be good for those webapps that do not have  
their own context.xml.


Now I have two questions:

1.	If the default of the $CATALINA_BASE/conf/context.xml trigers the  
StandardContext, can I have ReplicatedContext for individual webapps  
that I want to run on the cluster?


2.  If the answer is yes for the first question then what is the best  
place to put the


Context path= docBase=ROOT  
className=org.apache.catalina.ha.context.ReplicatedContext


element ?

The http://tomcat.apache.org/tomcat-6.0-doc/config/context.html  
documentation suggests two places:


	a.	CATALINA_BASE/conf/[enginename]/[hostname]/webapp.xml, where  
webapp would be unique for every webapp running on the cluster,


b.  inside the application's /META-INF/context.xml

My major concern is that modification to the webapps context. xml or  
webapp.xml containing context info, should not interfere with the  
running of other webapps in production environment.


If there is a good article about it please give me the URL.

Thanks ahead,

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



RE: Context placement question

2008-12-10 Thread Caldarale, Charles R
 From: János Löbb [mailto:[EMAIL PROTECTED]
 Subject: Context placement question

 The default context.xml in the conf directory - $CATALINA_BASE/conf/
 context.xml -, starts up the StandardContext by default

No - it merely adds attribute values for *all* Context elements, even for 
webapps that have their own.  A webapp *may* override the attribute values in 
conf/context.xml, but if it doesn't do so explicitly, the ones in 
conf/context.xml apply in addition to any attributes the one from the webapp 
specifies.

 can I have ReplicatedContext for individual webapps
 that I want to run on the cluster?

Yes, but that's completely independent of conf/context.xml, *unless* you modify 
that to include a className attribute.

 2.  If the answer is yes for the first question then what is the best
 place to put the
 Context path= docBase=ROOT
 className=org.apache.catalina.ha.context.ReplicatedContext
 element ?

Normally, the best place is to keep it with the webapp: 
ROOT/META-INF/context.xml; alternatively, you may place it in 
conf/Catalina/[host]/ROOT.xml.  In either case, the path and docBase attributes 
must not be set.  You would normally use the latter location only if you want 
to package your webapp for distribution and be able to set (e.g., a database 
resource) attributes without modifying anything inside the package.

 My major concern is that modification to the webapps context. xml or
 webapp.xml containing context info, should not interfere with the
 running of other webapps in production environment.

It won't, if you do what's described above.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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