cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: multiple webapps sharing XSPs
Date Wed, 09 Oct 2002 18:55:13 GMT
Ryan Agler wrote:

>Can a guru out there give me a hand?
>

The problem with loggin comes from the fact that in your setup 
org.apache.log classes are loaded once and shared among contexts, and 
from the fact that logging uses some static methods/variables. Example 
(from CocoonServlet):

        final Logger logger = 
Hierarchy.getDefaultHierarchy().getLoggerFor("");

Thus, all instances will share same instance of the log -> all instances 
will write to same log file.

Cannot comment on XSP problem right now. But try latest 2.0.4-dev 
version: it has one patch for XSP reloading problem.

Vadim



>I recently installed Tomcat 4.1.12 with the latest Cocoon CVS.  I have 4
>Cocoon webapps which share the cocoon jars, are all in
>$TOMCAT_HOME/shared/lib.  When I fire up Tomcat, the webapps get
>initialized and the normal log files appear under each one's
>WEB-INF/logs.  
>
>It starts getting crazy here -- All 4 webapps seem to write their logs
>to ONE of the webpps' WEB-INF/logs when I start accessing pages.  On top
>of that, say webapp1 has a page called "test.xsp". I access "test.xsp",
>it compiles just fine and the .class file appears in $TOMCAT_HOME/work,
>etc.  However, if the sitemap for webapp2 matches "test.xsp", the page
>from webapp1 gets pulled from webapp1's cache and used!?  No .class file
>gets compiled for webapp2, unless I explicitly go in and "touch"
>webapp2's test.xsp so cocoon thinks it has been modified.
>
>I found that this only happens if the cocoon jars are shared (i.e. in
>$TOMCAT_HOME/shared/lib), as opposed to each webapp having copies of the
>jars in WEB-INF/lib.  I have made the usual precautions of deleting the
>work directory before starting Tomcat each time.
>
>I suspect this has something to do with contexts?  I say that because
>the log files for all 4 webapps are all being written to a single
>${context-root} (from logkit.xconf).  Here is a snippet from my
>server.xml if you can see anything wrong:
>
><Host name="www.domain1.com" debug="0" appBase="webapps"
>unpackWARs="true">
>   <Context path="" docBase="webapp1" debug="0"/>
>   <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp1/users.xml" />
></Host>
>
><Host name="www.domain2.com" debug="0" appBase="webapps"
>unpackWARs="true">
>   <Context path="" docBase="webapp2" debug="0"/>
>   <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp2/users.xml" />
></Host>
>
>Thanks much,
>Ryan Agler
>  
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message