Re: cvs commit: cocoon-2.1/src/blocks/javaflow

2004-03-29 Thread cziegeler
Hello? I thought someone said:

[X] nah... put it somewhere else

Which is more or less a -1 on committing it to our CVS.

So, please, why did you ignore it?

Votes are useless if you ignore some voices whether you like
Their opinion or not. 
Perhaps I'm changing my mind - perhaps not.

Carsten



No memory leak because of Recyclable!

2004-01-10 Thread cziegeler
Ok, to be sure, if there is now a memory leak with Recyclable components in
some cases, I did a simple test case:
Setting the maximum pool of a Recyclable component to 2, lookup ten
instances in a row and release them.

Now, guess what happens?
All ten instances get recycle() called and 8 instances get as well dispose()
called.

So, although the theory is, that we can't rely on recycle() being called
always, it's currently the case with ECM!

However, I think we should keep this in mind and change the code that we
don't rely on this.

Carsten



cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl CachingPointProcessingPipeline.java

2003-08-28 Thread cziegeler
cziegeler2003/08/27 23:09:29

  Modified:src/java/org/apache/cocoon/components/pipeline/impl
CachingPointProcessingPipeline.java
  Log:
  Code formatting
  
  Revision  ChangesPath
  1.4   +25 -25
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java
  
  Index: CachingPointProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/CachingPointProcessingPipeline.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CachingPointProcessingPipeline.java   7 Aug 2003 08:52:15 -   1.3
  +++ CachingPointProcessingPipeline.java   28 Aug 2003 06:09:29 -  1.4
  @@ -219,18 +219,18 @@
 ((CachingOutputStream)os).getContent());
   this.cache.store(this.toCacheKey.copy(),
response);
  -//
  -// Scan back along the pipelineCacheKey for
  -// for any cachepoint(s)
  -//
  -this.toCacheKey.removeUntilCachePoint();
  -
  -//
  -// adjust the validities object
  -// to reflect the new length of the pipeline cache key.
  -//
  -// REVISIT: Is it enough to simply reduce the length of the validities 
array?
  -//
  +//
  +// Scan back along the pipelineCacheKey for
  +// for any cachepoint(s)
  +//
  +this.toCacheKey.removeUntilCachePoint();
  +
  +//
  +// adjust the validities object
  +// to reflect the new length of the pipeline cache key.
  +//
  +// REVISIT: Is it enough to simply reduce the length of the 
validities array?
  +//
   if (this.toCacheKey.size()0) {
   SourceValidity[] copy = new 
SourceValidity[this.toCacheKey.size()];
   System.arraycopy(this.toCacheSourceValidities, 0,
  @@ -316,8 +316,8 @@
   while ( itt.hasNext() ) {
   next = (XMLConsumer) itt.next();
   
  -// if we have cacheable transformers,
  -// check the tranformers for cachepoints
  +// if we have cacheable transformers,
  +// check the tranformers for cachepoints
   if (cacheableTransformerCount  0) {
   if ( (this.isCachePoint.get(currentTransformerIndex) != 
null)  
   
((Boolean)this.isCachePoint.get(currentTransformerIndex)).booleanValue()) {
  @@ -330,8 +330,8 @@
   }
   
   
  -// Serializer is not cacheable,
  -// but we  have the longest cacheable key. Do default longest key 
caching
  +// Serializer is not cacheable,
  +// but we  have the longest cacheable key. Do default 
longest key caching
   if (localXMLSerializer != null) {
   if (cacheableTransformerCount == 0) {
   next = new XMLTeePipe(next, localXMLSerializer);
  @@ -349,15 +349,15 @@
   next = super.lastConsumer;
   
   
  -// if the serializer is not cacheable, but all the transformers are:
  -// (this is default longest key caching)
  +// if the serializer is not cacheable, but all the transformers 
are:
  +// (this is default longest key caching)
   if (localXMLSerializer != null) {
   next = new XMLTeePipe(next, localXMLSerializer);
   this.xmlSerializerArray.add(localXMLSerializer);
   localXMLSerializer = null;
   }
   
  -// else if the serializer is cacheable and has cocoon views
  +// else if the serializer is cacheable and has cocoon views
   else if ((currentTransformerIndex == 
this.firstNotCacheableTransformerIndex) 
   this.nextIsCachePoint) {
   cachePointXMLSerializer = 
((XMLSerializer)this.manager.lookup( XMLSerializer.ROLE ));
  @@ -381,8 +381,8 @@
   
   if (cacheableTransformerCount = 
this.firstProcessedTransformerIndex) {
   
  -// if we have cacheable transformers left,
  -// then check the tranformers for cachepoints
  +// if we have cacheable transformers left,
  +// then check the tranformers for cachepoints
   if (cacheableTransformerCount

cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/scheduler readme.txt

2003-08-27 Thread cziegeler
cziegeler2003/08/26 23:32:08

  Modified:src/scratchpad/src/org/apache/cocoon/components/scheduler
readme.txt
  Log:
  Adding pointer to wiki docs; Thanks Tony!
  
  Revision  ChangesPath
  1.3   +5 -0  
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/scheduler/readme.txt
  
  Index: readme.txt
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/scheduler/readme.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- readme.txt26 Aug 2003 06:39:56 -  1.2
  +++ readme.txt27 Aug 2003 06:32:08 -  1.3
  @@ -30,3 +30,8 @@
   !-- This is a sample target, that is called as configured in the sample above --
   component role=org.apache.avalon.cornerstone.services.scheduler.Target/test 
  class=org.apache.cocoon.components.scheduler.TestTarget/
  +   
  +For more information, see:
  +
  +http://wiki.cocoondev.org/Wiki.jsp?page=Scheduler
  +
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components PortalManager.java

2003-08-27 Thread cziegeler
cziegeler2003/08/27 02:08:12

  Modified:src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components
PortalManager.java
  Log:
  Fixing classcast
  
  Revision  ChangesPath
  1.10  +7 -4  
cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManager.java
  
  Index: PortalManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PortalManager.java7 Aug 2003 17:13:39 -   1.9
  +++ PortalManager.java27 Aug 2003 09:08:12 -  1.10
  @@ -1860,9 +1860,12 @@
   delete = this.getProfileID(PortalManager.BUILDTYPE_VALUE_GLOBAL, 
null, null, false);
   delete = delete.substring(1, delete.lastIndexOf(':') + 1);
   while (keys.hasMoreElements()) {
  -currentKey = (String)keys.nextElement();
  -if (currentKey.startsWith(delete)) {
  -store.remove(currentKey);
  +Object k = keys.nextElement();
  +if ( k instanceof String ) {
  +currentKey = (String)k;
  +if (currentKey.startsWith(delete)) {
  +store.remove(currentKey);
  +}
   }
   }
   }
  
  
  


cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components PipelineAuthenticator.java

2003-08-26 Thread cziegeler
cziegeler2003/08/25 23:43:32

  Modified:
src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components
PipelineAuthenticator.java
  Log:
  Fixing NPE in authentication reported bySonny Sukumar ([EMAIL PROTECTED])
  
  Revision  ChangesPath
  1.3   +3 -1  
cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java
  
  Index: PipelineAuthenticator.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PipelineAuthenticator.java4 Aug 2003 03:06:30 -   1.2
  +++ PipelineAuthenticator.java26 Aug 2003 06:43:32 -  1.3
  @@ -280,6 +280,8 @@
   
   if (doc != null) {
   data = DOMUtil.getFirstNodeFromPath(doc, new String[] 
{authentication,data}, false);
  +} else {
  +doc = DOMUtil.createDocument();
   }
   
   // now create the following xml:
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/reading - New directory

2003-08-25 Thread cziegeler
cziegeler2003/08/25 00:41:02

  cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/reading - New directory


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application - New directory

2003-08-25 Thread cziegeler
cziegeler2003/08/25 00:41:02

  cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application - New 
directory


cvs commit: cocoon-2.1/src/blocks/html/lib .cvsignore jtidy-04aug2000r7-dev.jar

2003-08-25 Thread cziegeler
cziegeler2003/08/25 00:41:18

  Modified:.gump.xml
   lib  jars.xml
  Added:   src/blocks/portal/java/org/apache/cocoon/portal/reading
ProxyReader.java
   src/blocks/portal/java/org/apache/cocoon/portal/application
PortalApplicationConfig.java
PortalApplicationConfigFactory.java
   src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl
ApplicationCopletAdapter.java
CachingURICopletAdapter.java
   src/blocks/portal/java/org/apache/cocoon/portal/transformation
LinkTransformer.java NewEventLinkTransformer.java
ProxyTransformer.java
   lib/optional jtidy-04aug2000r7-dev.jar
   src/blocks/html/lib .cvsignore
  Removed: src/blocks/html/lib jtidy-04aug2000r7-dev.jar
  Log:
  Contributions to the portal from Friedrich Klenner ([EMAIL PROTECTED]),
  Gerald Kahrer ([EMAIL PROTECTED]) and Gernot Koller ([EMAIL PROTECTED]).
  
  Revision  ChangesPath
  1.76  +2 -1  cocoon-2.1/gump.xml
  
  http://cvs.apache.org/viewcvs/cocoon-2.1/gump.xml.diff?r1=1.75r2=1.76
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/reading/ProxyReader.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/reading/ProxyReader.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application/PortalApplicationConfig.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application/PortalApplicationConfig.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application/PortalApplicationConfigFactory.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/application/PortalApplicationConfigFactory.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/ApplicationCopletAdapter.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/ApplicationCopletAdapter.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/LinkTransformer.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/LinkTransformer.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java?rev=1.1
  
  
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java
  
  
http://cvs.apache.org/viewcvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java?rev=1.1
  
  
  1.80  +2 -2  cocoon-2.1/lib/jars.xml
  
  http://cvs.apache.org/viewcvs/cocoon-2.1/lib/jars.xml.diff?r1=1.79r2=1.80
  
  
  1.3   +0 -0  cocoon-2.1/lib/optional/jtidy-04aug2000r7-dev.jar
  
Binary file
  
  
  1.3   +0 -0  cocoon-2.1/src/blocks/html/lib/.cvsignore
  
Binary file
  
  


cvs commit: cocoon-2.1/src/blocks/portal/conf portal.xconf

2003-08-21 Thread cziegeler
cziegeler2003/08/20 23:41:19

  Modified:src/blocks/portal/java/org/apache/cocoon/portal/impl
PortalServiceImpl.java
   src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
MapProfileLS.java
   src/blocks/portal/conf portal.xconf
  Added:   src/blocks/portal/java/org/apache/cocoon/components/persistence
CastorSourceConverter.java
RequestDataStoreImpl.java ConverterException.java
RequestDataStore.java
  Removed: src/blocks/portal/java/org/apache/cocoon/components/persistance
ConverterException.java CastorSourceConverter.java
RequestDataStoreImpl.java RequestDataStore.java
  Log:
  Rename :)
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/components/persistence/CastorSourceConverter.java
  
  Index: CastorSourceConverter.java
  ===
  /*
  
   
 The Apache Software License, Version 1.1
   
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
  this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
  include  the following  acknowledgment:  This product includes  software
  developed  by the  Apache Software Foundation  (http://www.apache.org/).
  Alternately, this  acknowledgment may  appear in the software itself,  if
  and wherever such third-party acknowledgments normally appear.
  
   4. The names Apache Cocoon and  Apache Software Foundation must  not  be
  used to  endorse or promote  products derived from  this software without
  prior written permission. For written permission, please contact
  [EMAIL PROTECTED]
  
   5. Products  derived from this software may not  be called Apache, nor may
  Apache appear  in their name,  without prior written permission  of the
  Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   Stefano Mazzocchi  [EMAIL PROTECTED]. For more  information on the Apache
   Software Foundation, please see http://www.apache.org/.
  
  */
  package org.apache.cocoon.components.persistence;
  
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.io.OutputStreamWriter;
  import java.io.Writer;
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map;
  import java.util.Map.Entry;
  
  import org.apache.avalon.framework.activity.Initializable;
  import org.apache.avalon.framework.component.Component;
  import org.apache.avalon.framework.component.ComponentException;
  import org.apache.avalon.framework.component.ComponentManager;
  import org.apache.avalon.framework.component.Composable;
  import org.apache.avalon.framework.configuration.Configurable;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.avalon.framework.configuration.ConfigurationException;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  import org.apache.avalon.framework.thread.ThreadSafe;
  import org.apache.cocoon.components.source.SourceUtil;
  import org.apache.cocoon.portal.util.ReferenceFieldHandler;
  import org.apache.excalibur.source.Source;
  import org.apache.excalibur.source.SourceResolver

cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/components/persistence - New directory

2003-08-21 Thread cziegeler
cziegeler2003/08/20 23:41:13

  cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/components/persistence - New 
directory


cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/scheduler TestTarget.java DefaultTimeScheduler.java Scheduler.java readme.txt DefaultScheduler.java DefaultThreadManager.java SchedulerAction.java ConfigurableTarget.java

2003-08-21 Thread cziegeler
cziegeler2003/08/21 05:44:18

  Added:   src/scratchpad/lib cornerstone-scheduler-api-20030821.jar
cornerstone-threads-impl-20030821.jar
excalibur-thread-1.1.1.jar
cornerstone-scheduler-impl-20030821.jar
cornerstone-threads-api-20030821.jar
   src/scratchpad/src/org/apache/cocoon/components/scheduler
TestTarget.java DefaultTimeScheduler.java
Scheduler.java readme.txt DefaultScheduler.java
DefaultThreadManager.java SchedulerAction.java
ConfigurableTarget.java
  Log:
  Simple configurable scheduler
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/scratchpad/lib/cornerstone-scheduler-api-20030821.jar
  
Binary file
  
  
  1.1  
cocoon-2.1/src/scratchpad/lib/cornerstone-threads-impl-20030821.jar
  
Binary file
  
  
  1.1  cocoon-2.1/src/scratchpad/lib/excalibur-thread-1.1.1.jar
  
Binary file
  
  
  1.1  
cocoon-2.1/src/scratchpad/lib/cornerstone-scheduler-impl-20030821.jar
  
Binary file
  
  
  1.1  
cocoon-2.1/src/scratchpad/lib/cornerstone-threads-api-20030821.jar
  
Binary file
  
  
  1.1  
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/components/scheduler/TestTarget.java
  
  Index: TestTarget.java
  ===
  /*
  
   
 The Apache Software License, Version 1.1
   
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
  this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
  include  the following  acknowledgment:  This product includes  software
  developed  by the  Apache Software Foundation  (http://www.apache.org/).
  Alternately, this  acknowledgment may  appear in the software itself,  if
  and wherever such third-party acknowledgments normally appear.
  
   4. The names Apache Cocoon and  Apache Software Foundation must  not  be
  used to  endorse or promote  products derived from  this software without
  prior written permission. For written permission, please contact
  [EMAIL PROTECTED]
  
   5. Products  derived from this software may not  be called Apache, nor may
  Apache appear  in their name,  without prior written permission  of the
  Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   Stefano Mazzocchi  [EMAIL PROTECTED]. For more  information on the Apache
   Software Foundation, please see http://www.apache.org/.
  
  */
  package org.apache.cocoon.components.scheduler;
  
  import java.util.Date;
  
  import org.apache.avalon.cornerstone.services.scheduler.Target;
  import org.apache.avalon.framework.logger.AbstractLogEnabled;
  
  /**
   * A simple test target.
   * 
   * @since 2.1.1
   * @author a href=mailto:[EMAIL PROTECTED]Carsten Ziegeler/a
   * @version CVS $Id: TestTarget.java,v 1.1 2003/08/21 12:44:18 cziegeler Exp $
   */
  public class TestTarget 
  extends AbstractLogEnabled
  implements Target {
  
  /* (non-Javadoc)
   * @see 
org.apache.avalon.cornerstone.services.scheduler.Target#targetTriggered(java.lang.String)
   */
  public void

cvs commit: cocoon-2.1/src/documentation/xdocs/developing/webapps session.xml

2003-08-20 Thread cziegeler
cziegeler2003/08/20 00:24:53

  Modified:src/documentation/xdocs/developing/webapps session.xml
  Log:
  Adding missing note
  
  Revision  ChangesPath
  1.4   +8 -0  
cocoon-2.1/src/documentation/xdocs/developing/webapps/session.xml
  
  Index: session.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/developing/webapps/session.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- session.xml   4 Jul 2003 10:44:18 -   1.3
  +++ session.xml   20 Aug 2003 07:24:53 -  1.4
  @@ -416,6 +416,14 @@
   sourcelt;session:inputxml name=forename context=userdata 
path=/user/forenamegt;
Defaultname
   lt;/session:inputxmlgt;/source
  +pBut as always there is one drawback with this approach as well, you
  +   have to put the emsession-form-manager/em action somewhere so
  +   that it is called when the form values are submitted. As this
  +   action does no harm, it can simply be put as the first action in your
  +   main sitemap:/p
  +source
  +lt;map:act type=session-form-manager/gt;
  +/source
/s2
 /s1
   /body
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl AbstractCachingProcessingPipeline.java

2003-08-20 Thread cziegeler
cziegeler2003/08/20 01:34:16

  Modified:src/java/org/apache/cocoon/components/pipeline/impl
AbstractCachingProcessingPipeline.java
  Log:
  Don't throw an exception if the cached content is not correct. Just don't use it
  
  Revision  ChangesPath
  1.13  +48 -39
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
  
  Index: AbstractCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AbstractCachingProcessingPipeline.java11 Aug 2003 07:33:08 -  1.12
  +++ AbstractCachingProcessingPipeline.java20 Aug 2003 08:34:16 -  1.13
  @@ -719,50 +719,59 @@
   }
   SourceValidity[] validities = cachedObject.getValidityObjects();
   if (validities == null || validities.length != 1) {
  -throw new ProcessingException(Cached response is not 
correct.);
  -}
  -SourceValidity cachedValidity = validities[0];
  -int result = cachedValidity.isValid();
  -boolean valid = false;
  -if ( result == 0 ) {
  -// get reader validity and compare
  -if (isCacheableProcessingComponent) {
  -readerValidity = 
((CacheableProcessingComponent)super.reader).getValidity();
  -} else {
  -CacheValidity cv = 
((Cacheable)super.reader).generateValidity();
  -if ( cv != null ) {
  -readerValidity = 
CacheValidityToSourceValidity.createValidity( cv );
  -}
  +// to avoid getting here again and again, we delete it
  +this.cache.remove( pcKey );
  +if (this.getLogger().isDebugEnabled()) {
  +this.getLogger().debug(
  +Cached response for ' + environment.getURI() +
  +' using key:  + pcKey +  is invalid.
  +);
   }
  -if (readerValidity != null) {
  -result = cachedValidity.isValid(readerValidity);
  -if ( result == 0 ) {
  -readerValidity = null;
  +cachedResponse = null;
  +} else {
  +SourceValidity cachedValidity = validities[0];
  +int result = cachedValidity.isValid();
  +boolean valid = false;
  +if ( result == 0 ) {
  +// get reader validity and compare
  +if (isCacheableProcessingComponent) {
  +readerValidity = 
((CacheableProcessingComponent)super.reader).getValidity();
   } else {
  -valid = (result == 1);
  +CacheValidity cv = 
((Cacheable)super.reader).generateValidity();
  +if ( cv != null ) {
  +readerValidity = 
CacheValidityToSourceValidity.createValidity( cv );
  +}
   }
  +if (readerValidity != null) {
  +result = cachedValidity.isValid(readerValidity);
  +if ( result == 0 ) {
  +readerValidity = null;
  +} else {
  +valid = (result == 1);
  +}
  +}
  +} else {
  +valid = (result  0);
   }
  -} else {
  -valid = (result  0);
  -}
   
  -if (valid) {
  -if (this.getLogger().isDebugEnabled()) {
  -this.getLogger().debug(processReader: using valid 
cached content for ' + environment.getURI() + '.);
  -}
  -byte[] response = cachedObject.getResponse();
  -if (response.length  0) {
  -usedCache = true;
  -outputStream = environment.getOutputStream(0);
  -environment.setContentLength

cvs commit: cocoon-2.1/src/blocks/portal/samples sitemap.xmap

2003-08-20 Thread cziegeler
cziegeler2003/08/20 05:05:35

  Modified:
src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
WindowAspect.java CompositeContentAspect.java
TabContentAspect.java
   src/blocks/portal/conf portal.samplesxconf
   src/blocks/portal/samples sitemap.xmap
  Log:
  Fixing parameter handling
  
  Revision  ChangesPath
  1.6   +10 -3 
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java
  
  Index: WindowAspect.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/WindowAspect.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WindowAspect.java 19 Aug 2003 14:09:34 -  1.5
  +++ WindowAspect.java 20 Aug 2003 12:05:35 -  1.6
  @@ -81,19 +81,25 @@
   final PreparedConfiguration config = 
(PreparedConfiguration)context.getAspectConfiguration();
   final CopletInstanceData copletInstanceData = 
((CopletLayout)layout).getCopletInstanceData();
   
  -XMLUtils.startElement(contenthandler, config.tagName);
  +if ( config.rootTag ) {
  +XMLUtils.startElement(contenthandler, config.tagName);
  +}
   XMLUtils.createElement(contenthandler, title, 
copletInstanceData.getCopletData().getTitle());
   
   context.invokeNext( layout, service, contenthandler );
   
  -XMLUtils.endElement(contenthandler, config.tagName);
  +if ( config.rootTag ) {
  +XMLUtils.endElement(contenthandler, config.tagName);
  +}
   }
   
   protected class PreparedConfiguration {
   public String tagName;
  +public boolean rootTag;
   
   public void takeValues(PreparedConfiguration from) {
   this.tagName = from.tagName;
  +this.rootTag = from.rootTag;
   }
   }
   
  @@ -104,6 +110,7 @@
   throws ParameterException {
   PreparedConfiguration pc = new PreparedConfiguration();
   pc.tagName = configuration.getParameter(tag-name, window);
  +pc.rootTag = configuration.getParameterAsBoolean(root-tag, true);
   return pc;
   }
   
  
  
  
  1.5   +10 -3 
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CompositeContentAspect.java
  
  Index: CompositeContentAspect.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CompositeContentAspect.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CompositeContentAspect.java   19 Aug 2003 14:09:34 -  1.4
  +++ CompositeContentAspect.java   20 Aug 2003 12:05:35 -  1.5
  @@ -85,9 +85,13 @@
   throws SAXException {
   PreparedConfiguration config = 
(PreparedConfiguration)context.getAspectConfiguration();
   
  -XMLUtils.startElement(handler, config.tagName);
  +if ( config.rootTag ) {
  +XMLUtils.startElement(handler, config.tagName);
  +}
   super.toSAX(context, layout, service, handler);
  -XMLUtils.endElement(handler, config.tagName);
  +if ( config.rootTag ) {
  +XMLUtils.endElement(handler, config.tagName);
  +}
   
   }
   
  @@ -120,9 +124,11 @@
   
   protected class PreparedConfiguration {
   public String tagName;
  +public boolean rootTag;
   
   public void takeValues(PreparedConfiguration from) {
   this.tagName = from.tagName;
  +this.rootTag = from.rootTag;
   }
   }
   
  @@ -133,6 +139,7 @@
   throws ParameterException {
   PreparedConfiguration pc = new PreparedConfiguration();
   pc.tagName = configuration.getParameter(tag-name, composite);
  +pc.rootTag = configuration.getParameterAsBoolean(root-tag, true);
   return pc;
   }
   
  
  
  
  1.11  +7 -3  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
  
  Index: TabContentAspect.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TabContentAspect.java 19 Aug 2003 14:09:34 -  1.10
  +++ TabContentAspect.java 20 Aug 2003 12:05:35 -  1.11
  @@ -88,7 +88,9 @@
   if (layout instanceof CompositeLayout) {
   TabPreparedConfiguration config = 
(TabPreparedConfiguration

cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components AbstractSessionComponent.java

2003-08-20 Thread cziegeler
cziegeler2003/08/20 05:11:13

  Modified:src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components
AbstractSessionComponent.java
  Log:
  Changing comment
  
  Revision  ChangesPath
  1.3   +7 -3  
cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/AbstractSessionComponent.java
  
  Index: AbstractSessionComponent.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/AbstractSessionComponent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractSessionComponent.java 4 May 2003 20:19:41 -   1.2
  +++ AbstractSessionComponent.java 20 Aug 2003 12:11:13 -  1.3
  @@ -73,8 +73,12 @@
   import org.xml.sax.SAXException;
   
   /**
  - * The base class for all components
  - *
  + * The base class for own components
  + * This is only here for compatibility
  + * 
  + * @deprecated Lookup the components yourself and use contextualizable to get the
  + * current object model
  + * 
* @author a href=mailto:[EMAIL PROTECTED]Carsten Ziegeler/a
* @version CVS $Id$
   */
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/util/log XMLCocoonLogFormatter.java CocoonLogFormatter.java

2003-08-19 Thread cziegeler
cziegeler2003/08/19 01:43:00

  Modified:.status.xml
   src/java/org/apache/cocoon/util/log
XMLCocoonLogFormatter.java CocoonLogFormatter.java
  Log:
 action dev=CZ type=add fixes-bug=21848 due-to=Unico Hommes 
due-to-email=[EMAIL PROTECTED]
   Applying patch for using 'host' in the logging patterns.
 /action
  
  Revision  ChangesPath
  1.127 +4 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- status.xml19 Aug 2003 01:36:30 -  1.126
  +++ status.xml19 Aug 2003 08:43:00 -  1.127
  @@ -189,6 +189,9 @@
 changes
   
release version=@version@ date=@date@
  +   action dev=CZ type=add fixes-bug=21848 due-to=Unico Hommes 
due-to-email=[EMAIL PROTECTED]
  + Applying patch for using 'host' in the logging patterns.
  +   /action
  action dev=JH type=fix fixes-bug=22498 due-to=Conal Tuohy 
due-to-email=[EMAIL PROTECTED]
Lucene block: LuceneIndexTransformer configuration fixed.
  /action
  
  
  
  1.2   +28 -2 
cocoon-2.1/src/java/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java
  
  Index: XMLCocoonLogFormatter.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLCocoonLogFormatter.java9 Mar 2003 00:09:44 -   1.1
  +++ XMLCocoonLogFormatter.java19 Aug 2003 08:43:00 -  1.2
  @@ -88,6 +88,7 @@
* licodertime/code : outputs the relative time (lt;relative-timegt;).li
* licodethrowable/code : outputs the exception (lt;throwablegt;).li
* licodepriority/code : outputs the priority (lt;prioritygt;).li
  + * licodehost/code : outputs the request host header (lt;prioritygt;).li
* /ul
*
* @author a href=mailto:[EMAIL PROTECTED]Peter Donald/a
  @@ -111,6 +112,7 @@
   protected final static int TYPE_CLASS= 7;
   protected final static int TYPE_CLASS_SHORT= 8;
   protected final static int TYPE_THREAD= 9;
  +protected final static int TYPE_HOST  = 10;
   
   public final static String[] typeStrings = new String[] {uri, // 0
category,  // 1
  @@ -121,7 +123,8 @@
priority,  // 6
class,// 7
class:short, // 8
  - thread};  // 9
  + thread,   // 9
  + host};   // 10
   
   protected final static String EOL = System.getProperty(line.separator, \n);
   protected final SimpleDateFormat dateFormatter = new 
SimpleDateFormat((-MM-dd) HH:mm.ss:SSS);
  @@ -215,6 +218,12 @@
   sb.append(event.getPriority().getName());
   sb.append(/priority).append(EOL);
   break;
  +
  +case TYPE_HOST:
  +sb.append(host);
  +sb.append(getHost(event.getContextMap()));
  +sb.append(/host);
  +break;
   }
   }
   sb.append(/log-entry);
  @@ -243,6 +252,23 @@
   return result;
   }
   
  +private String getHost(ContextMap ctxMap) {
  +String result = Unknown-host;
  +
  +if (ctxMap != null) {
  +Object context = ctxMap.get(objectModel);
  +if (context != null  context instanceof Map) {
  +// Get the request
  +Request request = ObjectModelHelper.getRequest((Map)context);
  +if (request != null) {
  +result = request.getHeader(host);
  +}
  +}
  +}
  +
  +return result;
  +}
  +
   /**
* Find the request id that is being processed.
*/
  
  
  
  1.2   +29 -1 
cocoon-2.1/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java
  
  Index: CocoonLogFormatter.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/util/log/CocoonLogFormatter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CocoonLogFormatter.java   9 Mar 2003 00:09:44 -   1.1
  +++ CocoonLogFormatter.java   19 Aug 2003 08:43:00 -  1.2
  @@ -87,12 +87,14 @@
   protected final static int TYPE_CLASS  = MAX_TYPE + 1;
   protected final static int TYPE_URI= MAX_TYPE + 2;
   protected final static int TYPE_THREAD = MAX_TYPE + 3;
  +protected final static int TYPE_HOST   = MAX_TYPE + 4;
   
   protected final static String  TYPE_CLASS_STR

cvs commit: cocoon-2.1/src/blocks/portal/conf portal.samplesxconf

2003-08-19 Thread cziegeler
cziegeler2003/08/19 02:18:17

  Modified:src/blocks/portal/conf portal.samplesxconf
  Log:
  Fixing conf
  
  Revision  ChangesPath
  1.3   +1 -1  cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf
  
  Index: portal.samplesxconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- portal.samplesxconf   29 Jul 2003 06:30:06 -  1.2
  +++ portal.samplesxconf   19 Aug 2003 09:18:17 -  1.3
  @@ -1,6 +1,6 @@
   ?xml version=1.0?
   
  -samplesxconf xpath=/cocoon unless=[EMAIL 
PROTECTED]'org.apache.cocoon.portal.profile.ProfileManager']
  +samplesxconf xpath=/cocoon unless=[EMAIL 
PROTECTED]'org.apache.cocoon.portal.profile.ProfileManager/Auth']
   
component 
class=org.apache.cocoon.portal.profile.impl.AuthenticationProfileManager 
logger=portal role=org.apache.cocoon.portal.profile.ProfileManager/Auth
/component
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl CompositeContentAspect.java WindowAspect.java DefaultCopletAspect.java TabContentAspect.java

2003-08-19 Thread cziegeler
cziegeler2003/08/19 07:09:34

  Modified:src/blocks/portal/java/org/apache/cocoon/portal/util
CopletDataReferenceFieldHandler.java
ParameterFieldHandler.java
CopletInstanceDataFieldHandler.java
AspectDataFieldHandler.java
AttributesFieldHandler.java
CopletBaseDataReferenceFieldHandler.java
CopletDataFieldHandler.java
CopletInstanceDataReferenceFieldHandler.java
ConfigurationFieldHandler.java
CopletBaseDataFieldHandler.java
ReferenceFieldHandler.java
   
src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
CompositeContentAspect.java WindowAspect.java
DefaultCopletAspect.java TabContentAspect.java
  Added:   src/blocks/portal/java/org/apache/cocoon/portal/util
AbstractFieldHandler.java
  Log:
  Removing use of deprecated code; removing duplicate code
  
  Revision  ChangesPath
  1.4   +1 -4  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/CopletDataReferenceFieldHandler.java
  
  Index: CopletDataReferenceFieldHandler.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/CopletDataReferenceFieldHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CopletDataReferenceFieldHandler.java  10 Jul 2003 13:16:56 -  1.3
  +++ CopletDataReferenceFieldHandler.java  19 Aug 2003 14:09:34 -  1.4
  @@ -62,9 +62,6 @@
*/
   public class CopletDataReferenceFieldHandler extends ReferenceFieldHandler {
   
  -public void checkValidity(Object object) {
  -}
  -
   public Object getValue(Object object) {
   CopletData copletData = ((CopletInstanceData) object).getCopletData();
   if (copletData != null) {
  
  
  
  1.4   +2 -6  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/ParameterFieldHandler.java
  
  Index: ParameterFieldHandler.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/ParameterFieldHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParameterFieldHandler.java10 Jul 2003 13:16:55 -  1.3
  +++ ParameterFieldHandler.java19 Aug 2003 14:09:34 -  1.4
  @@ -55,7 +55,6 @@
   import java.util.Map;
   
   import org.apache.cocoon.portal.layout.Parameters;
  -import org.exolab.castor.mapping.FieldHandler;
   import org.exolab.castor.mapping.MapItem;
   
   /**
  @@ -65,11 +64,8 @@
* 
* @version CVS $Id$
*/
  -public class ParameterFieldHandler implements FieldHandler {
  +public class ParameterFieldHandler extends AbstractFieldHandler {
   
  -public void checkValidity(Object object) {
  -}
  -
   public Object getValue(Object object) {
   HashMap map = new HashMap();
   Iterator iterator =
  
  
  
  1.4   +2 -6  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/CopletInstanceDataFieldHandler.java
  
  Index: CopletInstanceDataFieldHandler.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/CopletInstanceDataFieldHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CopletInstanceDataFieldHandler.java   10 Jul 2003 13:16:56 -  1.3
  +++ CopletInstanceDataFieldHandler.java   19 Aug 2003 14:09:34 -  1.4
  @@ -56,7 +56,6 @@
   
   import org.apache.cocoon.portal.coplet.CopletInstanceData;
   import org.apache.cocoon.portal.profile.impl.CopletInstanceDataManager;
  -import org.exolab.castor.mapping.FieldHandler;
   
   /**
* Field handler for CopletInstanceData instances.
  @@ -65,10 +64,7 @@
* 
* @version CVS $Id$
*/
  -public class CopletInstanceDataFieldHandler implements FieldHandler {
  -
  -public void checkValidity(Object object) {
  -}
  +public class CopletInstanceDataFieldHandler extends AbstractFieldHandler {
   
   public Object getValue(Object object) {
   Map map = ((CopletInstanceDataManager) object).getCopletInstanceData();
  
  
  
  1.4   +4 -6  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/AspectDataFieldHandler.java
  
  Index: AspectDataFieldHandler.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/util/AspectDataFieldHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4

cvs commit: cocoon-2.1/lib/optional castor-0.9.5-xml.jar castor-0.9.4.3-xml.jar

2003-08-18 Thread cziegeler
cziegeler2003/08/18 03:10:22

  Modified:lib  jars.xml
  Added:   lib/optional castor-0.9.5-xml.jar
  Removed: lib/optional castor-0.9.4.3-xml.jar
  Log:
  Updating to latest castor release
  
  Revision  ChangesPath
  1.78  +2 -2  cocoon-2.1/lib/jars.xml
  
  Index: jars.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/lib/jars.xml,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- jars.xml  15 Aug 2003 21:56:00 -  1.77
  +++ jars.xml  18 Aug 2003 10:10:22 -  1.78
  @@ -602,7 +602,7 @@
   titleCastor/title
   description/description
   used-byCastorTransformer and precept/used-by
  -liboptional/castor-0.9.4.3-xml.jar/lib
  +liboptional/castor-0.9.5-xml.jar/lib
   homepagehttp://castor.exolab.org/homepage
 /file
   
  
  
  
  1.1  cocoon-2.1/lib/optional/castor-0.9.5-xml.jar
  
Binary file
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/installing updating.xml

2003-08-18 Thread cziegeler
cziegeler2003/08/18 05:29:31

  Modified:src/documentation/xdocs/installing updating.xml
  Log:
  This is currently not true
  
  Revision  ChangesPath
  1.17  +5 -0  cocoon-2.1/src/documentation/xdocs/installing/updating.xml
  
  Index: updating.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/installing/updating.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- updating.xml  13 Jul 2003 15:21:20 -  1.16
  +++ updating.xml  18 Aug 2003 12:29:31 -  1.17
  @@ -145,6 +145,10 @@
  /s2
  s2 title=XSLT Processor
   p
  +There are some issues related to JDK 1.4
  +/p
  +!--
  +p
   The default XSLT processor has changed, and there are some issues related 
to JDK 1.4
   /p
   s3 title=Xalan vs. XSLTC
  @@ -166,6 +170,7 @@
 that gives errors.
   /p
/s3
  +--
s3 title=XML/XSLT with JDK 1.4
 pAnother serious issue is the presence of the Xalan and Xerces
  package in the JDK 1.4. For general information on this please read the
  
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/installing updating.xml

2003-08-18 Thread cziegeler
cziegeler2003/08/18 05:34:28

  Modified:src/documentation/xdocs/installing updating.xml
  Log:
  Adding a little bit about Cacheable
  
  Revision  ChangesPath
  1.18  +16 -0 cocoon-2.1/src/documentation/xdocs/installing/updating.xml
  
  Index: updating.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/installing/updating.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- updating.xml  18 Aug 2003 12:29:31 -  1.17
  +++ updating.xml  18 Aug 2003 12:34:28 -  1.18
  @@ -209,6 +209,22 @@
WEB-INF/ directory.
   /p
  /s2
  +   s2 title=Caching
  +pAlthough the basic caching mechanism is still the same (each sitemap 
component
  +   in the pipeline is queried), the interface for a component have been
  +   improved as well./p
  +pThe old interface emCacheable/em is deprecated in favour of the new
  +  emCacheableProcessingComponent/em interface. The basic behaviour of this
  +  interface has been preserved, however the method names and the signatures
  +  have changed a little bit.
  +  /p
  +pSome other interfaces, like the validity of the cached information has
  +  moved to the source packacke in Avalon Excalibur./p
  +pThe old interfaces are still support but deprecated, so it's advisable to
  +  update your components. However, you can support both interfaces at the
  +  same time, making your component runable in old and new Cocoon installations
  +  at the same time./p
  +   /s2
  s2 title=Stores
   pThe Store and StoreJanitor components and implementations have been moved to
  Avalon Excalibur./p
  
  
  


cvs commit: cocoon-2.0 changes.xml

2003-08-18 Thread cziegeler
cziegeler2003/08/18 05:59:34

  Modified:src/java/org/apache/cocoon/transformation
SQLTransformer.java
   .changes.xml
  Log:
action dev=CZ type=fix fixes-bug=12173
  Applying patch from Renaud Bruyeron ([EMAIL PROTECTED]) that fixes 
  the prematurely closing of the connection causing in the SQL Transformer.
/action
  
  Revision  ChangesPath
  1.6   +4 -3  
cocoon-2.0/src/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===
  RCS file: 
/home/cvs/cocoon-2.0/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SQLTransformer.java   11 Jun 2003 00:28:00 -  1.5
  +++ SQLTransformer.java   18 Aug 2003 12:59:33 -  1.6
  @@ -1092,8 +1092,9 @@
   transformer.getTheLogger().error( Caught a SQLException, e );
   throw e;
   } finally {
  -conn.close();
  -conn = null;// To make sure we don't use this connection 
again.
  +// Not closing the connection here fixes bug 12173!
  +// conn.close();
  +// conn = null;// To make sure we don't use this connection 
again.
   }
   }
   
  
  
  
  1.34  +5 -1  cocoon-2.0/changes.xml
  
  Index: changes.xml
  ===
  RCS file: /home/cvs/cocoon-2.0/changes.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- changes.xml   11 Aug 2003 06:23:18 -  1.33
  +++ changes.xml   18 Aug 2003 12:59:33 -  1.34
  @@ -43,6 +43,10 @@
/devs
   
release version=@version@ date=@date@
  +  action dev=CZ type=fix fixes-bug=12173
  +Applying patch from Renaud Bruyeron ([EMAIL PROTECTED]) that fixes 
  +the prematurely closing of the connection causing in the SQL Transformer.
  +  /action
 action dev=CZ type=fix fixes-bug=14348
   Applying patch from Marco Rolappe ([EMAIL PROTECTED]) that fixes 
   the caching problem when
  
  
  


cvs commit: cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation SQLTransformer.java

2003-08-18 Thread cziegeler
cziegeler2003/08/18 06:00:47

  Modified:.status.xml
   src/blocks/databases/java/org/apache/cocoon/transformation
SQLTransformer.java
  Log:
action dev=CZ type=fix fixes-bug=12173
  Applying patch from Renaud Bruyeron ([EMAIL PROTECTED]) that fixes 
  the prematurely closing of the connection causing in the SQL Transformer.
/action
  
  Revision  ChangesPath
  1.125 +5 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- status.xml16 Aug 2003 14:37:06 -  1.124
  +++ status.xml18 Aug 2003 13:00:46 -  1.125
  @@ -189,6 +189,10 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=CZ type=fix fixes-bug=12173
  +Applying patch from Renaud Bruyeron ([EMAIL PROTECTED]) that fixes 
  +the prematurely closing of the connection causing in the SQL Transformer.
  +  /action
  action dev=JH type=update fixes-bug=22479
due-to=Mark Leicester due-to-email=[EMAIL PROTECTED]
Midi block: added transposition and inversion stylesheets and samples.
  
  
  
  1.8   +4 -3  
cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SQLTransformer.java   18 Jul 2003 14:46:30 -  1.7
  +++ SQLTransformer.java   18 Aug 2003 13:00:46 -  1.8
  @@ -1093,8 +1093,9 @@
   transformer.getTheLogger().error( Caught a SQLException, e );
   throw e;
   } finally {
  -conn.close();
  -conn = null;// To make sure we don't use this connection 
again.
  +// Not closing the connection here fixes bug 12173!
  +// conn.close();
  +// conn = null;// To make sure we don't use this connection 
again.
   }
   }
   
  
  
  


cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript - New directory

2003-08-18 Thread cziegeler
cziegeler2003/08/18 07:08:02

  
cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript
 - New directory


cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow - New directory

2003-08-18 Thread cziegeler
cziegeler2003/08/18 07:08:01

  
cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow
 - New directory


cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript auth.js

2003-08-18 Thread cziegeler
cziegeler2003/08/18 07:08:05

  Added:   
src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript
auth.js
  Log:
  Adding empty start for flow integration
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/flow/javascript/auth.js
  
  Index: auth.js
  ===
  /*
   
 The Apache Software License, Version 1.1
   
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
  this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
  include  the following  acknowledgment:  This product includes  software
  developed  by the  Apache Software Foundation  (http://www.apache.org/).
  Alternately, this  acknowledgment may  appear in the software itself,  if
  and wherever such third-party acknowledgments normally appear.
  
   4. The names Apache Cocoon and  Apache Software Foundation must  not  be
  used to  endorse or promote  products derived from  this software without
  prior written permission. For written permission, please contact
  [EMAIL PROTECTED]
  
   5. Products  derived from this software may not  be called Apache, nor may
  Apache appear  in their name,  without prior written permission  of the
  Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   Stefano Mazzocchi  [EMAIL PROTECTED]. For more  information on the Apache
   Software Foundation, please see http://www.apache.org/.
  
  */
  
  /**
  
 WARNING   -  THIS IS EXPERIMENTAL STUFF!!! Use it at your own risk
  */
  
  function isAuthenticated(handler) {
  var authMgr = null;
  try {
  authMgr = 
cocoon.getComponent(Packagesorg.apache.cocoon.webapps.authentication.AuthenticationManager.ROLE);
  
  return authMgr.isAuthenticated(handler);
  } finally {
  cocoon.releaseComponent(authMgr);
  }
  }
  
  
  


cvs commit: cocoon-2.1/src/webapp/WEB-INF cocoon.xconf

2003-08-15 Thread cziegeler
cziegeler2003/08/15 06:42:31

  Modified:lib  jars.xml
   src/webapp/WEB-INF cocoon.xconf
  Added:   lib/core excalibur-store-20030815.jar
  Removed: lib/core excalibur-store-20030726.jar
  Log:
  Updating to latest store version
  
  Revision  ChangesPath
  1.1  cocoon-2.1/lib/core/excalibur-store-20030815.jar
  
Binary file
  
  
  1.76  +2 -2  cocoon-2.1/lib/jars.xml
  
  Index: jars.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/lib/jars.xml,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- jars.xml  7 Aug 2003 16:40:22 -   1.75
  +++ jars.xml  15 Aug 2003 13:42:31 -  1.76
  @@ -184,7 +184,7 @@
 support high level server development.
   /description
   used-byCocoon/used-by
  -libcore/excalibur-store-20030726.jar/lib
  +libcore/excalibur-store-20030815.jar/lib
   homepagehttp://avalon.apache.org/excalibur//homepage
 /file
   
  
  
  
  1.26  +7 -1  cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- cocoon.xconf  7 Aug 2003 08:40:39 -   1.25
  +++ cocoon.xconf  15 Aug 2003 13:42:31 -  1.26
  @@ -451,12 +451,16 @@
 |-Xmx2
 | store-janitor settings:
 |parameter name=freememory value=500/
  -  |parameter name=heapsize value=15000/
  +  |parameter name=heapsize value=19600/
 |
 | It is recommended to have heapsize equal to -Xmx, especially on Sun's
 | JVM which are unable to shrink its heap once it grows above minimum.
 | Freememory should be greater than amount of memory necessary for normal
 | application operation.
  +  | BUT: The heap size of the memory of the JVM is a little bit less than
  +  |  the value you specify for -Xmx, so you have to set the heapsize
  +  |  for the store janitor to a value which is lower (2% less thems
  +  |  to be a working value).
 +--
 store-janitor logger=core.store.janitor
!-- How much free memory shall be available in the jvm --
  @@ -474,6 +478,8 @@
!-- How much percent of the elements of each registered Store
 shall be removed when low on memory. Default 10% --
parameter name=percent_to_free value=10/
  + !-- Invoke the garbage collector when low memory is reached --
  + parameter name=invokegc value=false/
 /store-janitor
   
   !-- = Protocol Handlers === --
  
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/concepts caching.xml

2003-08-14 Thread cziegeler
cziegeler2003/08/07 08:18:52

  Modified:src/documentation/xdocs/userdocs/concepts caching.xml
  Log:
  Start updating caching doc
  
  Revision  ChangesPath
  1.3   +44 -43cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml
  
  Index: caching.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- caching.xml   7 Aug 2003 15:09:57 -   1.2
  +++ caching.xml   7 Aug 2003 15:18:52 -   1.3
  @@ -22,7 +22,7 @@
  how they can be configured and how to implement your own cacheable 
components.
   /p
 /s1
  -  s1 title=How to configure caching
  +  s1 title=How to Configure Caching
 pThe caching can be turned on and off on a per pipeline setting in the 
sitemap.
  This means, for each emmap:pipeline/em section in a sitemap, it's 
possible to
  turn on/off caching and configure the caching algorithm./p
  @@ -62,17 +62,49 @@
 override this whereever it makes sense./p
 /s1
   !-- FIXME: THe following is OLD --  
  -  s1 title=Caching of event pipelines
  - pThe algorithm used for caching depends on the event pipeline 
configured. 
  -   For more information about configuration see the chapter below./p
  -pThe following subchapters describe the available caching 
algorithms./p
  - s2 title=The CachingEventPipeline
  - pThe CachingEventPipeline uses a very easy but effective 
approach
  - to cache the event pipelines of a request: The pipeline process
  - is cached up to the most possible point./p
  -  pEach sitemap component (generator or transformer) which might 
be
  - cacheable must implement the Cacheable interface. When the
  - event pipeline is processed each sitemap component starting 
with
  +  s1 title=The Default Caching Algorithm
  + pThe default algorithm uses a very easy but effective approach
  +   to cache a request: The pipeline process is cached up to the most 
  +   possible point./p
  +pTherefore each component in the pipeline is queried by Cocoon if it
  +supports caching. Several components, like the file generator or the xslt
  +transformer support caching. However, dynamic components like the sql 
transformer
  +or the cinclude transformer do not. Let's have a look at some examples:/p
  + s2 title=Simple Examples
  +   pIf you have the following pipeline:/p
  +  pGenerator[type=file|src=a.xml] - Transformer[type=xslt|src=a.xsl] 
- Serializer/p
  +   pThe file generator is cacheable and generates a key which uses 
the src 
  + (or the filename) to build the key. The cache uses the last 
modification date of the xml file
  + to test if the cached content is valid./p
  +   pThe xslt transformer is cacheable and generates a key which uses
  + the filename to build the unique key. The cache validity object
  + uses the last modification date of the xslt file./p
  +  pThe default serializer (html) supports the caching as well./p
  +   pAll three keys are used to build a unique key for this pipeline.
  + The first time it is invoked its response is cached. The second time
  + this pipeline is called, the cached content is get from the cache.
  + If it is still valid, the cached content is directly send to the 
client./p
  +/s2
  +s2 title=Complex Example
  +pOnly part of the following pipeline is cached:/p
  +   pGenerator[type=file|src=a.xml] - Transformer[type=xslt|src=a.xsl] 
- Transformer[type=sql] - Transformer[type=xslt|src=b.xsl] - Serializer/p
  +   pThe file generator is cacheable and generates a key which uses 
the src 
  + (or the filename) to build the key. The cache uses the last 
modification date of the xml file
  + to test if the cached content is valid./p
  +   pThe xslt transformer is cacheable and generates a key which uses
  + the filename to build the unique key. The cache validity object
  + uses the last modification date of the xslt file./p
  +   pThe sql transformer is not cacheable, so the caching algorithm 
stops
  +at this point although the last transformer is cacheable 
again./p
  +   pSo the cached response is absolutely the same as in the first 
example
  +   and therefore the unique key build from the two keys 
(from the
  +   generator

cvs commit: cocoon-2.1/src/java/org/apache/cocoon cocoon.properties

2003-08-14 Thread cziegeler
cziegeler2003/08/12 04:37:45

  Modified:.forrest.properties status.xml
   src/java/org/apache/cocoon cocoon.properties
  Log:
  New version
  
  Revision  ChangesPath
  1.21  +1 -1  cocoon-2.1/forrest.properties
  
  Index: forrest.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/forrest.properties,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- forrest.properties12 Aug 2003 11:34:49 -  1.20
  +++ forrest.properties12 Aug 2003 11:37:44 -  1.21
  @@ -6,7 +6,7 @@
   #forrest.echo=true
   
   # Project name (used to name .war file)
  -project.name=cocoon-2.1
  +project.name=cocoon-2.1.1-dev
   
   # Specifies name of Forrest skin to use
   #project.skin=forrest-site
  
  
  
  1.115 +4 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- status.xml11 Aug 2003 21:54:09 -  1.114
  +++ status.xml12 Aug 2003 11:37:44 -  1.115
  @@ -202,6 +202,9 @@
 changes
   
release version=@version@ date=@date@
  +   action dev=CZ type=addDUMMY/action
  + /release
  + release version=2.1 date=August 12 2003
 action dev=JH type=update fixes-bug=22288 due-to=Mark Leicester 
due-to-email=[EMAIL PROTECTED]
   midi block refactoring applied.
 /action
  
  
  
  1.14  +1 -1  cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties
  
  Index: cocoon.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- cocoon.properties 12 Aug 2003 11:34:49 -  1.13
  +++ cocoon.properties 12 Aug 2003 11:37:45 -  1.14
  @@ -4,7 +4,7 @@
   # very high chance of breaking the build system. Do it only if you know what
   # you're doing.
   
  -version=2.1
  +version=2.1.1-dev
   released.version=2.1
   year=1999-2003
   name=cocoon
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/pipeline AbstractProcessingPipeline.java

2003-08-14 Thread cziegeler
cziegeler2003/08/06 03:07:30

  Modified:src/java/org/apache/cocoon/components/pipeline
AbstractProcessingPipeline.java
  Log:
  The parameters was never set.
  
  Revision  ChangesPath
  1.7   +2 -1  
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
  
  Index: AbstractProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractProcessingPipeline.java   31 Jul 2003 03:54:22 -  1.6
  +++ AbstractProcessingPipeline.java   6 Aug 2003 10:07:30 -   1.7
  @@ -184,6 +184,7 @@
* Setup this component
*/
   public void setup(Parameters params) {
  +this.parameters = params;
   final String expiresValue = params.getParameter(expires, null);
   if (expiresValue != null) {
   this.expires = this.parseExpires(expiresValue);
  
  
  


cvs commit: cocoon-2.1/src/blocks/slop/java/org/apache/cocoon/slop/generation SlopGenerator.java

2003-08-14 Thread cziegeler
cziegeler2003/08/07 04:08:06

  Modified:src/java/org/apache/cocoon/components/treeprocessor/sitemap
ActionSetNodeBuilder.java
   src/blocks/slop/java/org/apache/cocoon/slop/generation
SlopGenerator.java
  Log:
  Organizing imports
  
  Revision  ChangesPath
  1.3   +1 -2  
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActionSetNodeBuilder.java
  
  Index: ActionSetNodeBuilder.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ActionSetNodeBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionSetNodeBuilder.java 7 Aug 2003 08:42:20 -   1.2
  +++ ActionSetNodeBuilder.java 7 Aug 2003 11:08:06 -   1.3
  @@ -57,7 +57,6 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder;
  -import org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder;
   import org.apache.cocoon.components.treeprocessor.ProcessingNode;
   
   /**
  
  
  
  1.2   +10 -11
cocoon-2.1/src/blocks/slop/java/org/apache/cocoon/slop/generation/SlopGenerator.java
  
  Index: SlopGenerator.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/slop/java/org/apache/cocoon/slop/generation/SlopGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SlopGenerator.java6 Aug 2003 12:59:13 -   1.1
  +++ SlopGenerator.java7 Aug 2003 11:08:06 -   1.2
  @@ -51,25 +51,24 @@
   
   package org.apache.cocoon.slop.generation;
   
  +import java.io.IOException;
  +import java.io.InputStreamReader;
  +import java.io.LineNumberReader;
  +import java.io.Serializable;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.slop.parsing.SimpleSlopParser;
  -import org.apache.cocoon.slop.interfaces.SlopParser;
  -import org.apache.cocoon.generation.ComposerGenerator;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
   import org.apache.cocoon.environment.SourceResolver;
  +import org.apache.cocoon.generation.ComposerGenerator;
  +import org.apache.cocoon.slop.interfaces.SlopParser;
  +import org.apache.cocoon.slop.parsing.SimpleSlopParser;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceValidity;
   import org.xml.sax.SAXException;
  -import org.xml.sax.helpers.AttributesImpl;
   import org.xml.sax.helpers.LocatorImpl;
  -
  -import java.io.IOException;
  -import java.io.InputStreamReader;
  -import java.io.LineNumberReader;
  -import java.io.Serializable;
  -import java.util.Map;
   
   /**
* SlopGenerator: Simple Line-Oriented Parsing of text files.
  
  
  


cvs commit: cocoon-2.1/src/blocks/eventcache/conf eventcache.xconf

2003-08-14 Thread cziegeler
cziegeler2003/08/11 02:50:40

  Modified:src/blocks/eventcache/samples sitemap.xmap
   src/blocks/eventcache/conf eventcache.xconf
  Log:
  The EventAware cache is not the default automatically; only the samples of the 
eventcache use it
  
  Revision  ChangesPath
  1.2   +7 -1  cocoon-2.1/src/blocks/eventcache/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/samples/sitemap.xmap,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sitemap.xmap  14 Jul 2003 02:50:45 -  1.1
  +++ sitemap.xmap  11 Aug 2003 09:50:40 -  1.2
  @@ -17,6 +17,11 @@
   map:actions
map:action name=cacheevent src=org.apache.cocoon.acting.CacheEventAction/
   /map:actions
  +map:pipes default=caching
  +  map:pipe name=event-aware 
src=org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline
  +parameter name=cache-role 
value=org.apache.cocoon.caching.Cache/EventAware/
  +  /map:pipe
  +/map:pipes
 /map:components 
 
 map:flow language=javascript
  @@ -30,7 +35,8 @@
 /map:views
   
 map:pipelines
  -map:pipeline
  +map:pipeline type=event-aware
  +  
 map:match pattern=flow
map:call function=cacheEvent/
 /map:match
  
  
  
  1.2   +1 -2  cocoon-2.1/src/blocks/eventcache/conf/eventcache.xconf
  
  Index: eventcache.xconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/eventcache/conf/eventcache.xconf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- eventcache.xconf  14 Jul 2003 02:50:45 -  1.1
  +++ eventcache.xconf  11 Aug 2003 09:50:40 -  1.2
  @@ -1,6 +1,5 @@
   ?xml version=1.0?
   xconf xpath=/cocoon unless=[EMAIL 
PROTECTED]'org.apache.cocoon.caching.impl.EventAwareCacheImpl']
  - !-- Override default Cache impl and use the event aware version --
  - component role=org.apache.cocoon.caching.Cache
  + component role=org.apache.cocoon.caching.Cache/EventAware
  class=org.apache.cocoon.caching.impl.EventAwareCacheImpl/
   /xconf
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/samples/news sitemap.xmap

2003-08-14 Thread cziegeler
cziegeler2003/08/13 02:12:32

  Modified:src/blocks/portal/samples/news sitemap.xmap
  Log:
  Commenting out the transformer makes sample work again
  
  Revision  ChangesPath
  1.5   +2 -0  cocoon-2.1/src/blocks/portal/samples/news/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/news/sitemap.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sitemap.xmap  11 Jul 2003 14:17:02 -  1.4
  +++ sitemap.xmap  13 Aug 2003 09:12:32 -  1.5
  @@ -18,7 +18,9 @@
   /map:match
   map:match pattern=liverss
   map:generate type=file src={request-param:feed} label=content /
  +!--
   map:transform type=rss/
  +--
   map:transform type=xslt src=content/resources/xsl/rss2html_news.xsl/
   map:serialize type=xml/
   /map:match
  
  
  


cvs commit: cocoon-2.1 status.xml

2003-08-14 Thread cziegeler
cziegeler2003/08/11 02:09:22

  Modified:.status.xml
  Log:
  Simply DTD which is better than nothing
  
  Revision  ChangesPath
  1.113 +36 -1 cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- status.xml9 Aug 2003 18:21:49 -   1.112
  +++ status.xml11 Aug 2003 09:09:22 -  1.113
  @@ -1,5 +1,40 @@
   ?xml version=1.0?
   !DOCTYPE status [
  +!ELEMENT status (developers, todo, changes)
  +!ELEMENT developers (person+)
  +!ELEMENT person EMPTY
  +!ATTLIST person
  + name CDATA #REQUIRED
  + email CDATA #REQUIRED
  + id CDATA #REQUIRED
  +
  +!ELEMENT todo (actions+)
  +!ELEMENT actions (action+)
  +!ATTLIST actions
  + priority (high | medium | low) #REQUIRED
  +
  +!ELEMENT action (#PCDATA | link | br | code)*
  +!ATTLIST action
  + context (build | code | docs) #IMPLIED
  + assigned-to CDATA #IMPLIED
  + dev CDATA #IMPLIED
  + type (add | fix | remove | update) #IMPLIED
  + fixes-bug CDATA #IMPLIED
  + due-to CDATA #IMPLIED
  + due-to-email CDATA #IMPLIED
  +
  +!ELEMENT changes (release+)
  +!ELEMENT code (#PCDATA)
  +!ELEMENT br EMPTY
  +!ELEMENT link (#PCDATA)
  +!ATTLIST link
  + href CDATA #REQUIRED
  +
  +!ELEMENT release (action+)
  +!ATTLIST release
  + version CDATA #REQUIRED
  + date CDATA #REQUIRED
  +
   !ENTITY eacute   #x000E9;
   !ENTITY ouml #x000F6;
   !ENTITY uuml #x000FC;
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/selection XPathExceptionSelector.java

2003-08-14 Thread cziegeler
cziegeler2003/08/11 23:01:40

  Modified:src/java/org/apache/cocoon/selection
XPathExceptionSelector.java
  Log:
  Applying patch for reserving the order from Volker Schmitt.
  
  Revision  ChangesPath
  1.6   +13 -14
cocoon-2.1/src/java/org/apache/cocoon/selection/XPathExceptionSelector.java
  
  Index: XPathExceptionSelector.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/selection/XPathExceptionSelector.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XPathExceptionSelector.java   10 Jul 2003 13:16:55 -  1.5
  +++ XPathExceptionSelector.java   12 Aug 2003 06:01:40 -  1.6
  @@ -53,12 +53,12 @@
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
  -import java.util.Map.Entry;
   
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.commons.collections.SequencedHashMap;
   import org.apache.commons.jxpath.CompiledExpression;
   import org.apache.commons.jxpath.JXPathContext;
   
  @@ -100,20 +100,20 @@
   Configuration[] children = conf.getChildren(exception);
   Configuration[] xPathChildren;
   
  -for (int i = 0; ichildren.length; i++) {
  +for (int i = 0; i  children.length; i++) {
   // Check if there are XPath-Expressions configured
   xPathChildren = children[i].getChildren(xpath);
  -Map xPathMap = new HashMap();
  +Map xPathMap = new SequencedHashMap(11);
   
  -for (int j = 0; jxPathChildren.length; j++) {
  +for (int j = 0; j  xPathChildren.length; j++) {
   Configuration xPathChild = xPathChildren[j];
   
   String xPathName = xPathChild.getAttribute(name);
   CompiledExpression xPath = 
JXPathContext.compile(xPathChild.getAttribute(test));
   
  -xPathMap.put(xPath, xPathName);
  +xPathMap.put(xPathName, xPath);
   }
  -if (xPathMap.size()0) {
  +if (xPathMap.size()  0) {
   // store xpath - config if there is some
   exception2XPath.put(children[i].getAttribute(name, null),
   xPathMap);
  @@ -130,23 +130,22 @@
   FindResult selectorContext = (FindResult) 
super.getSelectorContext(objectModel,
parameters);
   
  -if (selectorContext!=null) {
  +if (selectorContext != null) {
   String exceptionName = selectorContext.getName();
   Throwable t = selectorContext.getThrowable();
   
   Map xPathMap = (Map) exception2XPath.get(exceptionName);
   
  -if (xPathMap!=null) {
  +if (xPathMap != null) {
   // create a context for the thrown exception
   JXPathContext context = JXPathContext.newContext(t);
   
  -for (Iterator iterator = xPathMap.entrySet().iterator();
  -iterator.hasNext(); ) {
  -Entry entry = (Entry) iterator.next();
  +for (Iterator iterator = xPathMap.entrySet().iterator(); 
iterator.hasNext(); ) {
  +Map.Entry entry = (Map.Entry) iterator.next();
   
  -if (((CompiledExpression) 
entry.getKey()).getValue(context).equals(Boolean.TRUE)) {
  +if (((CompiledExpression) 
entry.getValue()).getValue(context).equals(Boolean.TRUE)) {
   // set the configured name if the expression is succesfull
  -selectorContext.setName((String) entry.getValue());
  +selectorContext.setName((String) entry.getKey());
   return selectorContext;
   }
   }
  
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/concepts caching.xml

2003-08-14 Thread cziegeler
cziegeler2003/08/07 08:09:57

  Modified:src/documentation/xdocs/userdocs/concepts caching.xml
  Log:
  Start updating caching doc
  
  Revision  ChangesPath
  1.2   +42 -2 cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml
  
  Index: caching.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- caching.xml   9 Mar 2003 00:08:17 -   1.1
  +++ caching.xml   7 Aug 2003 15:09:57 -   1.2
  @@ -16,12 +16,52 @@
 /s1
 s1 title=Overview
pThe caching algorithm of Cocoon has a very flexible and powerful 
design.
  -   The algorithms and components used are not hardcoded into the core 
of 
  -   Cocoon. They can be configured using Avalon components./p
  +   The algorithms and components used are not hard coded into the core of 
  +   Cocoon. They can be configured in the sitemap./p
   pThis document describes the components available for caching,
  how they can be configured and how to implement your own cacheable 
components.
   /p
 /s1
  +  s1 title=How to configure caching
  +  pThe caching can be turned on and off on a per pipeline setting in the 
sitemap.
  +   This means, for each emmap:pipeline/em section in a sitemap, it's 
possible to
  +   turn on/off caching and configure the caching algorithm./p
  +   pThe following example shows how to turn on caching for a pipeline:/p
  +source
  + ![CDATA[
  +   map:pipeline type=caching
  +  ...
  +   /map:pipeline
  + ]]
  +/source 
  +   pIf you know that it doesn't make sense to turn on caching for some of 
  +   your pipelines, put them together in their own section and use:/p
  +source
  + ![CDATA[
  +   map:pipeline type=noncaching
  +  ...
  +   /map:pipeline
  + ]]
  +/source
  +  pAs you might guess from how the caching is turned on (via a type 
attribute), you
  + can have different caching (or better pipeline) implementation to choose 
from. This
  + is similar to choose from a set of generators the generator to use in your 
pipeline etc.
  + You will find in your main sitemap a section declaring all pipeline 
implementations.
  + It's in the emmap:components/em section:
  +  /p
  +source
  + ![CDATA[
  +   map:pipes default=caching
  +  map:pipe name=caching src=.../
  +  map:pipe name=noncaching src=.../
  +   /map:pipes
  + ]]
  +/source
  +  pDepending on your Cocoon installation you might have different 
implementations in
  +  that section. As with all components, you can define a default for all 
pipelines and
  +  override this whereever it makes sense./p
  +  /s1
  +!-- FIXME: THe following is OLD --  
 s1 title=Caching of event pipelines
pThe algorithm used for caching depends on the event pipeline 
configured. 
  For more information about configuration see the chapter below./p
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl AbstractCachingProcessingPipeline.java

2003-08-14 Thread cziegeler
cziegeler2003/08/11 00:33:08

  Modified:src/java/org/apache/cocoon/components/pipeline/impl
AbstractCachingProcessingPipeline.java
  Log:
  Fixing exception messages
  
  Revision  ChangesPath
  1.12  +4 -4  
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
  
  Index: AbstractCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AbstractCachingProcessingPipeline.java7 Aug 2003 08:52:15 -   1.11
  +++ AbstractCachingProcessingPipeline.java11 Aug 2003 07:33:08 -  1.12
  @@ -213,12 +213,12 @@
   || se.getMessage().indexOf(connection abort)  0) {
   throw new ConnectionResetException(Connection reset by peer, 
se);
   } else {
  -throw new ProcessingException(Failed to execute reader 
pipeline., se);
  +throw new ProcessingException(Failed to execute pipeline., 
se);
   }
   } catch ( Exception e ) {
   if (e instanceof ProcessingException)
   throw (ProcessingException)e;
  -throw new ProcessingException(Error executing reader pipeline.,e);
  +throw new ProcessingException(Error executing pipeline.,e);
   }
   } else {
   
  @@ -285,7 +285,7 @@
   || se.getMessage().indexOf(connection abort)  0) {
   throw new ConnectionResetException(Connection reset by peer, 
se);
   } else {
  -throw new ProcessingException(Failed to execute reader 
pipeline., se);
  +throw new ProcessingException(Failed to execute pipeline., 
se);
   }
   } catch ( ProcessingException e ) {
   throw e;
  
  
  


cvs commit: cocoon-2.1/src/test/org/apache/cocoon/components/resolver/test ResolverImplTestCase.java

2003-08-14 Thread cziegeler
cziegeler2003/08/11 04:03:31

  Modified:src/test/org/apache/cocoon/components/resolver/test
ResolverImplTestCase.java
  Log:
  Test excalibur implementation; our own is deprecated.
  This fixes bug 20096
  
  Revision  ChangesPath
  1.5   +5 -5  
cocoon-2.1/src/test/org/apache/cocoon/components/resolver/test/ResolverImplTestCase.java
  
  Index: ResolverImplTestCase.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/components/resolver/test/ResolverImplTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ResolverImplTestCase.java 12 May 2003 13:26:17 -  1.4
  +++ ResolverImplTestCase.java 11 Aug 2003 11:03:31 -  1.5
  @@ -61,14 +61,14 @@
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.cocoon.Constants;
  -import org.apache.cocoon.components.resolver.ResolverImpl;
  +import org.apache.excalibur.xml.DefaultEntityResolver;
   import org.apache.cocoon.environment.commandline.CommandLineContext;
   import org.apache.cocoon.util.IOUtils;
   import org.apache.excalibur.xml.EntityResolver;
   import org.xml.sax.InputSource;
   
   /**
  - * A test case for components/resolver/ResolverImpl
  + * A test case for org.apache.excalibur.xml.DefaultEntityResolver
*
* @author a href=mailto:[EMAIL PROTECTED]Bernhard Huber/a
* @author a href=mailto:[EMAIL PROTECTED]David Crossley/a
  @@ -231,7 +231,7 @@
   !ENTITY shy\#173;\ !--=soft hyphen--\n +
   ;
   private DefaultContext context;
  -private ResolverImpl resolverImpl;
  +private DefaultEntityResolver resolverImpl;
   private File workDir;
   private File commandlineContextDir;
   
  @@ -279,7 +279,7 @@
   super.setUp();
   
   String role = EntityResolver.ROLE;
  -resolverImpl = (ResolverImpl) manager.lookup(role);
  +resolverImpl = (DefaultEntityResolver) manager.lookup(role);
   assertNotNull(ResolverImpl is null, resolverImpl);
   }
   
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/util/log CocoonStreamTargetFactory.java

2003-08-14 Thread cziegeler
cziegeler2003/08/11 01:23:38

  Added:   src/java/org/apache/cocoon/util/log
CocoonStreamTargetFactory.java
  Log:
  Adding stream target factory, inspired by Volker Schmitt
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/java/org/apache/cocoon/util/log/CocoonStreamTargetFactory.java
  
  Index: CocoonStreamTargetFactory.java
  ===
  /*
  
   
 The Apache Software License, Version 1.1
   
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
  this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
  include  the following  acknowledgment:  This product includes  software
  developed  by the  Apache Software Foundation  (http://www.apache.org/).
  Alternately, this  acknowledgment may  appear in the software itself,  if
  and wherever such third-party acknowledgments normally appear.
  
   4. The names Apache Cocoon and  Apache Software Foundation must  not  be
  used to  endorse or promote  products derived from  this software without
  prior written permission. For written permission, please contact
  [EMAIL PROTECTED]
  
   5. Products  derived from this software may not  be called Apache, nor may
  Apache appear  in their name,  without prior written permission  of the
  Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   Stefano Mazzocchi  [EMAIL PROTECTED]. For more  information on the Apache
   Software Foundation, please see http://www.apache.org/.
  
  */
  package org.apache.cocoon.util.log;
  
  import org.apache.avalon.excalibur.logger.factory.StreamTargetFactory;
  import org.apache.avalon.framework.configuration.Configuration;
  import org.apache.log.format.Formatter;
  
  /**
  /**
   * TargetFactory for [EMAIL PROTECTED] org.apache.log.output.io.StreamTarget}.
   *
   * This factory is able to create different StreamTargets according to the following
   * configuration syntax:
   * pre
   * lt;stream id=foogt;
   *  lt;streamgt;istream-context-name/ilt;/streamgt;
   *  lt;format type=iraw|pattern|extended|xml|cocoon/igt;ipattern to be 
used if needed/ilt;/formatgt;
   * lt;/streamgt;
   * /pre
   *
   * pThe stream-context-name is the name of an codejava.io.OutputStream/code 
that
   * is fetched in the context. This context contains two predefined streams :
   * licodeSystem.out/code for the system output stream,/li
   * licodeSystem.err/code for the system error stream./li
   * /p
   *
   * pThe syntax of format is the same as in codeCocoonTargetFactory/code./p
   *
   * @author a href=mailto:[EMAIL PROTECTED]Giacomo Pati/a
   * @version CVS $Id: CocoonStreamTargetFactory.java,v 1.1 2003/08/11 08:23:38 
cziegeler Exp $
   */
  public class CocoonStreamTargetFactory
  extends StreamTargetFactory {
  
  //Format of default Cocoon formatter
  private static final String CFORMAT =
  %7.7{priority} %{time}   [%8.8{category}] (%{uri}) 
%{thread}/%{class:short}: %{message}\\n%{throwable};
  
  //Format of default Cocoon XML formatter
  private static final String XFORMAT =
  priority time category uri thread class message throwable;
  
  protected Formatter getFormatter(final Configuration conf) {
  final String type = conf.getAttribute

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet ParanoidCocoonServlet.java

2003-08-14 Thread cziegeler
cziegeler2003/08/06 22:57:18

  Modified:src/java/org/apache/cocoon/servlet
ParanoidCocoonServlet.java
  Log:
  Resetting class loader after the servlet is destroyed
  
  Revision  ChangesPath
  1.7   +8 -3  
cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
  
  Index: ParanoidCocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ParanoidCocoonServlet.java1 Aug 2003 12:45:05 -   1.6
  +++ ParanoidCocoonServlet.java7 Aug 2003 05:57:17 -   1.7
  @@ -263,8 +263,13 @@
 */
public void destroy() {
   
  - Thread.currentThread().setContextClassLoader(this.classloader);
  - this.servlet.destroy();
  +final ClassLoader old = Thread.currentThread().getContextClassLoader();
  +try {
  +Thread.currentThread().setContextClassLoader(this.classloader);
  +this.servlet.destroy();
  +} finally {
  +Thread.currentThread().setContextClassLoader(old);
  +}
   
super.destroy();
}
  
  
  


cvs commit: cocoon-2.1 README.txt INSTALL.txt

2003-08-14 Thread cziegeler
cziegeler2003/08/11 23:09:03

  Modified:.README.txt INSTALL.txt
  Log:
  Updating readme.txt and install.txt a little bit
  
  Revision  ChangesPath
  1.5   +5 -2  cocoon-2.1/README.txt
  
  Index: README.txt
  ===
  RCS file: /home/cvs/cocoon-2.1/README.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- README.txt11 Aug 2003 20:57:33 -  1.4
  +++ README.txt12 Aug 2003 06:09:03 -  1.5
  @@ -47,9 +47,12 @@
   
 Read the INSTALL.txt file in this directory for the installation instructions.
   
  -  The documentation available as of the date of this release is included in the
  -  docs/ directory.
  +  The documentation available as of the date of this release is included in this
  +  directory. Read the INSTALL.txt for more information.
   
  +  If you are updating from a previous release of Cocoon, make sure
  +  that you read the installation instructions on updating first.
  +  
 Look for the most updated documentation on the Apache Cocoon web site
 (http://cocoon.apache.org/).
   
  
  
  
  1.5   +19 -0 cocoon-2.1/INSTALL.txt
  
  Index: INSTALL.txt
  ===
  RCS file: /home/cvs/cocoon-2.1/INSTALL.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- INSTALL.txt   2 May 2003 07:14:16 -   1.4
  +++ INSTALL.txt   12 Aug 2003 06:09:03 -  1.5
  @@ -49,6 +49,25 @@
   
   Still here? good. You won't regret it.
   
  +
  +Reading the documentation
  +--
  +
  +This directory contains the full Cocoon documentation (as xml documents).
  +You can either browse the documentation when you start Cocoon as described
  +above and go to the documentation section: http://localhost:/docs/index.html.
  +Or you can build the docs your self by running build.bat docs or
  +./build.sh docs. If you want to build the docs yourself, you need
  +an installed version of Forrest (http://xml.apache.org/forrest).
  +
  +
  +Updating
  +
  +
  +If you are updating from a previous release of Cocoon, make sure
  +that you read the installation instructions on updating first.
  +
  +
   Choosing the blocks
   ---
   
  
  
  


cvs commit: cocoon-2.1/src/documentation sitemap.xmap

2003-08-14 Thread cziegeler
cziegeler2003/08/12 02:29:10

  Modified:src/documentation sitemap.xmap
  Log:
  Updating to latest forrest
  
  Revision  ChangesPath
  1.9   +84 -64cocoon-2.1/src/documentation/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/sitemap.xmap,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- sitemap.xmap  25 Jun 2003 11:56:07 -  1.8
  +++ sitemap.xmap  12 Aug 2003 09:29:10 -  1.9
  @@ -2,35 +2,38 @@
   map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
 map:components
   map:generators default=file
  -  map:generator name=file src=org.apache.cocoon.generation.FileGenerator /
  +  map:generator name=file  
src=org.apache.cocoon.generation.FileGenerator /
 !--
  -  map:generator name=html src=org.apache.cocoon.generation.HTMLGenerator /
  +  map:generator name=html  
src=org.apache.cocoon.generation.HTMLGenerator
  +jtidy-configjtidy.properties/jtidy-config
  +  /map:generator
 map:generator name=directory 
src=org.apache.cocoon.generation.DirectoryGenerator /
  -  map:generator name=libre 
src=org.apache.forrest.yer.use.cocoon.HierarchyGenerator /
  -  map:generator name=textparser 
src=org.apache.cocoon.generation.TextParserGenerator /
 --
   /map:generators
   
   map:transformers default=xslt
  +  !-- Generates @id attributes from title strings --
 map:transformer name=idgen 
src=org.apache.cocoon.transformation.IdGeneratorTransformer
   element//*[local-name() = 'section']/element
   idtitle/text()/id
 /map:transformer
   
  +  !-- Rewrites links, e.g. transforming href=site:index to 
href=../index.html --
  +  !-- See http://xml.apache.org/forrest/sitemap-ref.html#linkrewriting_impl --
 map:transformer name=linkrewriter 
logger=sitemap.transformer.linkrewriter 
src=org.apache.cocoon.transformation.LinkRewriterTransformer
   link-attrshref src/link-attrs
   schemessite ext/schemes
   
   input-module name=site
 input-module name=linkmap
  -file src={src} reloadable=false /
  +file src={src} reloadable=true /
 /input-module
 prefix/site///prefix
 suffix/@href/suffix
   /input-module
   input-module name=ext
 input-module name=linkmap
  -file src={src} reloadable=false /
  +file src={src} reloadable=true /
 /input-module
 prefix/site/external-refs///prefix
 suffix/@href/suffix
  @@ -38,7 +41,7 @@
 /map:transformer
   
 map:transformer name=xpath logger=sitemap.transformer.xpath 
src=org.apache.cocoon.transformation.XPathTransformer /
  -  map:transformer name=xslt 
src=org.apache.cocoon.transformation.TraxTransformer 
logger=sitemap.transformer.xsltc pool-max=32 pool-min=8 pool-grow=2
  +  map:transformer name=xslt 
src=org.apache.cocoon.transformation.TraxTransformer 
logger=sitemap.transformer.xslt pool-max=32 pool-min=8 pool-grow=2
   use-request-parametersfalse/use-request-parameters
   use-browser-capabilities-dbfalse/use-browser-capabilities-db
   use-delifalse/use-deli
  @@ -58,11 +61,14 @@
 map:serializer name=html mime-type=text/html 
src=org.apache.cocoon.serialization.HTMLSerializer
   doctype-public-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public
   doctype-systemhttp://www.w3.org/TR/html4/loose.dtd/doctype-system
  -encodingISO-8859-1/encoding
 /map:serializer
   
  -  map:serializer name=xml mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer
  -encodingISO-8859-1/encoding
  +  map:serializer name=xml mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer/
  +  
  +  map:serializer name=xml-document mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer
  +cdata-section-elementssource/cdata-section-elements
  +doctype-public-//APACHE//DTD Documentation V1.2//EN/doctype-public
  +doctype-systemdocument-v12.dtd/doctype-system
 /map:serializer
   
 map:serializer name=fo2pdf 
src=org.apache.cocoon.serialization.FOPSerializer mime-type=application/pdf /
  @@ -97,6 +103,7 @@
   
 map:views
   
  +!-- Define a 'links view', which the command-line crawler uses to discover a 
page's links --
   map:view name=links from-position=last
 map:transform src=resources/stylesheets/filterlinks.xsl
   map:parameter name=ctxbasedir value={realpath:.}//
  @@ -131,32 +138,33 @@
   
 !--  --
 !-- SOURCE FORMATS   --
  -  !-- Raw XML sources

cvs commit: cocoon-2.1 status.xml

2003-08-14 Thread cziegeler
cziegeler2003/08/14 22:47:41

  Modified:.status.xml
  Log:
  Updated status.xml
  
  Revision  ChangesPath
  1.122 +2 -2  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- status.xml14 Aug 2003 13:20:35 -  1.121
  +++ status.xml15 Aug 2003 05:47:41 -  1.122
  @@ -116,7 +116,7 @@
   /action
   
   action context=code assigned-to=SW
  -  For 2.1: Views must start not from the first encountered label, but from the 
last one
  +  For 2.2: Views must start not from the first encountered label, but from the 
last one
 (see 
http://marc.theaimsgroup.com/?l=xml-cocoon-devamp;m=101784499622172amp;w=2)
   /action
   
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/transformation AbstractSAXTransformer.java

2003-08-12 Thread cziegeler
cziegeler2003/08/09 12:48:54

  Modified:src/java/org/apache/cocoon/transformation
AbstractSAXTransformer.java
  Log:
  Better namespace support for own transformers
  
  Revision  ChangesPath
  1.5   +72 -6 
cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java
  
  Index: AbstractSAXTransformer.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/AbstractSAXTransformer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractSAXTransformer.java   19 Jun 2003 11:19:25 -  1.4
  +++ AbstractSAXTransformer.java   9 Aug 2003 19:48:54 -   1.5
  @@ -197,9 +197,11 @@
*/
   protected AttributesImpl emptyAttributes = new AttributesImpl();
   
  -/** The namespaces */
  +/** The namespaces and their prefixes */
   private List namespaces = new ArrayList(5);
  -
  +/** The current prefix for our namespace */
  +private String ourPrefix;
  +
   /**
* Avalon Configurable Interface
*/
  @@ -270,6 +272,7 @@
   this.parameters = null;
   this.source = null;
   this.namespaces.clear();
  +this.ourPrefix = null;
   }
   
   /**
  @@ -739,6 +742,20 @@
* Send SAX events to the next pipeline component.
* The startElement event for the given element is send
* to the next component in the current pipeline.
  + * The element has the namespace of the transformer,
  + * but not attributes
  + * @param localname The name of the event.
  + */
  +public void sendStartElementEventNS(String localname)
  +throws SAXException {
  +this.startElement(this.namespaceURI, 
  +  localname, this.ourPrefix+':' + localname, 
emptyAttributes);
  +}
  +
  +/**
  + * Send SAX events to the next pipeline component.
  + * The startElement event for the given element is send
  + * to the next component in the current pipeline.
* The element has no namespace.
* @param localname The name of the event.
* @param attr The Attributes of the element
  @@ -750,6 +767,20 @@
   
   /**
* Send SAX events to the next pipeline component.
  + * The startElement event for the given element is send
  + * to the next component in the current pipeline.
  + * The element has the namespace of the transformer.
  + * @param localname The name of the event.
  + * @param attr The Attributes of the element
  + */
  +public void sendStartElementEventNS(String localname, Attributes attr)
  +throws SAXException {
  +this.startElement(this.namespaceURI, 
  +  localname, this.ourPrefix+':' + localname, attr);
  +}
  +
  +/**
  + * Send SAX events to the next pipeline component.
* The endElement event for the given element is send
* to the next component in the current pipeline.
* The element has no namespace.
  @@ -762,6 +793,19 @@
   
   /**
* Send SAX events to the next pipeline component.
  + * The endElement event for the given element is send
  + * to the next component in the current pipeline.
  + * The element has the namespace of the transformer.
  + * @param localname The name of the event.
  + */
  +public void sendEndElementEventNS(String localname)
  +throws SAXException {
  +this.endElement(this.namespaceURI,
  + localname, this.ourPrefix+':' + localname);
  +}
  +
  +/**
  + * Send SAX events to the next pipeline component.
* The node is parsed and the events are send to
* the next component in the pipeline.
* @param node The tree to be included.
  @@ -854,6 +898,9 @@
   public void startPrefixMapping(String prefix, String uri)
   throws SAXException {
   if (prefix != null) this.namespaces.add(new String[] {prefix, uri});
  +if ( this.namespaceURI != null  this.namespaceURI.equals(uri)) {
  +this.ourPrefix = prefix;
  +}
   if (this.ignoreEventsCount == 0) super.startPrefixMapping(prefix, uri);
   }
   
  @@ -868,18 +915,37 @@
   int l = this.namespaces.size();
   int i = l-1;
   String currentPrefix;
  -while (found == false  i = 0) {
  +while (!found  i = 0) {
   currentPrefix = ((String[])this.namespaces.get(i))[0];
  -if (currentPrefix.equals(prefix) == true) {
  +if (currentPrefix.equals(prefix)) {
   found = true;
   } else {
   i--;
   }
   }
  -if (found == false) {
  +if (!found) {
   throw new SAXException(Namespace

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/generation JXTemplateGenerator.java

2003-08-12 Thread cziegeler
cziegeler2003/08/11 05:48:56

  Modified:src/java/org/apache/cocoon/generation
JXTemplateGenerator.java
  Log:
  Use SourceValidity instead of last modified
  
  Revision  ChangesPath
  1.6   +33 -10
cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java
  
  Index: JXTemplateGenerator.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/generation/JXTemplateGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JXTemplateGenerator.java  8 Aug 2003 18:49:06 -   1.5
  +++ JXTemplateGenerator.java  11 Aug 2003 12:48:56 -  1.6
  @@ -88,6 +88,7 @@
   import org.apache.commons.jxpath.*;
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceException;
  +import org.apache.excalibur.source.SourceValidity;
   import org.mozilla.javascript.*;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
  @@ -1125,7 +1126,7 @@
   StartDocument(Locator location) {
   super(location);
   }
  -long compileTime;
  +SourceValidity compileTime;
   EndDocument endDocument; // null if document fragment
   }
   
  @@ -2569,13 +2570,18 @@
   } catch (SourceException se) {
   throw SourceUtil.handle(Error during resolving of ' + src + '., 
se);
   }
  -long lastMod = inputSource.getLastModified();
   String uri = inputSource.getURI();
   synchronized (cache) {
   StartDocument startEvent = (StartDocument)cache.get(uri);
  -if (startEvent != null 
  -lastMod  startEvent.compileTime) {
  -cache.remove(uri);
  +if (startEvent != null) {
  +int valid = startEvent.compileTime.isValid();
  +if ( valid == SourceValidity.UNKNOWN ) {
  +SourceValidity validity = inputSource.getValidity();
  +valid = startEvent.compileTime.isValid(validity);
  +}
  +if ( valid != SourceValidity.VALID) {
  +cache.remove(uri);
  +}
   }
   }
   }
  @@ -2686,11 +2692,11 @@
   startEvent = (StartDocument)cache.get(inputSource.getURI());
   }
   if (startEvent == null) {
  -long compileTime = inputSource.getLastModified();
  +SourceValidity validity = inputSource.getValidity();
   Parser parser = new Parser();
   SourceUtil.parse(this.manager, this.inputSource, parser);
   startEvent = parser.getStartEvent();
  -startEvent.compileTime = compileTime;
  +startEvent.compileTime = validity;
   synchronized (cache) {
   cache.put(inputSource.getURI(), startEvent);
   }
  @@ -3522,12 +3528,26 @@
   ev.location,
   exc);
   }
  -long lastMod = input.getLastModified();
  +SourceValidity validity = null;
   StartDocument doc;
   synchronized (cache) {
   doc = (StartDocument)cache.get(input.getURI());
   if (doc != null) {
  -if (doc.compileTime  lastMod) {
  +boolean recompile = false;
  +if ( doc.compileTime == null) {
  +recompile = true;
  +} else {
  +int valid = doc.compileTime.isValid();
  +if ( valid == SourceValidity.UNKNOWN ) {
  +validity = input.getValidity();
  +valid = doc.compileTime.isValid(validity);
  +
  +}
  +if ( valid != SourceValidity.VALID ) {
  +recompile = true;
  +}
  +}
  +if ( recompile ) {
   doc = null; // recompile
   }
   }
  @@ -3537,7 +3557,10 @@
   Parser parser = new Parser();
   SourceUtil.parse(this.manager, input, parser);
   doc = parser.getStartEvent();
  -doc.compileTime = lastMod;
  +if ( validity == null ) {
  +validity = input.getValidity();
  +}
  +doc.compileTime = validity;
   } catch

cvs commit: cocoon-2.1/src/java/org/apache/cocoon cocoon.properties

2003-08-12 Thread cziegeler
cziegeler2003/08/12 04:34:50

  Modified:.forrest.properties
   src/java/org/apache/cocoon cocoon.properties
  Log:
  Release version
  
  Revision  ChangesPath
  1.20  +1 -1  cocoon-2.1/forrest.properties
  
  Index: forrest.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/forrest.properties,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- forrest.properties29 Jul 2003 09:01:01 -  1.19
  +++ forrest.properties12 Aug 2003 11:34:49 -  1.20
  @@ -6,7 +6,7 @@
   #forrest.echo=true
   
   # Project name (used to name .war file)
  -project.name=cocoon-2.1rc2-dev
  +project.name=cocoon-2.1
   
   # Specifies name of Forrest skin to use
   #project.skin=forrest-site
  
  
  
  1.13  +2 -2  cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties
  
  Index: cocoon.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- cocoon.properties 29 Jul 2003 09:01:01 -  1.12
  +++ cocoon.properties 12 Aug 2003 11:34:49 -  1.13
  @@ -4,8 +4,8 @@
   # very high chance of breaking the build system. Do it only if you know what
   # you're doing.
   
  -version=2.1rc2-dev
  -released.version=2.0.4
  +version=2.1
  +released.version=2.1
   year=1999-2003
   name=cocoon
   Name=Cocoon
  
  
  


cvs commit: cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/transformation SendMailTransformer.java

2003-08-11 Thread cziegeler
cziegeler2003/08/11 00:46:20

  Modified:src/blocks/mail/java/org/apache/cocoon/mail/transformation
SendMailTransformer.java
  Log:
  Updating to code used in Cocoon
  
  Revision  ChangesPath
  1.3   +6 -4  
cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java
  
  Index: SendMailTransformer.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/transformation/SendMailTransformer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SendMailTransformer.java  8 Aug 2003 14:15:41 -   1.2
  +++ SendMailTransformer.java  11 Aug 2003 07:46:20 -  1.3
  @@ -669,15 +669,17 @@
   super.sendStartElementEvent(email:message);
   super.sendTextEvent(ex.getMessage());
   super.sendEndElementEvent(email:message);
  +
  +/* only with jdk 1.4
   super.sendStartElementEvent(email:stacktrace);
   
  -/* doesn't compile under 1.3.1 (RP)
   for (int i = 0; i  ex.getStackTrace().length; i++) {
   String s = ((StackTraceElement) ex.getStackTrace()[i]).toString();
   super.sendTextEvent(s + \n);
   }
  -*/
  -super.sendEndElementEvent(email:stacktrace);
  +
  +super.sendEndElementEvent(email:stacktrace);*/ 
  +
   super.sendEndElementEvent(email:exception);
   } catch (SAXException e) {
   this.getLogger().error(Error while sending a SAX-Event, e);
  
  
  


cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation GarbageGenerator.java

2003-08-11 Thread cziegeler
cziegeler2003/08/11 06:11:44

  Modified:src/scratchpad/src/org/apache/cocoon/generation
GarbageGenerator.java
  Log:
  Add comment
  
  Revision  ChangesPath
  1.6   +1 -0  
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/GarbageGenerator.java
  
  Index: GarbageGenerator.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/GarbageGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- GarbageGenerator.java 9 Jul 2003 07:42:23 -   1.5
  +++ GarbageGenerator.java 11 Aug 2003 13:11:44 -  1.6
  @@ -94,6 +94,7 @@
   
   protected static class CacheEntry {
   Tree tree;
  +// FIXME use SourceValidity!
   long compileTime;
   }
   
  
  
  


cvs commit: cocoon-2.1/src/webapp sitemap.xmap

2003-08-11 Thread cziegeler
cziegeler2003/08/05 10:02:15

  Modified:src/webapp sitemap.xmap
  Log:
  Making xalan the default xslt transformer for the release
  
  Revision  ChangesPath
  1.29  +12 -4 cocoon-2.1/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/webapp/sitemap.xmap,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- sitemap.xmap  29 Jul 2003 08:26:36 -  1.28
  +++ sitemap.xmap  5 Aug 2003 17:02:15 -   1.29
  @@ -75,20 +75,28 @@
 +--
 map:transformers default=xslt
   
  -!-- NOTE: XSLTC is now the default processor. If you use Xalan extensions, use 
the xalan transformer. --
  +!-- NOTE: This is the default XSLT processor. --
   map:transformer logger=sitemap.transformer.xslt name=xslt pool-grow=2 
pool-max=32 pool-min=8 src=org.apache.cocoon.transformation.TraxTransformer
 use-request-parametersfalse/use-request-parameters
 use-session-parametersfalse/use-session-parameters
 use-cookie-parametersfalse/use-cookie-parameters
  -  xslt-processor-rolexsltc/xslt-processor-role
  +  xslt-processor-rolexalan/xslt-processor-role
   /map:transformer
   
  -!-- NOTE: This used to be the default XSLT processor. The default now is XSLTC 
--
  +!-- NOTE: This is the same as the default processor but with a different name 
(for compatibility) --
   map:transformer logger=sitemap.transformer.xalan name=xalan pool-grow=2 
pool-max=32 pool-min=8 src=org.apache.cocoon.transformation.TraxTransformer
 use-request-parametersfalse/use-request-parameters
 use-session-parametersfalse/use-session-parameters
 use-cookie-parametersfalse/use-cookie-parameters
 xslt-processor-rolexalan/xslt-processor-role
  +/map:transformer
  +
  +!-- NOTE: You can also try XSLTC as the default processor. If you use Xalan 
extensions, use the xalan transformer. --
  +map:transformer logger=sitemap.transformer.xsltc name=xsltc pool-grow=2 
pool-max=32 pool-min=8 src=org.apache.cocoon.transformation.TraxTransformer
  +  use-request-parametersfalse/use-request-parameters
  +  use-session-parametersfalse/use-session-parameters
  +  use-cookie-parametersfalse/use-cookie-parameters
  +  xslt-processor-rolexsltc/xslt-processor-role
   /map:transformer
   
   map:transformer logger=sitemap.transformer.xinclude name=xinclude 
pool-grow=2 pool-max=16 pool-min=2 
src=org.apache.cocoon.transformation.XIncludeTransformer/
  
  
  


cvs commit: cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/transformation - New directory

2003-08-10 Thread cziegeler
cziegeler2003/08/08 04:34:57

  cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/transformation - New directory


cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/concepts caching.xml

2003-08-10 Thread cziegeler
cziegeler2003/08/08 00:32:27

  Modified:src/documentation/xdocs/userdocs/concepts caching.xml
  Log:
  Adding expires configuration and buffer conf
  
  Revision  ChangesPath
  1.5   +98 -1 cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml
  
  Index: caching.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/concepts/caching.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- caching.xml   7 Aug 2003 19:13:35 -   1.4
  +++ caching.xml   8 Aug 2003 07:32:27 -   1.5
  @@ -152,6 +152,103 @@
s2 title=Configuration of Pipelines
pEach pipeline can be configured with a buffer size, and each
  caching pipeline with the name of the Cache to use./p
  + s3 title=Expiration of Content
  + p
  + Utilize the pipeline codeexpires/code parameter to dramatically 
reduce
  + redundand requests. Even the most dynamic application pages have a 
  + reasonable period of time during which they are static. 
  + Even if a page doesn't change for just one minute, still use the 
  + codeexpires/code parameter. Here is an example:
  + /p
  +source![CDATA[
  +map:pipeline
  +  map:parameter name=expires value=access plus 1 minutes/
  +  ...
  +/map:pipeline 
  +]]/source
  + p
  + The value of the parameter is in a format borrowed from the Apache 
HTTP module mod_expires.
  + Examples of other possible values are:
  + /p
  +source![CDATA[
  +access plus 1 hours
  +access plus 1 month
  +access plus 4 weeks
  +access plus 30 days
  +access plus 1 month 15 days 2 hours
  +]]/source
  + p
  + Imagine 1'000 users hitting your web site at the same time.
  + Say that they are split into 5 groups, each of which has the same ISP.
  + Most ISPs use intermediate proxy servers to reduce traffic, hense
  + improving their end user experience and also reducing their operating 
costs.
  + In our case the 1'000 end user requests will result in just 5 requests 
to Cocoon.
  + /p
  + p
  + After the first request from each group reaches the server, the 
expires header will
  + be recognized by the proxy servers which will serve the following 
requests from their cache.
  + Keep in mind however that most proxies cache HTTP GET requests, but 
will not cache HTTP POST requests.
  + /p
  + p
  +  To feel the difference, set an expires parameter on one of your 
pipelines and
  +  load the page with the browser. Notice that after the first time, 
there are no 
  +  access records in the server logs until the specified time expires.
  + /p
  + pThis parameter has effect on all pipeline implementations, even on 
  + the non caching ones. Remember, the caching does not take place in 
Cocoon,
  + it's either in a proxy inbetween Cocoon and the client or in the client
  + itself./p
  + /s3
  + s3 title=Response Buffering
  +  pEach pipeline can buffer the response, before it is send to the client.
  +The default buffer size is unlimited (-1), which means when all bytes of
  +the response are available on the server, they are send with one
  +command directly to the client./p
  +  pOf course, this slows down the response as the whole response
  +is first buffered inside Cocoon and then send to the client instead of
  +directly sending the parts of the response when they are available.
  +But on the other hand this is very important for error handling. If you
  +don't buffer the response and an error occurs, you might get corrupt
  +pages. Example: you have a pipeline that already send some content
  +to the client and now an exception occurs. This exception calls
  +the error handler that generates a new response that is appended
  +to the already send content. If content is already send to the client
  +there is no way of reverting this! So buffering in these cases makes
  +sense.
  +   /p
  +   pIf you have a stable application running in production where the
  +   error handler is never invoked, you can turn off the buffering, by
  +   setting the buffer to em0/em./p
  +   pYou can set the buffer to any other value higher than 0 which means
  +   the content of the response is buffered in Cocoon until the buffer is
  +   full. If the buffer is full it's flushed and the next part

cvs commit: cocoon-2.1 CREDITS.txt

2003-08-10 Thread cziegeler
cziegeler2003/08/07 07:37:17

  Modified:.CREDITS.txt
  Log:
  Adding credits for the new portal
  
  Revision  ChangesPath
  1.3   +3 -1  cocoon-2.1/CREDITS.txt
  
  Index: CREDITS.txt
  ===
  RCS file: /home/cvs/cocoon-2.1/CREDITS.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CREDITS.txt   5 Aug 2003 09:49:57 -   1.2
  +++ CREDITS.txt   7 Aug 2003 14:37:17 -   1.3
  @@ -29,7 +29,9 @@
   The DELI implementation was contributed by Mark Butler, and donated to
   Cocoon by the Hewlett Packard Company (http://www.hp.com/).
   
  -
  +The initial code of the new portal framework is a donation by a joined development
  +effort of BASF IT-Services (http://www.basf-it-services.com) 
  +and sn AG (http://www.s-und-n.de).
   
   
Credits of included software
  
  
  


cvs commit: cocoon-2.1/src/blocks/html/java/org/apache/cocoon/generation HTMLGenerator.java

2003-08-09 Thread cziegeler
cziegeler2003/08/09 11:21:49

  Modified:.status.xml
   src/java/org/apache/cocoon/environment/wrapper
EnvironmentWrapper.java
   src/java/org/apache/cocoon/components/source/impl
SitemapSource.java
   src/blocks/html/java/org/apache/cocoon/generation
HTMLGenerator.java
  Log:
action dev=CZ type=add fixes-bug=22270 due-to=Unico Hommes 
due-to-email=[EMAIL PROTECTED]
 Patch for allowing to specify a cocoon-view for internal requests in the query 
string.
/action
  
  Revision  ChangesPath
  1.112 +5 -2  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- status.xml7 Aug 2003 16:54:16 -   1.111
  +++ status.xml9 Aug 2003 18:21:49 -   1.112
  @@ -167,6 +167,9 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=CZ type=add fixes-bug=22270 due-to=Unico Hommes 
due-to-email=[EMAIL PROTECTED]
  +   Patch for allowing to specify a cocoon-view for internal requests in the query 
string.
  +  /action
 action dev=JH type=fix fixes-bug=19839
   Instrumentation support: Updated client libraries to make instrumentation work 
again.
   Added a target start-instrumentation-client to Cocoon's ant files and removed 
runclient shell scripts.
  @@ -174,7 +177,7 @@
 action dev=JH type=fix fixes-bug=22064 due-to=Nicolas Maisonneuve 
due-to-email=[EMAIL PROTECTED]
   XMLDBTransformer: retrieving auto-generated resource id.
 /action
  -  action dev=BD type=add due-to=Mark Leicester due-to.email=[EMAIL 
PROTECTED]
  +  action dev=BD type=add due-to=Mark Leicester due-to-email=[EMAIL 
PROTECTED]
   midi block added
 /action
 action dev=BD type=add
  
  
  
  1.10  +17 -2 
cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
  
  Index: EnvironmentWrapper.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EnvironmentWrapper.java   4 Aug 2003 03:21:51 -   1.9
  +++ EnvironmentWrapper.java   9 Aug 2003 18:21:49 -   1.10
  @@ -139,7 +139,22 @@
 ComponentManager manager,
 boolean  rawMode)
   throws MalformedURLException {
  -super(env.getURI(), env.getView(), env.getContext(), env.getAction());
  +this(env, requestURI, queryString, logger, null, rawMode,env.getView());
  +}
  +
  +/**
  + * Constructs an EnvironmentWrapper object from a Request
  + * and Response objects
  + */
  +public EnvironmentWrapper(Environment  env,
  +  String   requestURI,
  +  String   queryString,
  +  Logger   logger,
  +  ComponentManager manager,
  +  boolean  rawMode,
  +  String   view)
  +throws MalformedURLException {
  +super(env.getURI(), view, env.getContext(), env.getAction());
   this.rootContext = env.getRootContext();
   
   this.enableLogging(logger);
  
  
  
  1.9   +26 -2 
cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java
  
  Index: SitemapSource.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SitemapSource.java6 Jul 2003 11:44:30 -   1.8
  +++ SitemapSource.java9 Aug 2003 18:21:49 -   1.9
  @@ -54,6 +54,7 @@
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.cocoon.Constants;
   import org.apache.cocoon.Processor;
   import org.apache.cocoon.ResourceNotFoundException;
   import org.apache.cocoon.components.CocoonComponentManager;
  @@ -201,6 +202,29 @@
   uri = uri.substring(position);
   }
   this.uri = uri;
  +
  +// determine if the queryString specifies a cocoon-view
  +String view = null;
  +if (queryString != null) {
  +int index = queryString.indexOf(Constants.VIEW_PARAM);
  +if (index != -1 
  + (index == 0 || queryString.charAt(index-1

cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/acting CommandAction.java

2003-08-08 Thread cziegeler
cziegeler2003/08/08 04:35:34

  Added:   src/scratchpad/src/org/apache/cocoon/acting
CommandAction.java
  Log:
  Action for executing commands on the server contributed by Peter Klassen ([EMAIL 
PROTECTED])
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/acting/CommandAction.java
  
  Index: CommandAction.java
  ===
  /*
  
   
   The Apache Software License, Version 1.1
   
  
   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modifica-
   tion, are permitted provided that the following conditions are met:
  
   1. Redistributions of  source code must  retain the above copyright  notice,
this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
  
   3. The end-user documentation included with the redistribution, if any, must
include  the following  acknowledgment:  This product includes  software
developed  by the  Apache Software Foundation  (http://www.apache.org/).
Alternately, this  acknowledgment may  appear in the software itself,  if
and wherever such third-party acknowledgments normally appear.
  
   4. The names Apache Cocoon and  Apache Software Foundation must  not  be
used to  endorse or promote  products derived from  this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
  
   5. Products  derived from this software may not  be called Apache, nor may
Apache appear  in their name,  without prior written permission  of the
Apache Software Foundation.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
   FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
   APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
   INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
   DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
   OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
   ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
   (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
   This software  consists of voluntary contributions made  by many individuals
   on  behalf of the Apache Software  Foundation and was  originally created by
   Stefano Mazzocchi  [EMAIL PROTECTED]. For more  information on the Apache
   Software Foundation, please see http://www.apache.org/.
  
  */
  
  package org.apache.cocoon.acting;
  
  import java.io.File;
  import java.util.Map;
  
  import org.apache.avalon.framework.parameters.Parameters;
  import org.apache.avalon.framework.thread.ThreadSafe;
  import org.apache.cocoon.environment.ObjectModelHelper;
  import org.apache.cocoon.environment.Redirector;
  import org.apache.cocoon.environment.Request;
  import org.apache.cocoon.environment.SourceResolver;
  import org.apache.excalibur.source.Source;
  import org.apache.excalibur.source.SourceUtil;
  
  /**
   * Action class, which simply calls a process on an operating system.
   * Therefore, a parameter named 'command' has to be configured in the sitemap 
   * to hold the filename as value.
   * 
   * @author a href=mailto:[EMAIL PROTECTED]Peter Klassen/a
   * @version CVS $Id: CommandAction.java,v 1.1 2003/08/08 11:35:34 cziegeler Exp $
   */
  
  public class CommandAction extends AbstractAction implements ThreadSafe {

public final static String PARAM_COMMAND = command;


  public Map act( Redirector redirector, SourceResolver resolver, Map objectModel, 
String source, Parameters param )
throws Exception {
Request request = ObjectModelHelper.getRequest(objectModel);
String command = param.getParameter(PARAM_COMMAND);
Source src = null;

if ((param != null)  (command != null)) {
try {
src = resolver.resolveURI(command);
  File file = SourceUtil.getFile(src);
  if ( file != null ) {
  Process p = Runtime.getRuntime().exec(file.getAbsolutePath

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet ParanoidCocoonServlet.java

2003-08-07 Thread cziegeler
cziegeler2003/08/06 23:26:24

  Modified:src/java/org/apache/cocoon/servlet
ParanoidCocoonServlet.java
  Log:
  Check for proper init
  
  Revision  ChangesPath
  1.8   +9 -7  
cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
  
  Index: ParanoidCocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ParanoidCocoonServlet.java7 Aug 2003 05:57:17 -   1.7
  +++ ParanoidCocoonServlet.java7 Aug 2003 06:26:24 -   1.8
  @@ -263,12 +263,14 @@
 */
public void destroy() {
   
  -final ClassLoader old = Thread.currentThread().getContextClassLoader();
  -try {
  -Thread.currentThread().setContextClassLoader(this.classloader);
  -this.servlet.destroy();
  -} finally {
  -Thread.currentThread().setContextClassLoader(old);
  +if ( this.servlet != null ) {
  +final ClassLoader old = Thread.currentThread().getContextClassLoader();
  +try {
  +Thread.currentThread().setContextClassLoader(this.classloader);
  +this.servlet.destroy();
  +} finally {
  +Thread.currentThread().setContextClassLoader(old);
  +}
   }
   
super.destroy();
  
  
  


cvs commit: cocoon-2.0/src/java/org/apache/cocoon/components/source SitemapSource.java

2003-08-07 Thread cziegeler
cziegeler2003/08/07 00:07:02

  Modified:src/java/org/apache/cocoon/components/source
SitemapSource.java
  Log:
  Applying modified patch for bug 14348 from Marco Rolappe
  
  Revision  ChangesPath
  1.2   +41 -11
cocoon-2.0/src/java/org/apache/cocoon/components/source/SitemapSource.java
  
  Index: SitemapSource.java
  ===
  RCS file: 
/home/cvs/cocoon-2.0/src/java/org/apache/cocoon/components/source/SitemapSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SitemapSource.java9 Mar 2003 00:02:32 -   1.1
  +++ SitemapSource.java7 Aug 2003 07:07:02 -   1.2
  @@ -50,6 +50,13 @@
   */
   package org.apache.cocoon.components.source;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.net.MalformedURLException;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.cocoon.ProcessingException;
  @@ -60,11 +67,11 @@
   import org.apache.cocoon.components.pipeline.CacheableEventPipeline;
   import org.apache.cocoon.components.pipeline.EventPipeline;
   import org.apache.cocoon.components.pipeline.StreamPipeline;
  +import org.apache.cocoon.components.store.Store;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.environment.ModifiableSource;
   import org.apache.cocoon.environment.Source;
   import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
  -import org.apache.cocoon.util.HashUtil;
   import org.apache.cocoon.xml.AbstractXMLConsumer;
   import org.apache.cocoon.xml.ContentHandlerWrapper;
   import org.apache.cocoon.xml.XMLConsumer;
  @@ -77,13 +84,6 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.ext.LexicalHandler;
   
  -import java.io.ByteArrayInputStream;
  -import java.io.ByteArrayOutputStream;
  -import java.io.IOException;
  -import java.io.InputStream;
  -import java.util.Map;
  -import java.net.MalformedURLException;
  -
   /**
* Description of a source which is defined by a pipeline.
*
  @@ -303,9 +303,38 @@
   {
   CacheableEventPipeline cep = 
(CacheableEventPipeline)this.eventPipeline;
   PipelineCacheKey pck = cep.generateKey(this.environment);
  -Map validity = null;
  +// patch for 14348
  +if (pck != null) {
  +final Store cache = (Store) 
this.manager.lookup(Store.TRANSIENT_CACHE);
  +
  +try {
  +final String cacheKey = pck.toString() + 
/Timestamp;  
  +Object[] obj = (Object[])cache.get(cacheKey);
  +Long prevTimestamp = null;
  +Map  prevValidity = null;
  +if ( obj != null ) {
  +prevTimestamp = (Long)obj[0];
  +prevValidity = (Map)obj[1];
  +}
  +if (prevTimestamp != null) {
  +this.lastModificationDate = 
prevTimestamp.longValue();
  +}
  +   
  +Map currValidity = 
cep.generateValidity(this.environment);
  +
  +if (prevValidity == null || 
!currValidity.equals(prevValidity)) {
  +// validity changed, update cached validity, 
timestamp and last modified
  +this.lastModificationDate = 
System.currentTimeMillis();
  +obj = new Object[] {new Long 
(this.lastModificationDate), currValidity};
  +cache.store(cacheKey, obj);
  +}
  +} finally {
  +this.manager.release(cache);
  +}
  +}
  +/*
   if (pck != null) {
  -validity = cep.generateValidity(this.environment);
  +Map validity = cep.generateValidity(this.environment);
   if (validity != null) {
   // the event pipeline is cacheable
   // now calculate a last modification date
  @@ -313,6 +342,7 @@
   this.lastModificationDate = HashUtil.hash(hashKey

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/caching CachedResponse.java

2003-08-06 Thread cziegeler
cziegeler2003/08/06 02:26:44

  Modified:src/java/org/apache/cocoon/caching CachedResponse.java
  Log:
  Adding convenience constructor
  
  Revision  ChangesPath
  1.4   +12 -1 
cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java
  
  Index: CachedResponse.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CachedResponse.java   14 Jul 2003 16:06:21 -  1.3
  +++ CachedResponse.java   6 Aug 2003 09:26:44 -   1.4
  @@ -88,6 +88,17 @@
   /**
* Create a new entry for the cache.
*
  + * @param validityObject  The SourceValidity object 
  + * @param responseThe cached sax stream or character stream
  + */
  +public CachedResponse(SourceValidity   validityObject,
  +  byte[]   response) {
  +this(new SourceValidity[] {validityObject}, response, null);
  +}
  +
  +/**
  + * Create a new entry for the cache.
  + *
* @param validityObjects The SourceValidity objects in the order
*they occured in the pipeline
* @param responseThe cached sax stream or character stream
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon Cocoon.java

2003-08-06 Thread cziegeler
cziegeler2003/08/06 03:45:31

  Modified:src/java/org/apache/cocoon Cocoon.java
  Log:
  Unregister before disposing (isn't really needed, but looks better)
  
  Revision  ChangesPath
  1.12  +4 -1  cocoon-2.1/src/java/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Cocoon.java   5 Aug 2003 16:56:20 -   1.11
  +++ Cocoon.java   6 Aug 2003 10:45:31 -   1.12
  @@ -491,6 +491,9 @@
* Dispose this instance
*/
   public void dispose() {
  +if (this.commands != null  this.threads != null ) {
  +this.threads.deregister(this.commands);
  +}
   ContainerUtil.dispose(this.commands);
   this.commands = null;
   ContainerUtil.dispose(this.threads);
  
  
  


cvs commit: cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/reading DatabaseReader.java

2003-08-06 Thread cziegeler
cziegeler2003/08/06 01:44:22

  Modified:src/blocks/databases/java/org/apache/cocoon/reading
DatabaseReader.java
  Log:
  Changing to service selector
  
  Revision  ChangesPath
  1.4   +4 -7  
cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/reading/DatabaseReader.java
  
  Index: DatabaseReader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/databases/java/org/apache/cocoon/reading/DatabaseReader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseReader.java   11 Jul 2003 18:32:25 -  1.3
  +++ DatabaseReader.java   6 Aug 2003 08:44:22 -   1.4
  @@ -62,14 +62,13 @@
   
   import org.apache.avalon.excalibur.datasource.DataSourceComponent;
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentSelector;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.ServiceException;
   import org.apache.avalon.framework.service.ServiceManager;
  -
  +import org.apache.avalon.framework.service.ServiceSelector;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.ResourceNotFoundException;
   import org.apache.cocoon.caching.CacheableProcessingComponent;
  @@ -77,11 +76,9 @@
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.environment.SourceResolver;
  -
   import org.apache.excalibur.source.SourceValidity;
   import org.apache.excalibur.source.impl.validity.NOPValidity;
   import org.apache.excalibur.source.impl.validity.TimeStampValidity;
  -
   import org.xml.sax.SAXException;
   
   /**
  @@ -96,7 +93,7 @@
   implements Configurable, Disposable, CacheableProcessingComponent
   {
   
  -private ComponentSelector dbselector;
  +private ServiceSelector dbselector;
   private String dsn;
   private long lastModified = System.currentTimeMillis();
   private InputStream resource = null; // because HSQL doesn't yet implement 
getBlob()
  @@ -109,7 +106,7 @@
   
   public void service(final ServiceManager manager) throws ServiceException {
   super.service(manager);
  -this.dbselector = (ComponentSelector) 
manager.lookup(DataSourceComponent.ROLE + Selector);
  +this.dbselector = (ServiceSelector) manager.lookup(DataSourceComponent.ROLE 
+ Selector);
   }
   
   /**
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet CocoonServlet.java

2003-08-01 Thread cziegeler
cziegeler2003/08/01 03:06:41

  Modified:src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Remove unused import
  
  Revision  ChangesPath
  1.12  +1 -2  cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CocoonServlet.java31 Jul 2003 13:29:54 -  1.11
  +++ CocoonServlet.java1 Aug 2003 10:06:41 -   1.12
  @@ -50,7 +50,6 @@
   */
   package org.apache.cocoon.servlet;
   
  -import java.io.EOFException;
   import java.io.File;
   import java.io.FileInputStream;
   import java.io.FileOutputStream;
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet CocoonServlet.java

2003-08-01 Thread cziegeler
cziegeler2003/08/01 03:28:38

  Modified:.status.xml
   src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  logkit.xconf can be located at any uri
  
  Revision  ChangesPath
  1.101 +4 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- status.xml30 Jul 2003 08:21:42 -  1.100
  +++ status.xml1 Aug 2003 10:28:38 -   1.101
  @@ -167,6 +167,9 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=CZ type=add
  +Configuration logkit.xconf can now be read from any location.
  +  /action
 action dev=CZ type=fix
  Fix the ignoreErrors handling in the cinclude transformer.
 /action
  
  
  
  1.13  +10 -3 cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CocoonServlet.java1 Aug 2003 10:06:41 -   1.12
  +++ CocoonServlet.java1 Aug 2003 10:28:38 -   1.13
  @@ -823,8 +823,15 @@
   //Configure the logkit management
   String logkitConfig = getInitParameter(logkit-config, 
/WEB-INF/logkit.xconf);
   
  -InputStream is = this.servletContext.getResourceAsStream(logkitConfig);
  -if (is == null) is = new FileInputStream(logkitConfig);
  +// test if this is a qualified url
  +InputStream is = null;
  +if ( logkitConfig.indexOf(':') == -1) {
  +is = this.servletContext.getResourceAsStream(logkitConfig);
  +if (is == null) is = new FileInputStream(logkitConfig);
  +} else {
  +URL logkitURL = new URL(logkitConfig);
  +is = logkitURL.openStream();
  +}
   final DefaultConfigurationBuilder builder = new 
DefaultConfigurationBuilder();
   final Configuration conf = builder.build(is);
   logKitManager.configure(conf);
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination Pagesheet.java

2003-08-01 Thread cziegeler
cziegeler2003/08/01 03:52:20

  Modified:.status.xml
   src/java/org/apache/cocoon/transformation/pagination
Pagesheet.java
  Log:
  Paginator caches dynamic pagesheet rules. Patch from Frank Taffelt.
  PR:21213
  
  Revision  ChangesPath
  1.102 +5 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- status.xml1 Aug 2003 10:28:38 -   1.101
  +++ status.xml1 Aug 2003 10:52:20 -   1.102
  @@ -167,6 +167,10 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=CZ type=fix fixes-bug=21213 due-to=Frank Taffelt
  +due-to-email=[EMAIL PROTECTED]
  +Paginator now caches dynamic pagesheet correctly.
  +  /action  
 action dev=CZ type=add
   Configuration logkit.xconf can now be read from any location.
 /action
  
  
  
  1.2   +2 -2  
cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Pagesheet.java
  
  Index: Pagesheet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Pagesheet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Pagesheet.java27 Jun 2003 20:10:42 -  1.1
  +++ Pagesheet.java1 Aug 2003 10:52:20 -   1.2
  @@ -496,7 +496,7 @@
   }
   
   public boolean modifiedSince(long date) {
  -return (date!=this.lastModified);
  +return (this.lastModified == 0 || date!=this.lastModified);
   }
   
   public Object clone() {
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet ParanoidCocoonServlet.java

2003-08-01 Thread cziegeler
cziegeler2003/08/01 05:45:05

  Modified:src/java/org/apache/cocoon/servlet
ParanoidCocoonServlet.java
  Log:
  Reset classloader
  
  Revision  ChangesPath
  1.6   +17 -7 
cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
  
  Index: ParanoidCocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ParanoidCocoonServlet.java9 Jul 2003 07:42:22 -   1.5
  +++ ParanoidCocoonServlet.java1 Aug 2003 12:45:05 -   1.6
  @@ -125,10 +125,15 @@
   
// Always set the context classloader. JAXP uses it to find a 
ParserFactory,
// and thus fails if it's not set to the webapp classloader.
  - Thread.currentThread().setContextClassLoader(this.classloader);
  +final ClassLoader old = Thread.currentThread().getContextClassLoader();
  +try {
  +Thread.currentThread().setContextClassLoader(this.classloader);
   
  - // Inlitialize the actual servlet
  - this.initServlet();
  +// Inlitialize the actual servlet
  +this.initServlet();
  +} finally {
  +Thread.currentThread().setContextClassLoader(old);
  +}
   
}

  @@ -242,10 +247,15 @@
 * Service the request by delegating the call to the real servlet
 */
public void service(ServletRequest request, ServletResponse response)
  -   throws ServletException, IOException {
  +throws ServletException, IOException {
   
  - Thread.currentThread().setContextClassLoader(this.classloader);
  - this.servlet.service(request, response);
  +final ClassLoader old = Thread.currentThread().getContextClassLoader();
  +try {
  + Thread.currentThread().setContextClassLoader(this.classloader);
  + this.servlet.service(request, response);
  +} finally {
  +Thread.currentThread().setContextClassLoader(old);
  +}
}
   
/**
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl BaseCachingProcessingPipeline.java AbstractCachingProcessingPipeline.java

2003-07-31 Thread cziegeler
cziegeler2003/07/31 05:39:04

  Modified:src/java/org/apache/cocoon/components/pipeline/impl
AbstractCachingProcessingPipeline.java
  Added:   src/java/org/apache/cocoon/components/pipeline/impl
BaseCachingProcessingPipeline.java
  Log:
  Create new base class for caching, remove unused method
  
  Revision  ChangesPath
  1.10  +6 -54 
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
  
  Index: AbstractCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractCachingProcessingPipeline.java31 Jul 2003 03:54:22 -  1.9
  +++ AbstractCachingProcessingPipeline.java31 Jul 2003 12:39:04 -  1.10
  @@ -57,17 +57,11 @@
   import java.util.ArrayList;
   import java.util.Date;
   
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.ConnectionResetException;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.*;
  -import org.apache.cocoon.components.pipeline.AbstractProcessingPipeline;
  -import org.apache.cocoon.components.sax.XMLDeserializer;
  -import org.apache.cocoon.components.sax.XMLSerializer;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.transformation.Transformer;
   import org.apache.cocoon.util.HashUtil;
  @@ -76,8 +70,8 @@
   import org.apache.excalibur.source.impl.validity.DeferredValidity;
   
   /**
  - * This is the base class for all caching pipeline implementations.
  - *
  + * This is the base class for all caching pipeline implementations
  + * that check the different pipeline components.
*
* @since 2.1
* @author a href=mailto:[EMAIL PROTECTED]Carsten Ziegeler/a
  @@ -85,11 +79,7 @@
* @version CVS $Id$
*/
   public abstract class AbstractCachingProcessingPipeline
  -extends AbstractProcessingPipeline
  -implements Disposable {
  -
  -/** This is the Cache holding cached responses */
  -protected Cache  cache;
  +extends BaseCachingProcessingPipeline {
   
   /** The role name of the generator */
   protected String generatorRole;
  @@ -103,11 +93,6 @@
   /** The role name of the reader */
   protected String readerRole;
   
  -/** The deserializer */
  -protected XMLDeserializer xmlDeserializer;
  -/** The serializer */
  -protected XMLSerializer xmlSerializer;
  -
   /** The cached byte stream */
   protected byte[]   cachedResponse;
   /** The timestamp of the cached byte stream */
  @@ -148,30 +133,12 @@
   protected abstract void connectCachingPipeline(Environment   environment) 
throws ProcessingException;
   
   /**
  - * Composable Interface
  - */
  -public void compose (ComponentManager manager)
  -throws ComponentException {
  -super.compose(manager);
  -}
  -
  -/**
* Parameterizable Interface - Configuration
*/
   public void parameterize(Parameters params)
   throws ParameterException {
   super.parameterize(params);
   this.configuredDoSmartCaching = 
params.getParameterAsBoolean(smart-caching, true);
  -String cacheRole = params.getParameter(cache-role, Cache.ROLE);
  -if ( this.getLogger().isDebugEnabled()) {
  -this.getLogger().debug(Using cache  + cacheRole);
  -}
  -
  -try {
  -this.cache = (Cache)this.manager.lookup(cacheRole);
  -} catch (ComponentException ce) {
  -throw new ParameterException(Unable to lookup cache:  + cacheRole, 
ce);
  -}
   }
   
   /**
  @@ -970,13 +937,6 @@
* Recyclable Interface
*/
   public void recycle() {
  -super.recycle();
  -
  -this.manager.release( this.xmlDeserializer );
  -this.xmlDeserializer = null;
  -
  -this.manager.release( this.xmlSerializer );
  -this.xmlSerializer = null;
   
   this.generatorRole = null;
   this.transformerRoles.clear();
  @@ -989,18 +949,10 @@
   this.transformerIsCacheableProcessingComponent = null;
   this.toCacheKey = null;
   this.toCacheSourceValidities = null;
  -}
   
  -/**
  - * Disposable Interface
  - */
  -public void dispose() {
  -if ( null != this.manager ) {
  -this.manager.release(this.cache

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/caching Cache.java

2003-07-31 Thread cziegeler
cziegeler2003/07/31 07:28:19

  Modified:src/java/org/apache/cocoon/caching/impl CacheImpl.java
   src/java/org/apache/cocoon/caching Cache.java
  Log:
  Changing type of key to allow more generic caching algorithms
  
  Revision  ChangesPath
  1.5   +11 -9 
cocoon-2.1/src/java/org/apache/cocoon/caching/impl/CacheImpl.java
  
  Index: CacheImpl.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/caching/impl/CacheImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CacheImpl.java13 Jul 2003 03:10:10 -  1.4
  +++ CacheImpl.java31 Jul 2003 14:28:18 -  1.5
  @@ -50,10 +50,14 @@
   */
   package org.apache.cocoon.caching.impl;
   
  +import java.io.IOException;
  +import java.io.Serializable;
  +import java.util.Map;
  +
   import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
   import org.apache.avalon.framework.parameters.Parameterizable;
  @@ -62,10 +66,7 @@
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.caching.Cache;
   import org.apache.cocoon.caching.CachedResponse;
  -import org.apache.cocoon.caching.PipelineCacheKey;
   import org.apache.excalibur.store.Store;
  -import java.io.IOException;
  -import java.util.Map;
   
   /**
* This is the Cocoon cache. This component is responsible for storing
  @@ -112,7 +113,7 @@
* @param responsethe cached response
*/
   public void store(Map  objectModel,
  -  PipelineCacheKey key,
  +  Serializable key,
 CachedResponse   response)
   throws ProcessingException {
   try {
  @@ -128,7 +129,7 @@
* @param key the key used by the caching algorithm to identify the
*request
*/
  -public CachedResponse get(PipelineCacheKey key) {
  +public CachedResponse get(Serializable key) {
   return (CachedResponse)this.store.get(key);
   }
   
  @@ -138,7 +139,7 @@
* @param key the key used by the caching algorithm to identify the
*request
*/
  -public void remove(PipelineCacheKey key) {
  +public void remove(Serializable key) {
   this.store.remove(key);
   }
   
  @@ -146,13 +147,14 @@
* clear cache of all cached responses 
*/
   public void clear() {
  +// FIXME this clears the whole store!
   this.store.clear();
   }
   
/**
 * See if a response is cached under this key
 */
  - public boolean containsKey(PipelineCacheKey key) {
  + public boolean containsKey(Serializable key) {
return this.store.containsKey(key);
}
   
  
  
  
  1.3   +7 -5  cocoon-2.1/src/java/org/apache/cocoon/caching/Cache.java
  
  Index: Cache.java
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/caching/Cache.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Cache.java13 Jul 2003 03:10:10 -  1.2
  +++ Cache.java31 Jul 2003 14:28:18 -  1.3
  @@ -52,6 +52,8 @@
   
   import org.apache.avalon.framework.component.Component;
   import org.apache.cocoon.ProcessingException;
  +
  +import java.io.Serializable;
   import java.util.Map;
   
   /**
  @@ -78,7 +80,7 @@
* @param responsethe cached response
*/
   void store(Map  objectModel,
  -   PipelineCacheKey key,
  +   Serializable key,
  CachedResponse   response)
   throws ProcessingException;
   
  @@ -88,7 +90,7 @@
* @param key the key used by the caching algorithm to identify the
*request
*/
  -CachedResponse get(PipelineCacheKey key);
  +CachedResponse get(Serializable key);
   
   /**
* Remove a cached response.
  @@ -96,7 +98,7 @@
* @param key the key used by the caching algorithm to identify the
*request
*/
  -void remove(PipelineCacheKey key);
  +void remove(Serializable key);
   
   /**
* clear cache of all cached responses 
  @@ -106,5 +108,5 @@
   /**
* See if a response is cached under this key.
*/
  -boolean containsKey(PipelineCacheKey key);
  +boolean containsKey(Serializable key);
   }
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile ProfileManager.java

2003-07-31 Thread cziegeler
cziegeler2003/07/31 07:37:05

  Modified:src/blocks/portal/java/org/apache/cocoon/portal/layout
CompositeLayout.java
   src/blocks/portal/java/org/apache/cocoon/portal/profile
ProfileManager.java
  Log:
  Fixing javadocs
  
  Revision  ChangesPath
  1.7   +4 -4  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java
  
  Index: CompositeLayout.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CompositeLayout.java  26 May 2003 13:18:19 -  1.6
  +++ CompositeLayout.java  31 Jul 2003 14:37:05 -  1.7
  @@ -66,14 +66,14 @@
   
/**
 * Add indexed item to the itemList.
  -  * @param index, index for the position inside the list
  -  * @param item, item to add
  +  * @param index index for the position inside the list
  +  * @param item item to add
 */
   void addItem(int index, Item item);
   
/**
 * Add Item to the ItemList.
  -  * @param item, item to add
  +  * @param item item to add
 */
void addItem(Item item);
   
  
  
  
  1.8   +2 -2  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileManager.java
  
  Index: ProfileManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProfileManager.java   18 Jul 2003 14:41:45 -  1.7
  +++ ProfileManager.java   31 Jul 2003 14:37:05 -  1.8
  @@ -78,7 +78,7 @@
* a specific layout object in the profile defined by
* the layout key.
* @param layoutKey A key describing the layout or null for the default
  - * @param subKeyThe id of a layout object or null for the root object
  + * @param layoutIDThe id of a layout object or null for the root object
* @return The layout
*/
Layout getPortalLayout(String layoutKey, String layoutID);
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/selection ExceptionSelector.java JXPathExceptionSelector.java

2003-07-30 Thread cziegeler
cziegeler2003/07/30 01:21:25

  Modified:src/java/org/apache/cocoon/selection ExceptionSelector.java
  Removed: src/java/org/apache/cocoon/selection
JXPathExceptionSelector.java
  Log:
  Removing obsolete JXPathExceptioSelector
  Fixing NPE in ExceptionSelector
  
  Revision  ChangesPath
  1.6   +4 -1  
cocoon-2.1/src/java/org/apache/cocoon/selection/ExceptionSelector.java
  
  Index: ExceptionSelector.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/selection/ExceptionSelector.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ExceptionSelector.java10 Jul 2003 13:16:55 -  1.5
  +++ ExceptionSelector.java30 Jul 2003 08:21:25 -  1.6
  @@ -181,6 +181,9 @@
   }
   
   public boolean select(String expression, Object selectorContext) {
  +if ( selectorContext == null ) {
  +return false;
  +}
   // Just compare the expression with the previously found name
boolean result = 
expression.equals(((FindResult)selectorContext).getName());

  
  
  


cvs commit: cocoon-2.0/src/java/org/apache/cocoon/webapps/portal/components PortalManager.java

2003-07-30 Thread cziegeler
cziegeler2003/07/30 03:24:44

  Modified:src/java/org/apache/cocoon/webapps/portal/components
PortalManager.java
  Log:
  Applying patch for the double-click bug from Hartmut Zimmermann ([EMAIL PROTECTED])
  
  Revision  ChangesPath
  1.2   +13 -3 
cocoon-2.0/src/java/org/apache/cocoon/webapps/portal/components/PortalManager.java
  
  Index: PortalManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.0/src/java/org/apache/cocoon/webapps/portal/components/PortalManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortalManager.java9 Mar 2003 00:03:37 -   1.1
  +++ PortalManager.java30 Jul 2003 10:24:44 -  1.2
  @@ -937,11 +937,21 @@
   // LOAD COPLETS
   List[] copletContents;
   
  -copletContents = 
(List[])context.getAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY);
  -if (copletContents == null) {
  +List[] temp = 
(List[])context.getAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY);
  +if (temp != null) {
  +copletContents = new List[temp.length];
  +for (int i = 0; i  temp.length; i++) {
  +if (temp[i] == null) {
  +copletContents[i] = null;
  +} else {
  +copletContents[i] = new ArrayList(temp[i]);
  +}
  +}
  +} else {
   copletContents = new List[PortalConstants.MAX_COLUMNS+2];
   
context.setAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY, copletContents);
   }
  +
   if (copletContents[0] == null) {
   copletContents[0] = new ArrayList(1);
   } else {
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components PortalManager.java

2003-07-30 Thread cziegeler
cziegeler2003/07/30 03:25:37

  Modified:src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components
PortalManager.java
  Log:
  Applying patch for the double-click bug from Hartmut Zimmermann ([EMAIL PROTECTED])
  
  Revision  ChangesPath
  1.8   +13 -3 
cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManager.java
  
  Index: PortalManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PortalManager.java18 Jun 2003 12:36:45 -  1.7
  +++ PortalManager.java30 Jul 2003 10:25:37 -  1.8
  @@ -963,11 +963,21 @@
   // LOAD COPLETS
   List[] copletContents;
   
  -copletContents = 
(List[])context.getAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY);
  -if (copletContents == null) {
  +List[] temp = 
(List[])context.getAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY);
  +if (temp != null) {
  +copletContents = new List[temp.length];
  +for (int i = 0; i  temp.length; i++) {
  +if (temp[i] == null) {
  +copletContents[i] = null;
  +} else {
  +copletContents[i] = new ArrayList(temp[i]);
  +}
  +}
  +} else {
   copletContents = new List[PortalConstants.MAX_COLUMNS+2];
   
context.setAttribute(PortalConstants.ATTRIBUTE_COPLET_REPOSITORY, copletContents);
   }
  +
   if (copletContents[0] == null) {
   copletContents[0] = new ArrayList(1);
   } else {
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl ParameterAspect.java

2003-07-29 Thread cziegeler
cziegeler2003/07/28 23:30:07

  Modified:src/blocks/portal/conf portal.samplesxconf portal.xconf
   src/blocks/portal/samples/profiles/mapping layout.xml
   src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
AbstractProfileManager.java
StaticProfileManager.java MapProfileLS.java
  Added:   
src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
ParameterAspect.java
  Log:
  Bug fixes and improvements from Volker
  
  Revision  ChangesPath
  1.2   +32 -0 cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf
  
  Index: portal.samplesxconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/conf/portal.samplesxconf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- portal.samplesxconf   18 Jul 2003 14:41:44 -  1.1
  +++ portal.samplesxconf   29 Jul 2003 06:30:06 -  1.2
  @@ -65,6 +65,19 @@
/aspects
/renderer
renderer name=link 
class=org.apache.cocoon.portal.layout.renderer.impl.DefaultLinkRenderer 
logger=portal/
  + renderer name=decorated-frame 
class=org.apache.cocoon.portal.layout.renderer.impl.AspectRenderer logger=portal
  + aspects
  +aspect type=xslt
  +parameter name=style value={global:skin}styles/frame.xsl/
  +/aspect
  +aspect type=parameter
  +parameter name=tag-name value=frame/
  +/aspect
  +aspect type=frame
  +parameter name=store value=request/
  +/aspect
  + /aspects
  +/renderer
/component

   !-- Layout factory configuration --
  @@ -102,6 +115,25 @@
   renderer name=window/
   /renderers
   /layout
  +layout name=link
  +class=org.apache.cocoon.portal.layout.impl.LinkLayout
  +create-id=true
  +renderers default=link
  +renderer name=link/
  +/renderers
  +aspects
  +   aspect name=link-layout-key
  +   class=java.lang.String
  +   store=session
  +   auto-create=false
  +   /aspect
  +   aspect name=link-layout-id
  +   class=java.lang.String
  +   store=session
  +   auto-create=false
  +   /aspect
  +/aspects
  + /layout
   /layouts
   /component
   
  
  
  
  1.21  +3 -1  cocoon-2.1/src/blocks/portal/conf/portal.xconf
  
  Index: portal.xconf
  ===
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/conf/portal.xconf,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- portal.xconf  18 Jul 2003 14:41:44 -  1.20
  +++ portal.xconf  29 Jul 2003 06:30:06 -  1.21
  @@ -7,13 +7,14 @@
   aspect name=action-counter 
class=org.apache.cocoon.portal.event.aspect.impl.ActionCounterEventAspect/
   aspect name=request-parameter 
class=org.apache.cocoon.portal.event.aspect.impl.RequestParameterEventAspect/
   aspect name=frame 
class=org.apache.cocoon.portal.event.aspect.impl.FrameEventAspect/
  -aspect name=full-screen-coplet 
class=org.apache.cocoon.portal.event.aspect.impl.FullScreenCopletEventAspect/
  +aspect name=link  
class=org.apache.cocoon.portal.event.aspect.impl.LinkEventAspect /aspect 
name=full-screen-coplet 
class=org.apache.cocoon.portal.event.aspect.impl.FullScreenCopletEventAspect/
/component
   
component class=org.apache.cocoon.portal.event.impl.DefaultEventManager 
logger=portal role=org.apache.cocoon.portal.event.EventManager
   event-aspects
   aspect type=action-counter/
   aspect type=frame/
  +aspect type=link/
   aspect type=full-screen-coplet/
   aspect type=request-parameter/
   /event-aspects
  @@ -61,6 +62,7 @@
   aspect name=coplet 
class=org.apache.cocoon.portal.layout.renderer.aspect.impl.DefaultCopletAspect/
   aspect name=frame 
class=org.apache.cocoon.portal.layout.renderer.aspect.impl.FrameAspect/
   aspect name=xslt 
class=org.apache.cocoon.portal.layout.renderer.aspect.impl.XSLTAspect/
  +aspect 
class=org.apache.cocoon.portal.layout.renderer.aspect.impl.ParameterAspect 
name=parameter/
/component
   
!-- Aspect Storage configuration --
  
  
  
  1.13  +3 -0  cocoon-2.1/src/blocks/portal/samples/profiles/mapping/layout.xml
  
  Index: layout.xml
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/samples/profiles/mapping/layout.xml,v
  retrieving revision 1.12
  retrieving revision 1.13

cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/coplet copletinstancedata.xml copletbasedata.xml copletdata.xml

2003-07-29 Thread cziegeler
cziegeler2003/07/28 23:52:15

  Modified:src/blocks/portal/conf portal.xconf
  Added:   src/blocks/portal/java/org/apache/cocoon/portal/layout
layout.xml
   src/blocks/portal/java/org/apache/cocoon/portal/coplet
copletinstancedata.xml copletbasedata.xml
copletdata.xml
  Removed: src/blocks/portal/samples/profiles/mapping layout.xml
copletdata.xml copletbasedata.xml
copletinstancedata.xml
  Log:
  Moving bindings into jar
  
  Revision  ChangesPath
  1.1  
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml
  
  Index: layout.xml
  ===
  ?xml version=1.0 encoding=UTF-8?
  mapping
  descriptionPortalprofile mapping file/description
  
  
class name=org.apache.cocoon.portal.aspect.impl.AbstractAspectalizable
  field name=persistentAspectData 
type=org.apache.cocoon.portal.util.MapItem collection=map 
handler=org.apache.cocoon.portal.util.AspectDataFieldHandler
  bind-xml name=aspect/
  /field
  /class
  
class name=org.apache.cocoon.portal.factory.impl.AbstractProducible
   extends=org.apache.cocoon.portal.aspect.impl.AbstractAspectalizable
  field name=name type=java.lang.String
  bind-xml name=name node=attribute /
  /field
  field name=id type=java.lang.String 
  bind-xml name=id node=attribute /
  /field
  /class
  
class name=org.apache.cocoon.portal.layout.AbstractParameters
  field name=parameters type=org.exolab.castor.mapping.MapItem 
collection=map handler=org.apache.cocoon.portal.util.ParameterFieldHandler
  bind-xml name=parameter /
  /field
  /class
  
  class name=org.apache.cocoon.portal.layout.AbstractLayout
 extends=org.apache.cocoon.portal.factory.impl.AbstractProducible
  field name=layoutRendererName type=java.lang.String
  bind-xml name=layout-renderer-name node=attribute /
  /field
  field name=parameters type=org.exolab.castor.mapping.MapItem 
collection=map handler=org.apache.cocoon.portal.util.ParameterFieldHandler
  bind-xml name=parameter /
  /field
  field name=static type=boolean
  bind-xml name=static node=attribute /
  /field
  /class
  
  class name=org.apache.cocoon.portal.layout.impl.LinkLayout
 extends=org.apache.cocoon.portal.layout.AbstractLayout
  map-to xml=link-layout /
  field name=layoutKey type=java.lang.String
  bind-xml name=layout-key node=attribute /
  /field
  field name=layoutId type=java.lang.String
  bind-xml name=layout-id node=attribute /
  /field
  /class
  
  class name=org.apache.cocoon.portal.layout.impl.CompositeLayoutImpl
 extends=org.apache.cocoon.portal.layout.AbstractLayout
  map-to xml=composite-layout/
  field name=items type=org.apache.cocoon.portal.layout.Item 
 collection=collection 
 set-method=addItem
 get-method=getItems
  bind-xml auto-naming=deriveByClass /
  /field
  /class
  
 class name=org.apache.cocoon.portal.layout.impl.FrameLayout
 extends=org.apache.cocoon.portal.layout.AbstractLayout
  map-to xml=frame-layout /
  field name=source type=java.lang.String /
  /class
  
  class name=org.apache.cocoon.portal.layout.Item
 extends=org.apache.cocoon.portal.layout.AbstractParameters
  field name=layout type=org.apache.cocoon.portal.layout.Layout
  bind-xml auto-naming=deriveByClass /
  /field
  /class
  
  class name=org.apache.cocoon.portal.layout.NamedItem
 extends=org.apache.cocoon.portal.layout.Item
  map-to xml=named-item /
  field name=name type=java.lang.String
  bind-xml name=name node=attribute /
  /field
  /class
  
class name=org.exolab.castor.mapping.MapItem
field name=key type=java.lang.String
bind-xml name=name node=attribute/
/field
  
field name=value type=java.lang.String
bind-xml name=value node=attribute/
/field
/class
  
class name=org.apache.cocoon.portal.util.MapItem
field name=key type=java.lang.String
bind-xml name=name/
/field
  
field name=value
bind-xml name=value/
/field
/class
  
  class name=org.apache.cocoon.portal.layout.impl.CopletLayout 
auto-complete=false
 extends

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor TreeProcessor.java

2003-07-29 Thread cziegeler
cziegeler2003/07/29 00:41:27

  Modified:src/java/org/apache/cocoon/components/treeprocessor/sitemap
ComponentsSelector.java
   src/java/org/apache/cocoon/components/treeprocessor
TreeProcessor.java
  Log:
  Fixing NPE in releasing components from a selector: 
  the components were released in the wrong order: first the selector and
  then the components from the selector...
  
  Revision  ChangesPath
  1.4   +5 -1  
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ComponentsSelector.java
  
  Index: ComponentsSelector.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/ComponentsSelector.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ComponentsSelector.java   18 Jun 2003 11:06:31 -  1.3
  +++ ComponentsSelector.java   29 Jul 2003 07:41:26 -  1.4
  @@ -343,6 +343,10 @@
   return pipelineHint;
   }
   
  +public void dispose() {
  +super.dispose();
  +this.parentSitemapSelector = null;
  +}
   }
   
   
  
  
  
  1.10  +10 -10
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TreeProcessor.java28 Jul 2003 18:09:48 -  1.9
  +++ TreeProcessor.java29 Jul 2003 07:41:27 -  1.10
  @@ -50,6 +50,11 @@
   */
   package org.apache.cocoon.components.treeprocessor;
   
  +import java.util.Collections;
  +import java.util.HashMap;
  +import java.util.List;
  +import java.util.Map;
  +
   import org.apache.avalon.excalibur.component.RoleManageable;
   import org.apache.avalon.excalibur.component.RoleManager;
   import org.apache.avalon.excalibur.logger.LogKitManageable;
  @@ -79,12 +84,6 @@
   import org.apache.cocoon.environment.Environment;
   import org.apache.excalibur.source.Source;
   
  -import java.util.Collections;
  -import java.util.HashMap;
  -import java.util.Iterator;
  -import java.util.List;
  -import java.util.Map;
  -
   /**
* Interpreted tree-traversal implementation of a pipeline assembly language.
*
  @@ -470,9 +469,10 @@
*/
   protected void disposeTree() {
   if (this.disposableNodes != null) {
  -Iterator iter = this.disposableNodes.iterator();
  -while (iter.hasNext()) {
  -((Disposable)iter.next()).dispose();
  +// we must dispose the nodes in reverse order
  +// otherwise selector nodes are freed before the components node
  +for(int i=this.disposableNodes.size()-1; i-1; i--) {
  +((Disposable)disposableNodes.get(i)).dispose();
   }
   this.disposableNodes = null;
   }
  
  
  


cvs commit: cocoon-2.1 forrest.properties

2003-07-29 Thread cziegeler
cziegeler2003/07/29 01:26:36

  Modified:src/java/org/apache/cocoon cocoon.properties
   src/webapp sitemap.xmap
   .forrest.properties
  Log:
  Release version
  
  Revision  ChangesPath
  1.11  +1 -1  cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties
  
  Index: cocoon.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- cocoon.properties 4 Jul 2003 09:07:41 -   1.10
  +++ cocoon.properties 29 Jul 2003 08:26:35 -  1.11
  @@ -4,7 +4,7 @@
   # very high chance of breaking the build system. Do it only if you know what
   # you're doing.
   
  -version=2.1rc1-dev
  +version=2.1rc1
   released.version=2.0.4
   year=1999-2003
   name=cocoon
  
  
  
  1.28  +2 -2  cocoon-2.1/src/webapp/sitemap.xmap
  
  Index: sitemap.xmap
  ===
  RCS file: /home/cvs/cocoon-2.1/src/webapp/sitemap.xmap,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- sitemap.xmap  29 Jul 2003 03:15:47 -  1.27
  +++ sitemap.xmap  29 Jul 2003 08:26:36 -  1.28
  @@ -18,7 +18,7 @@
   map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
   
   !-- === Components  --
  -
  + 
map:components
   
 !--+
  
  
  
  1.18  +1 -1  cocoon-2.1/forrest.properties
  
  Index: forrest.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/forrest.properties,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- forrest.properties8 Jul 2003 14:12:55 -   1.17
  +++ forrest.properties29 Jul 2003 08:26:36 -  1.18
  @@ -6,7 +6,7 @@
   #forrest.echo=true
   
   # Project name (used to name .war file)
  -project.name=cocoon-2.1rc1-dev
  +project.name=cocoon-2.1rc1
   
   # Specifies name of Forrest skin to use
   #project.skin=forrest-site
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap SwitchSelectNode.java

2003-07-29 Thread cziegeler
cziegeler2003/07/29 01:46:00

  Modified:src/java/org/apache/cocoon/components/treeprocessor/sitemap
SwitchSelectNode.java
  Log:
  Reverting changes
  
  Revision  ChangesPath
  1.3   +1 -8  
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SwitchSelectNode.java
  
  Index: SwitchSelectNode.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap/SwitchSelectNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SwitchSelectNode.java 29 Jul 2003 06:28:54 -  1.2
  +++ SwitchSelectNode.java 29 Jul 2003 08:46:00 -  1.3
  @@ -128,9 +128,6 @@
   if (this.threadSafeSelector != null) {
   
   Object ctx = this.threadSafeSelector.getSelectorContext(objectModel, 
resolvedParams);
  -if ( ctx == null ) {
  -return false;
  -}
   
   for (int i = 0; i  this.whenTests.length; i++) {
   if (this.threadSafeSelector.select(whenTests[i].resolve(context, 
objectModel), ctx)) {
  @@ -150,10 +147,6 @@
   Object ctx = selector.getSelectorContext(objectModel, resolvedParams);
  
   try {
  -if ( ctx == null ) {
  -return false;
  -}
  -
   for (int i = 0; i  this.whenTests.length; i++) {
   if (selector.select(whenTests[i].resolve(context, objectModel), 
ctx)) {
   return invokeNodes(this.whenNodes[i], env, context);
  
  
  


cvs commit: cocoon-2.1 status.xml forrest.properties

2003-07-29 Thread cziegeler
cziegeler2003/07/29 02:01:01

  Modified:src/java/org/apache/cocoon cocoon.properties
   .status.xml forrest.properties
  Log:
  Starting next version
  
  Revision  ChangesPath
  1.12  +1 -1  cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties
  
  Index: cocoon.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/cocoon.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- cocoon.properties 29 Jul 2003 08:26:35 -  1.11
  +++ cocoon.properties 29 Jul 2003 09:01:01 -  1.12
  @@ -4,7 +4,7 @@
   # very high chance of breaking the build system. Do it only if you know what
   # you're doing.
   
  -version=2.1rc1
  +version=2.1rc2-dev
   released.version=2.0.4
   year=1999-2003
   name=cocoon
  
  
  
  1.98  +4 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- status.xml29 Jul 2003 02:07:31 -  1.97
  +++ status.xml29 Jul 2003 09:01:01 -  1.98
  @@ -167,6 +167,9 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=NN type=addDummy action/action
  + /release
  + release version=2.1rc1 date=July 29 2003
 action dev=VG type=update
   Updated FOP to the latest released version, 0.20.5.
 /action
  
  
  
  1.19  +1 -1  cocoon-2.1/forrest.properties
  
  Index: forrest.properties
  ===
  RCS file: /home/cvs/cocoon-2.1/forrest.properties,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- forrest.properties29 Jul 2003 08:26:36 -  1.18
  +++ forrest.properties29 Jul 2003 09:01:01 -  1.19
  @@ -6,7 +6,7 @@
   #forrest.echo=true
   
   # Project name (used to name .war file)
  -project.name=cocoon-2.1rc1
  +project.name=cocoon-2.1rc2-dev
   
   # Specifies name of Forrest skin to use
   #project.skin=forrest-site
  
  
  


cvs commit: cocoon-site/src/documentation/content/xdocs/news index.xml

2003-07-29 Thread cziegeler
cziegeler2003/07/29 02:26:52

  Modified:src/documentation/content/xdocs/news index.xml
  Log:
  Add new release
  
  Revision  ChangesPath
  1.8   +1 -0  cocoon-site/src/documentation/content/xdocs/news/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/cocoon-site/src/documentation/content/xdocs/news/index.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- index.xml 8 Jul 2003 13:28:47 -   1.7
  +++ index.xml 29 Jul 2003 09:26:51 -  1.8
  @@ -17,6 +17,7 @@
 titleJuly 2003/title
   
 ul
  +liRelease Cocoon 2.1 Release Candidate 1 on July, 29th./li
   liRelease Cocoon 2.1 Milestone 3 on July, 4th./li
   liChanged mailing list names to reflect top level status./li
   liThe developer list has been renamed from 
emcocoon-dev.at.xml.apache.org/em to emdev.at.cocoon.apache.org/em./li
  
  
  


cvs commit: cocoon-site/src/documentation/content/xdocs guidelines.xml

2003-07-29 Thread cziegeler
cziegeler2003/07/29 02:37:58

  Modified:src/documentation/content/xdocs guidelines.xml
  Log:
  Typo
  
  Revision  ChangesPath
  1.4   +1 -1  cocoon-site/src/documentation/content/xdocs/guidelines.xml
  
  Index: guidelines.xml
  ===
  RCS file: /home/cvs/cocoon-site/src/documentation/content/xdocs/guidelines.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- guidelines.xml29 Jul 2003 09:34:46 -  1.3
  +++ guidelines.xml29 Jul 2003 09:37:58 -  1.4
  @@ -297,7 +297,7 @@
   /tr
 /table
   
  -  pVotes cast by the subproject#39;s Committers are considered
  +  pVotes cast by the project#39;s Committers are considered
 #34;binding#34;. When needed, at least 3 binding +1 votes are
 required for action-item approval./p
   
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor TreeProcessor.java

2003-07-28 Thread cziegeler
cziegeler2003/07/28 11:09:48

  Modified:src/java/org/apache/cocoon/components/treeprocessor
TreeProcessor.java
  Log:
  It's that easy...removed unnecessary environment handling for internal calls and 
finally fixed wrong sitemap manager
  
  Revision  ChangesPath
  1.9   +2 -4  
cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
  
  Index: TreeProcessor.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TreeProcessor.java28 Jul 2003 17:50:41 -  1.8
  +++ TreeProcessor.java28 Jul 2003 18:09:48 -  1.9
  @@ -323,7 +323,7 @@
   }
   
   // and now process
  -CocoonComponentManager.enterEnvironment(environment, this.manager, this);
  +CocoonComponentManager.enterEnvironment(environment, 
this.sitemapComponentManager, this);
   try {
   return this.rootNode.invoke(environment, context);
   } finally {
  @@ -342,7 +342,6 @@
   
   context.enableLogging(getLogger());
   
  -CocoonComponentManager.enterEnvironment(environment, this.manager, this);
   try {
   if ( process(environment, context) ) {
   return context.getProcessingPipeline();
  @@ -350,7 +349,6 @@
   return null;
   }
   } finally {
  -CocoonComponentManager.leaveEnvironment();
   context.dispose();
   }
   }
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components LifecycleHelper.java

2003-07-28 Thread cziegeler
cziegeler2003/07/28 11:26:01

  Modified:src/java/org/apache/cocoon/components LifecycleHelper.java
  Log:
  Simple code formatting
  
  Revision  ChangesPath
  1.4   +151 -163  
cocoon-2.1/src/java/org/apache/cocoon/components/LifecycleHelper.java
  
  Index: LifecycleHelper.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/LifecycleHelper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LifecycleHelper.java  24 Jul 2003 10:30:52 -  1.3
  +++ LifecycleHelper.java  28 Jul 2003 18:26:01 -  1.4
  @@ -84,35 +84,34 @@
   
   // FIXME : need to handle also LogEnabled.
   
  -public class LifecycleHelper
  -{
  +public class LifecycleHelper {
   /** The Logger for the component
*/
  -private Logger  m_logger;
  +final private Logger m_logger;
   
   /** The Context for the component
*/
  -private Context m_context;
  +final private Context m_context;
   
   /** The component manager for this component.
*/
  -private ComponentManagerm_componentManager;
  +final private ComponentManager m_componentManager;
   
   /** The service manager for this component.
*/
  -private ServiceManagerm_serviceManager;
  +final private ServiceManager m_serviceManager;
   
   /** The configuration for this component.
*/
  -private Configuration   m_configuration;
  +final private Configuration m_configuration;
   
   /** The RoleManager for child ComponentSelectors
*/
  -private RoleManager m_roles;
  +final private RoleManager m_roles;
   
   /** The LogKitManager for child ComponentSelectors
*/
  -private LogKitManager   m_logkit;
  +final private LogKitManager m_logkit;
   
   /**
* Construct a new codeLifecycleHelper/code that can be used repeatedly to
  @@ -127,34 +126,47 @@
* @param roles the codeRoleManager/code to pass to 
codeDefaultComponentSelector/codes.
* @param configuration the codeConfiguration/code object to pass to new 
instances.
*/
  -public LifecycleHelper( final Logger logger,
  -final Context context,
  -final ComponentManager componentManager,
  -final RoleManager roles,
  -final LogKitManager logkit,
  -final Configuration configuration )
  -{
  +public LifecycleHelper(final Logger logger,
  +final Context context,
  +final ComponentManager componentManager,
  +final RoleManager roles,
  +final LogKitManager logkit,
  +final Configuration configuration) {
   m_logger = logger;
   m_context = context;
   m_componentManager = componentManager;
   m_roles = roles;
   m_logkit = logkit;
   m_configuration = configuration;
  +m_serviceManager = null;
   }
   
  -public LifecycleHelper( final Logger logger,
  -final Context context,
  -final ServiceManager serviceManager,
  -final RoleManager roles,
  -final LogKitManager logkit,
  -final Configuration configuration )
  -{
  +/**
  + * Construct a new codeLifecycleHelper/code that can be used repeatedly to
  + * setup several components. bNote/b : if a parameter is codenull/code,
  + * the corresponding method isn't called (e.g. if codeconfiguration/code is
  + * codenull/code, codeconfigure()/code isn't called).
  + *
  + * @param logger the codeLogger/code to pass to codeLogEnabled/codes, 
unless there is
  + *a codeLogKitManager/code and the configuration specifies a logger 
name.
  + * @param context the codeContext/code to pass to 
codeContexutalizable/codes.
  + * @param serviceManager the service manager to pass to 
codeServiceable/codes.
  + * @param roles the codeRoleManager/code to pass to 
codeDefaultComponentSelector/codes.
  + * @param configuration the codeConfiguration/code object to pass to new 
instances.
  + */
  +public LifecycleHelper(final Logger logger,
  +final Context context,
  +final ServiceManager serviceManager,
  +final RoleManager roles,
  +final LogKitManager logkit,
  +final Configuration configuration) {
   m_logger = logger;
   m_context = context;
   m_serviceManager = serviceManager;
   m_roles = roles;
   m_logkit = logkit;
   m_configuration = configuration;
  +m_componentManager = null

cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl AbstractDatatypeBuilder.java

2003-07-28 Thread cziegeler
cziegeler2003/07/28 13:03:13

  Modified:src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl
AbstractDatatypeBuilder.java
  Log:
  Organizing imports
  
  Revision  ChangesPath
  1.8   +9 -10 
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java
  
  Index: AbstractDatatypeBuilder.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractDatatypeBuilder.java  28 Jul 2003 15:57:15 -  1.7
  +++ AbstractDatatypeBuilder.java  28 Jul 2003 20:03:13 -  1.8
  @@ -50,22 +50,21 @@
   */
   package org.apache.cocoon.woody.datatype.typeimpl;
   
  -import org.apache.cocoon.woody.datatype.*;
  -import org.apache.cocoon.woody.datatype.convertor.Convertor;
  -import org.apache.cocoon.woody.datatype.convertor.ConvertorBuilder;
  -import org.apache.cocoon.woody.util.DomHelper;
  -import org.apache.cocoon.woody.util.SimpleServiceSelector;
  -import org.apache.cocoon.woody.Constants;
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.service.ServiceException;
  -import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.service.ServiceManager;
  -import org.apache.excalibur.source.Source;
  -import org.apache.excalibur.source.SourceResolver;
  +import org.apache.avalon.framework.service.Serviceable;
  +import org.apache.cocoon.woody.Constants;
  +import org.apache.cocoon.woody.datatype.DatatypeBuilder;
  +import org.apache.cocoon.woody.datatype.DatatypeManager;
  +import org.apache.cocoon.woody.datatype.ValidationRule;
  +import org.apache.cocoon.woody.datatype.convertor.Convertor;
  +import org.apache.cocoon.woody.datatype.convertor.ConvertorBuilder;
  +import org.apache.cocoon.woody.util.DomHelper;
  +import org.apache.cocoon.woody.util.SimpleServiceSelector;
   import org.w3c.dom.Element;
  -import java.io.IOException;
   
   /**
* Abstract base class for datatype builders, most concrete datatype builders
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers DefaultIncludeCacheManager.java IncludeCacheManagerSession.java PreemptiveLoader.java ExpiresValidity.java

2003-07-27 Thread cziegeler
cziegeler2003/07/27 04:09:17

  Modified:src/java/org/apache/cocoon/transformation/helpers
DefaultIncludeCacheManager.java
IncludeCacheManagerSession.java
PreemptiveLoader.java
  Removed: src/java/org/apache/cocoon/transformation/helpers
ExpiresValidity.java
  Log:
  Make the store to use for the caching-cinclude element configurable, remove obsolete 
class
  
  Revision  ChangesPath
  1.5   +8 -3  
cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/DefaultIncludeCacheManager.java
  
  Index: DefaultIncludeCacheManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/DefaultIncludeCacheManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultIncludeCacheManager.java   12 Mar 2003 15:35:10 -  1.4
  +++ DefaultIncludeCacheManager.java   27 Jul 2003 11:09:17 -  1.5
  @@ -411,8 +411,6 @@
   public void compose(ComponentManager manager) throws ComponentException {
   this.manager = manager;
   this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
  -this.store = (Store)this.manager.lookup(Store.ROLE);
  -this.defaultCacheStorage = new StoreIncludeCacheStorageProxy(this.store, 
this.getLogger());
   }
   
   /**
  @@ -440,6 +438,13 @@
 this.preemptiveLoaderURI.indexOf(://) == -1) {
   throw new ParameterException(The preemptive-loader-url must be 
absolute:  + this.preemptiveLoaderURI);
   }
  +final String storeRole = parameters.getParameter(use-store, Store.ROLE);
  +try {
  +this.store = (Store)this.manager.lookup(storeRole);
  +} catch (ComponentException e) {
  +throw new ParameterException(Unable to lookup store with role  + 
storeRole, e);
  +}
  +this.defaultCacheStorage = new StoreIncludeCacheStorageProxy(this.store, 
this.getLogger());
   }
   
   }
  
  
  
  1.4   +2 -1  
cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/IncludeCacheManagerSession.java
  
  Index: IncludeCacheManagerSession.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/IncludeCacheManagerSession.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IncludeCacheManagerSession.java   12 Mar 2003 15:08:04 -  1.3
  +++ IncludeCacheManagerSession.java   27 Jul 2003 11:09:17 -  1.4
  @@ -60,6 +60,7 @@
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceResolver;
   import org.apache.excalibur.source.SourceValidity;
  +import org.apache.excalibur.source.impl.validity.ExpiresValidity;
   
   /**
* This object encapsulates a caching session. A caching session has the
  
  
  
  1.4   +2 -1  
cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/PreemptiveLoader.java
  
  Index: PreemptiveLoader.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/helpers/PreemptiveLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PreemptiveLoader.java 12 Mar 2003 15:35:11 -  1.3
  +++ PreemptiveLoader.java 27 Jul 2003 11:09:17 -  1.4
  @@ -63,6 +63,7 @@
   import org.apache.excalibur.source.Source;
   import org.apache.excalibur.source.SourceResolver;
   import org.apache.excalibur.source.SourceValidity;
  +import org.apache.excalibur.source.impl.validity.ExpiresValidity;
   
   /**
* The preemptive loader is a singleton that runs in the background
  
  
  


cvs commit: cocoon-2.1/lib jars.xml

2003-07-26 Thread cziegeler
cziegeler2003/07/26 06:26:47

  Modified:.gump.xml
   src/java/org/apache/cocoon/components/store/impl
DefaultStore.java
   src/deprecated/java/org/apache/cocoon/components/store
JispFilesystemStore.java JispStringKey.java
   lib  jars.xml
  Added:   lib/core jisp-2.5.1.jar excalibur-store-20030726.jar
  Removed: lib/core excalibur-store-20030317.jar jisp-2.0.1.jar
  Log:
  Updating to latest jisp and excalibur store
  
  Revision  ChangesPath
  1.71  +2 -2  cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- gump.xml  14 Jul 2003 02:52:25 -  1.70
  +++ gump.xml  26 Jul 2003 13:26:47 -  1.71
  @@ -984,7 +984,7 @@
 Java Indexed Serialization Package
   /description
   home nested=lib/core/
  -jar name=jisp-2.0.1.jar/
  +jar name=jisp-2.5.1.jar/
 /project
   
 project name=jing
  
  
  
  1.3   +2 -2  
cocoon-2.1/src/java/org/apache/cocoon/components/store/impl/DefaultStore.java
  
  Index: DefaultStore.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/store/impl/DefaultStore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultStore.java 14 Jul 2003 19:09:00 -  1.2
  +++ DefaultStore.java 26 Jul 2003 13:26:47 -  1.3
  @@ -78,7 +78,7 @@
* @author a href=mailto:[EMAIL PROTECTED]Vadim Gritsenko/a
* @version CVS $Id$
*/
  -public final class DefaultStore extends AbstractJispFilesystemStore
  +public class DefaultStore extends AbstractJispFilesystemStore
   implements org.apache.excalibur.store.Store,
  Contextualizable,
  ThreadSafe,
  
  
  
  1.3   +7 -423
cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/JispFilesystemStore.java
  
  Index: JispFilesystemStore.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/deprecated/java/org/apache/cocoon/components/store/JispFilesystemStore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JispFilesystemStore.java  27 Apr 2003 15:16:15 -  1.2
  +++ JispFilesystemStore.java  26 Jul 2003 13:26:47 -  1.3
  @@ -50,435 +50,19 @@
   */
   package org.apache.cocoon.components.store;
   
  -import com.coyotegulch.jisp.BTreeIndex;
  -import com.coyotegulch.jisp.BTreeObjectIterator;
  -import com.coyotegulch.jisp.IndexedObjectDatabase;
  -import com.coyotegulch.jisp.KeyNotFound;
  -import com.coyotegulch.jisp.KeyObject;
  -
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.parameters.ParameterException;
  -import org.apache.avalon.framework.parameters.Parameterizable;
  -import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.avalon.framework.thread.ThreadSafe;
  -import org.apache.cocoon.Constants;
  -import org.apache.cocoon.util.IOUtils;
  -
  -import java.io.File;
  -import java.io.IOException;
  -import java.io.Serializable;
  -import java.util.Enumeration;
  +import org.apache.cocoon.components.store.impl.DefaultStore;
   
   /**
* This store is based on the Jisp library
* (http://www.coyotegulch.com/jisp/index.html). This store uses B-Tree indexes
* to access variable-length serialized data stored in files.
  - *
  + * 
  + * @deprecated Use the [EMAIL PROTECTED] 
org.apache.cocoon.components.store.impl.DefaultStore} instead.
  + * 
* @author a href=mailto:[EMAIL PROTECTED]Gerhard Froehlich/a
* @author a href=mailto:[EMAIL PROTECTED]Vadim Gritsenko/a
* @version CVS $Id$
*/
  -public final class JispFilesystemStore extends AbstractLogEnabled
  -implements org.apache.excalibur.store.Store,
  -   Contextualizable,
  -   ThreadSafe,
  -   Initializable,
  -   Parameterizable {
  -
  -protected File m_workDir;
  -protected File m_cacheDir;
  -
  -/**
  - *  The directory repository
  - */
  -protected File m_directoryFile;
  -protected volatile String m_directoryPath;
  -
  -/**
  - *  The database
  - */
  -private File m_databaseFile;
  -private File m_indexFile;
  -
  -private int m_Order;
  -private IndexedObjectDatabase m_Database;
  -private BTreeIndex m_Index;
  -
  -/**
  - *  Sets the repository's location

cvs commit: cocoon-2.1/src/test/org/apache/cocoon/components/source SourceResolverAdapter.java

2003-07-26 Thread cziegeler
cziegeler2003/07/26 07:48:39

  Modified:src/test/org/apache/cocoon/components/source
SourceResolverAdapter.java
  Log:
  Organizing imports
  
  Revision  ChangesPath
  1.8   +1 -6  
cocoon-2.1/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java
  
  Index: SourceResolverAdapter.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SourceResolverAdapter.java24 Jul 2003 07:18:25 -  1.7
  +++ SourceResolverAdapter.java26 Jul 2003 14:48:39 -  1.8
  @@ -55,15 +55,10 @@
   import java.net.MalformedURLException;
   import java.util.Map;
   
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.Source;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.excalibur.xml.sax.SAXParser;
  -import org.xml.sax.ContentHandler;
  -import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   
   /**
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/store/impl DefaultStore.java

2003-07-26 Thread cziegeler
cziegeler2003/07/26 08:17:25

  Modified:src/java/org/apache/cocoon/components/store/impl
DefaultStore.java
  Log:
  Updating to latest jisp and excalibur store
  
  Revision  ChangesPath
  1.4   +2 -11 
cocoon-2.1/src/java/org/apache/cocoon/components/store/impl/DefaultStore.java
  
  Index: DefaultStore.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/store/impl/DefaultStore.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultStore.java 26 Jul 2003 13:26:47 -  1.3
  +++ DefaultStore.java 26 Jul 2003 15:17:25 -  1.4
  @@ -67,7 +67,6 @@
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.util.IOUtils;
   import org.apache.excalibur.store.impl.AbstractJispFilesystemStore;
  -import org.apache.excalibur.store.impl.JispStringKey;
   
   /**
* This store is based on the Jisp library
  @@ -171,21 +170,13 @@
   getLogger().debug(Datafile exists:  + databaseExists);
   }
   super.m_Database = new IndexedObjectDatabase(databaseFile.toString(), 
!databaseExists);
  -// TODO: change to getNullKey when updating to latest store
   super.m_Index = new BTreeIndex(indexFile.toString(),
  -order, new JispStringKey(), false);
  +order, this.getNullKey(), false);
   super.m_Database.attachIndex(super.m_Index);
   } catch (KeyNotFound ignore) {
   } catch (Exception e) {
   getLogger().error(Exception during initialization of jisp store., e);
   }
  -}
  -
  -/* (non-Javadoc)
  - * @see org.apache.avalon.framework.activity.Initializable#initialize()
  - */
  -public void initialize() throws Exception {
  -// TODO  Remove this when we update to latest store
   }
   
   }
  
  
  


cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/acting SessionAction.java

2003-07-18 Thread cziegeler
cziegeler2003/07/18 01:37:15

  Modified:src/blocks/session-fw/java/org/apache/cocoon/webapps/session/acting
SessionAction.java
  Log:
  Cleaning up code, adding javadocs
  
  Revision  ChangesPath
  1.3   +21 -5 
cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/acting/SessionAction.java
  
  Index: SessionAction.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/acting/SessionAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SessionAction.java4 May 2003 20:19:42 -   1.2
  +++ SessionAction.java18 Jul 2003 08:37:15 -  1.3
  @@ -64,6 +64,15 @@
   
   /**
* This action creates and terminates a session.
  + * The action is controlled via parameters. The action parameter defines
  + * the action (creating or terminating).
  + * The value create creates a new session (if not already available)
  + * The value terminate terminates the session. The termination can be controlled
  + * with a second parameter mode: The default value immediately terminates
  + * the session, the value if-unused terminates the session only if no
  + * session context is available anymore. This means the user must not have
  + * any own session context and must not be authenticated anymore using
  + * the uthentication framework.
*
* @author a href=mailto:[EMAIL PROTECTED]Carsten Ziegeler/a
* @version CVS $Id$
  @@ -82,17 +91,24 @@
   try {
   sessionManager = 
(SessionManager)this.manager.lookup(SessionManager.ROLE);
   final String action = par.getParameter(action, create);
  -if ( action.equals(create) == true ) {
  +  
  +if ( action.equals(create) ) {
  +
  +// create a session
   sessionManager.createSession();
  -} else if ( action.equals(terminate) == true ) {
  +
  +} else if ( action.equals(terminate) ) {
  +
  +// terminate a session
   final String mode = par.getParameter(mode, immediately);
  -if ( mode.equals(immediately) == true) {
  +if ( mode.equals(immediately) ) {
   sessionManager.terminateSession(true);
  -} else if ( mode.equals(if-unused) == true ) {
  +} else if ( mode.equals(if-unused)  ) {
   sessionManager.terminateSession(false);
   } else {
   throw new ProcessingException(Unknown mode  + mode +  for 
action  + action);
   }
  +
   } else {
   throw new ProcessingException(Unknown action:  + action);
   }
  
  
  


cvs commit: cocoon-2.1/tools/src blocks-build.xsl

2003-07-18 Thread cziegeler
cziegeler2003/07/18 01:59:19

  Modified:tools/src blocks-build.xsl
  Log:
  Allowing samples to have their own xconf patch: samplesxconf
  
  Revision  ChangesPath
  1.30  +7 -0  cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- blocks-build.xsl  9 Jul 2003 15:36:27 -   1.29
  +++ blocks-build.xsl  18 Jul 2003 08:59:19 -  1.30
  @@ -193,6 +193,13 @@
  include name={$block-name}/conf/**/*.samplesxpipe 
unless=unless.exclude.block.{$block-name}/
   /xsl:for-each
/xpatch
  + xpatch file={string('${build.webapp}')}/WEB-INF/cocoon.xconf
  + srcdir={string('${blocks}')}
  +xsl:for-each select=project[contains(@name,'cocoon-block-')]
  +   xsl:variable name=block-name 
select=substring-after(@name,'cocoon-block-')/
  +   include name={$block-name}/conf/**/*.samplesxconf 
unless=unless.exclude.block.{$block-name}/
  +/xsl:for-each
  + /xpatch
 /target
   
  /xsl:template
  
  
  


cvs commit: cocoon-2.1 cocoon.bat

2003-07-18 Thread cziegeler
cziegeler2003/07/18 03:32:30

  Modified:.cocoon.bat
  Log:
  Fixing comment
  
  Revision  ChangesPath
  1.9   +2 -2  cocoon-2.1/cocoon.bat
  
  Index: cocoon.bat
  ===
  RCS file: /home/cvs/cocoon-2.1/cocoon.bat,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- cocoon.bat27 Jun 2003 23:18:31 -  1.8
  +++ cocoon.bat18 Jul 2003 10:32:29 -  1.9
  @@ -16,7 +16,7 @@
   :: JAVA_HOME
   ::   Home of Java installation.
   ::
  -:: JAVA_OPTIONS
  +:: JAVA_OPT
   ::   Extra options to pass to the JVM
   ::
   :: JAVA_DEBUG_PORT
  
  
  


cvs commit: cocoon-2.1/src/targets samples-build.xml init-build.xml

2003-07-18 Thread cziegeler
cziegeler2003/07/18 03:52:51

  Modified:src/targets samples-build.xml init-build.xml
  Log:
  Don't include scratchpad samples, if exclude.webapp.samples is set
  
  Revision  ChangesPath
  1.8   +1 -1  cocoon-2.1/src/targets/samples-build.xml
  
  Index: samples-build.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/targets/samples-build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- samples-build.xml 14 May 2003 15:21:44 -  1.7
  +++ samples-build.xml 18 Jul 2003 10:52:50 -  1.8
  @@ -46,7 +46,7 @@
   includes=**/*.xwelcome/
 /target
   
  -  target name=scratchpad-samples depends=prepare 
unless=unless.exclude.scratchpad
  +  target name=scratchpad-samples depends=prepare 
unless=unless.exclude.scratchpad.samples

   !-- copy sample files --
   copy todir=${build.webapp.samples} filtering=on
  
  
  
  1.17  +6 -1  cocoon-2.1/src/targets/init-build.xml
  
  Index: init-build.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/targets/init-build.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- init-build.xml16 Jul 2003 00:19:11 -  1.16
  +++ init-build.xml18 Jul 2003 10:52:50 -  1.17
  @@ -66,6 +66,12 @@
   condition property=unless.exclude.scratchpad
 istrue value=${exclude.scratchpad}/
   /condition
  +condition property=unless.exclude.scratchpad.samples
  +  or
  +istrue value=${unless.exclude.webapp.samples}/
  +istrue value=${unless.exclude.scratchpad}/
  +  /or
  +/condition
   condition property=unless.exclude.deprecated
 istrue value=${exclude.deprecated}/
   /condition
  @@ -75,7 +81,6 @@
   condition property=unless.exclude.idldocs
 istrue value=${exclude.idldocs}/
   /condition
  -
   condition property=exclude.validate.jars
 isfalse value=${validate.jars}/
   /condition
  
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/userdocs/flow api.xml woody.xml jxforms.xml

2003-07-14 Thread cziegeler
cziegeler2003/07/14 02:36:41

  Modified:src/documentation/xdocs/userdocs/flow api.xml woody.xml
jxforms.xml
  Log:
  Making docs validate
  
  Revision  ChangesPath
  1.18  +9 -12 cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml
  
  Index: api.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/api.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- api.xml   13 Jul 2003 19:53:14 -  1.17
  +++ api.xml   14 Jul 2003 09:36:41 -  1.18
  @@ -28,11 +28,11 @@
   pClasses in packages under codejava/code are accessible directly in your 
scripts./p
   pNote that classes under codejava.lang/code are not automatically 
imported, however:/p
   
  -psourcevar n = new java.lang.Integer(3);/source/p
  +sourcevar n = new java.lang.Integer(3);/source
   
   pAll other java packages and classes are accessible under the property 
codePackages/code:/p
   
  -psourcevar tree = new Packages.javax.swing.JTree();/source/p
  +sourcevar tree = new Packages.javax.swing.JTree();/source
   
   pYou can get the effect of Java imports using the 
codeimportPackage()/code and codeimportClass()/code functions:/p
   table
  @@ -63,16 +63,14 @@
   /table
   p
 If your Java classes have getters and setters you can access them as 
properties in JavaScript:/p
  -p
 source
 var d = new java.util.Date();
 d.year = 2003;// same effect as d.setYear(2003);
  -  /source
  - /p
  +  /source 
   /s1
   s1 title=Flow Object Model
 pCocoon provides a set of system objects for use by Flowscripts. We call 
this set of objects the Flow Object Model (emFOM/em).
  -  The Flow Object Model contains following objects:
  +  The Flow Object Model contains following objects:/p
   ul
 lilink href=#cocoonCocoon/link/li
 lilink href=#requestRequest/link/li
  @@ -83,7 +81,6 @@
 lilink href=#logLog/link/li
 lilink href=#WebContinuationWebContinuation/link/li
   /ul
  -/p
   s2 title = Cocoon Objectanchor id=cocoon/
   pThe codeCocoon/code object represents the current Cocoon Sitemap. This 
is the entry point into the FOM. There is one instance of codeCocoon/code which 
you may access in your scripts as the global variable codecocoon/code, for example 
like this:/p
   source
  @@ -95,31 +92,31 @@
   s3 title=request
   pThe current Cocoon request:/p
   p
  -emProperty/em code[link href=#requestRequest/link] request/code
  +emProperty/em [link href=#requestRequest/link] request
   /p
   /s3
   s3 title=response
   pThe current Cocoon response:/p
   p
  -emProperty/em code[link href=#responseResponse/link] response/code
  +emProperty/em [link href=#responseResponse/link] response
   /p
   /s3
   s3 title=session
   pThe current Cocoon session:/p
   p
  -emProperty/em code[link href=#sessionSession/link] session/code
  +emProperty/em [link href=#sessionSession/link] session
   /p
   /s3
   s3 title=context
   pThe current Cocoon application context:/p
   p
  -emProperty/em code[link href=#contextContext/link] context/code
  +emProperty/em [link href=#contextContext/link] context
   /p
   /s3
   s3 title=log
   pA reference to the current logger:/p
   p
  -emProperty/em code[link href=#logLog/link] log/code
  +emProperty/em [link href=#logLog/link] log
   /p
   /s3
   
  
  
  
  1.4   +2 -2  cocoon-2.1/src/documentation/xdocs/userdocs/flow/woody.xml
  
  Index: woody.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/woody.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- woody.xml 14 Jul 2003 09:29:49 -  1.3
  +++ woody.xml 14 Jul 2003 09:36:41 -  1.4
  @@ -63,11 +63,11 @@
   p
   /p
   s2 title =The woody functionanchor id=woody/
  -  pThe entry point to a Woody form is the codewoody()/code function:
  +  pThe entry point to a Woody form is the codewoody()/code function:/p
 p
 emFunction/em codewoody(form_function, form_definition, 
attribut_name)/code
 /p
  -You call the 
  +  p  You call the 
   codewoody/code function from your sitemap to create a new form, for example:/p
   source![CDATA[
   
  
  
  
  1.4   +5 -5  cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxforms.xml
  
  Index: jxforms.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/flow/jxforms.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4

cvs commit: cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl WebDAVSource.java

2003-07-14 Thread cziegeler
cziegeler2003/07/14 09:06:21

  Modified:src/java/org/apache/cocoon/components/pipeline/impl
AbstractCachingProcessingPipeline.java
   src/java/org/apache/cocoon/caching CachedResponse.java
   src/blocks/webdav/java/org/apache/cocoon/components/source/impl
WebDAVSource.java
  Log:
  Cleaning up code
  
  Revision  ChangesPath
  1.8   +3 -3  
cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
  
  Index: AbstractCachingProcessingPipeline.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractCachingProcessingPipeline.java11 Jul 2003 08:59:03 -  1.7
  +++ AbstractCachingProcessingPipeline.java14 Jul 2003 16:06:20 -  1.8
  @@ -518,7 +518,7 @@
   new Date(responseExpires.longValue()));
   }
   this.cachedResponse = response.getResponse();
  -this.cachedLastModified = response.lastModified;
  +this.cachedLastModified = response.getLastModified();
   return;
   } else {
   if (this.getLogger().isDebugEnabled()) {
  @@ -602,7 +602,7 @@
   }
   // we are valid, ok that's it
   this.cachedResponse = response.getResponse();
  -this.cachedLastModified = response.lastModified;
  +this.cachedLastModified = response.getLastModified();
   } else {
   if (this.getLogger().isDebugEnabled()) {
   this.getLogger().debug(validatePipeline: cached content is 
invalid for ' + environment.getURI() + '.);
  
  
  
  1.3   +13 -9 
cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java
  
  Index: CachedResponse.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CachedResponse.java   3 May 2003 18:34:41 -   1.2
  +++ CachedResponse.java   14 Jul 2003 16:06:21 -  1.3
  @@ -68,10 +68,10 @@
   public final class CachedResponse
   implements Serializable {
   
  -private SourceValidity[] validityObjects;
  -private byte[]   response;
  -private Long expires;
  -public  final long   lastModified;
  +private final SourceValidity[] validityObjects;
  +private final byte[]   response;
  +private Longexpires;
  +private final longlastModified;
   
   /**
* Create a new entry for the cache.
  @@ -82,10 +82,7 @@
*/
   public CachedResponse(SourceValidity[] validityObjects,
 byte[]   response) {
  -this.validityObjects = validityObjects;
  -this.response = response;
  -this.expires = null;
  -this.lastModified = this.setLastModified(System.currentTimeMillis());
  +this(validityObjects, response, null);
   }
   
   /**
  @@ -147,4 +144,11 @@
   // Return the value rounded to the nearest second.
   return lastModified - (lastModified % 1000);
   }
  +/**
  + * @return the last modified time 
  + */
  +public long getLastModified() {
  +return lastModified;
  +}
  +
   }
  
  
  
  1.2   +1 -2  
cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
  
  Index: WebDAVSource.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebDAVSource.java 11 Jul 2003 10:32:35 -  1.1
  +++ WebDAVSource.java 14 Jul 2003 16:06:21 -  1.2
  @@ -68,7 +68,6 @@
   import org.apache.cocoon.components.source.RestrictableSource;
   import org.apache.cocoon.components.source.helpers.SourceCredential;
   import org.apache.cocoon.components.source.helpers.SourcePermission;
  -import org.apache.cocoon.components.source.helpers.SourcePermission;
   import org.apache.commons.httpclient.HttpException;
   import org.apache.excalibur.source.ModifiableSource;
   import org.apache.excalibur.source.Source;
  
  
  


cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation RSSTransformer.java

2003-07-12 Thread cziegeler
cziegeler2003/07/12 06:49:56

  Modified:lib  jars.xml
   src/blocks/portal/java/org/apache/cocoon/portal/transformation
RSSTransformer.java
  Added:   src/blocks/html/lib jtidy-04aug2000r7-dev.jar
  Removed: src/blocks/html/lib .cvsignore
   lib/optional jtidy-04aug2000r7-dev.jar
  Log:
  Removing direct dependency from portal block to jtidy
  
  Revision  ChangesPath
  1.3   +0 -0  cocoon-2.1/src/blocks/html/lib/jtidy-04aug2000r7-dev.jar
  
Binary file
  
  
  1.65  +2 -2  cocoon-2.1/lib/jars.xml
  
  Index: jars.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/lib/jars.xml,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- jars.xml  11 Jul 2003 20:25:30 -  1.64
  +++ jars.xml  12 Jul 2003 13:49:56 -  1.65
  @@ -496,7 +496,7 @@
 titleTransform HTML to XML/title
 descriptionTidy is a HTML syntax checker and pretty printer./description
 used-byHTML generator (html block), RSSTransformer (Portal block)/used-by
  -  liboptional/jtidy-04aug2000r7-dev.jar/lib
  +  libhtml/lib/jtidy-04aug2000r7-dev.jar/lib
 homepagehttp://lempinen.net/sami/jtidy//homepage
/file
   
  
  
  
  1.2   +108 -34   
cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java
  
  Index: RSSTransformer.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/RSSTransformer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RSSTransformer.java   11 Jul 2003 14:17:02 -  1.1
  +++ RSSTransformer.java   12 Jul 2003 13:49:56 -  1.2
  @@ -50,8 +50,22 @@
   */
   package org.apache.cocoon.portal.transformation;
   
  +import java.io.ByteArrayInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.util.Map;
  +
  +import org.apache.avalon.framework.component.Component;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.components.sax.XMLDeserializer;
  +import org.apache.cocoon.components.sax.XMLSerializer;
  +import org.apache.cocoon.environment.SourceResolver;
   import org.apache.cocoon.transformation.AbstractSAXTransformer;
  -import org.w3c.tidy.Tidy;
  +import org.apache.cocoon.xml.IncludeXMLConsumer;
  +import org.apache.cocoon.xml.XMLConsumer;
  +import org.apache.excalibur.xmlizer.XMLizer;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   
  @@ -66,6 +80,18 @@
   public final class RSSTransformer
   extends AbstractSAXTransformer {
   
  +/** The xmlizer for converting html to xml */
  +protected XMLizer xmlizer;
  +
  +/** The xml serializer */
  +protected XMLSerializer serializer;
  +
  +/** The xml deserializer */
  +protected XMLDeserializer deserializer;
  +
  +/** The filter */
  +protected XMLConsumer filter;
  +
   /**
*  receive notification of start element event.
**/
  @@ -85,47 +111,95 @@
   if (description.equals(name)) {
   final String text = this.endTextRecording();
   final String html = htmlbody+text+/body/html;
  -
  +
  +boolean parsed = false;
   try {
  -final Tidy xhtmlconvert = new Tidy();
  -xhtmlconvert.setXmlOut(true);
  -xhtmlconvert.setXHTML(true);
  -xhtmlconvert.setShowWarnings(false);
  -org.w3c.dom.Document doc = xhtmlconvert.parseDOM(new 
java.io.ByteArrayInputStream(html.getBytes()), null);
  -org.w3c.dom.NodeList node = 
org.apache.cocoon.xml.dom.DOMUtil.selectNodeList(doc, /html/body/*);
  -if (null != node) {
  -for(int i = 0; i  node.getLength(); i++) {
  -this.sendEvents(node.item(i));
  -}
  -} else {
  -this.sendTextEvent(text);
  -}
  -} catch (Exception e) {
  +InputStream inputStream = new ByteArrayInputStream(html.getBytes());
  +this.xmlizer.toSAX(inputStream,
  +text/html,
  +null,
  +this.serializer);
  +// if no exception occurs, everything is fine!
  +parsed = true;
  +} catch (Exception ignore) {
  +}
  +if ( parsed ) {
  +this.deserializer.setConsumer( this.filter );
  +this.deserializer.deserialize

cvs commit: cocoon-2.1 .cvsignore

2003-07-11 Thread cziegeler
cziegeler2003/07/11 03:31:40

  Modified:..cvsignore
  Log:
  Excluding launch conf from cvs
  
  Revision  ChangesPath
  1.3   +1 -0  cocoon-2.1/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/cocoon-2.1/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore27 Jun 2003 20:41:48 -  1.2
  +++ .cvsignore11 Jul 2003 10:31:39 -  1.3
  @@ -3,6 +3,7 @@
   prj.el
   .project
   .classpath
  +cocoon.launch
   local.build.properties
   local.blocks.properties
   cocoon.sampledata
  
  
  


cvs commit: cocoon-2.1/src/blocks/taglib/java/org/apache/cocoon/jxpath JXPathCocoonContexts.java

2003-07-11 Thread cziegeler
cziegeler2003/07/11 07:17:44

  Modified:src/java/org/apache/cocoon/components
RequestLifecycleComponent.java
CocoonComponentManager.java
   src/blocks/taglib/java/org/apache/cocoon/jxpath
JXPathCocoonContexts.java
  Added:   src/java/org/apache/cocoon/components
GlobalRequestLifecycleComponent.java
  Log:
  Adding global request lifecycle component
  
  Revision  ChangesPath
  1.2   +16 -12
cocoon-2.1/src/java/org/apache/cocoon/components/RequestLifecycleComponent.java
  
  Index: RequestLifecycleComponent.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/RequestLifecycleComponent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RequestLifecycleComponent.java9 Mar 2003 00:08:46 -   1.1
  +++ RequestLifecycleComponent.java11 Jul 2003 14:17:44 -  1.2
  @@ -50,26 +50,30 @@
   */
   package org.apache.cocoon.components;
   
  +import java.io.IOException;
  +import java.util.Map;
  +
   import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.environment.SourceResolver;
   import org.xml.sax.SAXException;
   
  -import java.io.IOException;
  -import java.util.Map;
  -
   /**
  - * Objects implementing this marker interface have a lifecycle of one
  - * request. This means if one request is looking up several times
  - * an object implementing this interface, it's always the same object.
  - * In addition, the first time this object is looked up during a request,
  - * the setup() method is called
  - *
  + * Components implementing this marker interface have a lifecycle of one
  + * request. This means if during one request a component accepting this
  + * interface is looked up several times, it's always the same instance.
  + * Each internal subrequest, e.g. using the cocoon protocol, is considered
  + * as a new request. So an instance looked up in the main request is
  + * not available to a subrequest.
  + * In addition, the first time this component is looked up during a request,
  + * the [EMAIL PROTECTED] setup(SourceResolver, Map)} method is called.
  + * 
  + * @see org.apache.cocoon.components.GlobalRequestLifecycleComponent
  + * 
* @author a href=mailto:[EMAIL PROTECTED]Carsten Ziegeler/a
* @version CVS $Id$
*/
  -public interface RequestLifecycleComponent extends Component, Poolable {
  +public interface RequestLifecycleComponent extends Poolable {
   
   /**
* Set the [EMAIL PROTECTED] SourceResolver} and the objectModel 
  
  
  
  1.15  +108 -15   
cocoon-2.1/src/java/org/apache/cocoon/components/CocoonComponentManager.java
  
  Index: CocoonComponentManager.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CocoonComponentManager.java   10 Jul 2003 13:17:04 -  1.14
  +++ CocoonComponentManager.java   11 Jul 2003 14:17:44 -  1.15
  @@ -93,8 +93,7 @@
   {

   /** The key used to store the current process environment */
  -private static final String PROCESS_KEY =
  -   org.apache.cocoon.components.CocoonComponentManager;
  +private static final String PROCESS_KEY = 
CocoonComponentManager.class.getName();

   
   /** The environment information */
  @@ -164,7 +163,21 @@
*/
   public static void leaveEnvironment() {
   final EnvironmentStack stack = (EnvironmentStack)environmentStack.get();
  -stack.pop();
  +final Object[] objs = (Object[])stack.pop();
  +if ( stack.isEmpty() ) {
  +final Environment env = (Environment)objs[0];
  +final Map globalComponents = 
(Map)env.getAttribute(GlobalRequestLifecycleComponent.class.getName());
  +if ( globalComponents != null) {
  +
  +final Iterator iter = globalComponents.values().iterator();
  +while ( iter.hasNext() ) {
  +final Object[] o = (Object[])iter.next();
  +final Component c = (Component)o[0];
  +((CocoonComponentManager)o[1]).releaseRLComponent( c );
  +}
  +}
  +env.removeAttribute(GlobalRequestLifecycleComponent.class.getName());
  +}
   }
   
   /**
  @@ -288,7 +301,11 @@
   final Map objectModel = ((Environment)objects[0]).getObjectModel();
   EnvironmentDescription desc = 
(EnvironmentDescription)objectModel.get(PROCESS_KEY);
   if ( null != desc

cvs commit: cocoon-2.1 status.xml

2003-07-11 Thread cziegeler
cziegeler2003/07/11 07:20:35

  Modified:.status.xml
  Log:
  Adding global request lifecycle component
  
  Revision  ChangesPath
  1.86  +4 -1  cocoon-2.1/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- status.xml11 Jul 2003 08:59:03 -  1.85
  +++ status.xml11 Jul 2003 14:20:35 -  1.86
  @@ -184,6 +184,9 @@
 changes
   
release version=@version@ date=@date@
  +  action dev=CZ type=add
  +   Adding global request lifecycle component.
  +  /action
 action dev=CZ type=update
  The cache used by the caching processing pipeline is now configurable
  allowing to use different caches in different pipelines.
  
  
  


cvs commit: cocoon-2.1/src/documentation/xdocs/installing updating.xml

2003-07-11 Thread cziegeler
cziegeler2003/07/11 08:10:21

  Modified:src/documentation/xdocs/installing updating.xml
  Log:
  Updating the update doc
  
  Revision  ChangesPath
  1.15  +11 -0 cocoon-2.1/src/documentation/xdocs/installing/updating.xml
  
  Index: updating.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/installing/updating.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- updating.xml  2 Jul 2003 07:21:03 -   1.14
  +++ updating.xml  11 Jul 2003 15:10:20 -  1.15
  @@ -120,6 +120,9 @@
  Due to some interface changes in the Cocoon logging components, custom java
  components (generators,transformers or actions for example) compiled for 
Cocoon 2.0.x will not run
  under Cocoon 2.1 unless recompiled./p
  +   pIt's also advisable to change your implementations from using 
emLogEnabled/em
  + instead of emLoggable/em when it comes to logging in your components.
  +   /p
 /s1
 s1 title=Components
  p
  @@ -237,6 +240,14 @@
   emorg.apache.cocoon.servlet.multipart.Part/em, and the 
emgetFilePath()/em has been renamed
   emPart.getUploadName()./em
/p
  +   /s2
  +   s2 title=RequestLifeCycleComponent
  +pIf you are using the marker interface emRequestLifeCycleComponent/em for 
your
  +own components, you have to make sure that your implementations still implement
  +the emComponent/em interface. The emRequestLifeCycleComponent/em does no
  +longer extend the emComponent/em interface, so you have to declare it in 
your
  +own components together with emRequestLifeCycleComponent/em. Otherwise you
  +will get a emClassCastException/em as soon as you access your component./p
  /s2
 /s1
 s1 title=Components from the scratchpad
  
  
  


cvs commit: cocoon-2.1 gump.xml

2003-07-10 Thread cziegeler
cziegeler2003/07/10 06:20:26

  Modified:.gump.xml
  Log:
  Adding dependency
  
  Revision  ChangesPath
  1.65  +2 -1  cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- gump.xml  2 Jul 2003 09:31:08 -   1.64
  +++ gump.xml  10 Jul 2003 13:20:26 -  1.65
  @@ -792,6 +792,7 @@
   depend project=cocoon-block-session-fw/
   depend project=cocoon-block-authentication-fw/
   depend project=castor/
  +depend project=commons-collections/
   
   work nested=tools/anttasks/
   home nested=build/cocoon-@@DATE@@/
  
  
  


cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/treeprocessor/sitemap PipelineNode.java

2003-07-09 Thread cziegeler
cziegeler2003/07/09 00:42:23

  Modified:src/java/org/apache/cocoon/servlet
ParanoidCocoonServlet.java CocoonServlet.java
   .status.xml
   src/scratchpad/src/org/apache/cocoon/generation
GarbageGenerator.java
   src/java/org/apache/cocoon/components/treeprocessor/sitemap
PipelineNode.java
  Log:
  cocoon.xconf can be loaded from any location
  ParanoidServlet can be configured optionally with a conf file
  
  Revision  ChangesPath
  1.5   +50 -2 
cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
  
  Index: ParanoidCocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ParanoidCocoonServlet.java2 Jul 2003 18:33:38 -   1.4
  +++ ParanoidCocoonServlet.java9 Jul 2003 07:42:22 -   1.5
  @@ -51,8 +51,10 @@
   package org.apache.cocoon.servlet;
   
   import java.io.File;
  +import java.io.FileReader;
   import java.io.FilenameFilter;
   import java.io.IOException;
  +import java.io.LineNumberReader;
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.ArrayList;
  @@ -96,7 +98,15 @@
super.init(config);
   
// Create the classloader in which we will load the servlet
  - this.classloader = getClassLoader(this.getContextDir());
  +// this can either be specified by an external file configured
  +// as a parameter in web.xml or (the default) all jars and 
  +// classes from WEB-INF/lib and WEB-INF/classes are used.
  +final String externalClasspath = 
config.getInitParameter(paranoid-classpath);
  +if ( externalClasspath == null ) {
  +this.classloader = this.getClassLoader(this.getContextDir());
  +} else {
  +this.classloader = this.getClassLoader(externalClasspath);
  +}
   
   String servletName = config.getInitParameter(servlet-class);
   if (servletName == null) {
  @@ -190,6 +200,44 @@
return ParanoidClassLoader.newInstance(urls, 
this.getClass().getClassLoader());
}
   
  +/**
  + * Get the classloader that will be used to create the actual servlet. Its 
classpath is defined
  + * by an external file.
  + */
  +protected ClassLoader getClassLoader(String externalClasspath) 
  +throws ServletException {
  +final List urlList = new ArrayList();
  +
  +log(Adding classpath from  + externalClasspath);
  +try {
  +FileReader fileReader = new FileReader(externalClasspath);
  +LineNumberReader lineReader = new LineNumberReader(fileReader);
  +
  +String line;
  +do {
  +line = lineReader.readLine();
  +if ( line != null ) {
  +final URL lib;
  +if ( line.indexOf(':') == -1) {
  +File entry = new File(line);
  +lib = entry.toURL();
  +} else {
  +lib = new URL(line);
  +}
  +log(Adding class library  + lib);
  +urlList.add(lib);
  +}
  +} while ( line != null );
  +lineReader.close();
  +} catch (IOException io) {
  +throw new ServletException(io);
  +}
  +  
  +URL[] urls = (URL[])urlList.toArray(new URL[urlList.size()]);
  +
  +return ParanoidClassLoader.newInstance(urls, 
this.getClass().getClassLoader());
  +}
  +
/**
 * Service the request by delegating the call to the real servlet
 */
  
  
  
  1.9   +7 -2  cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CocoonServlet.java3 Jun 2003 13:25:42 -   1.8
  +++ CocoonServlet.java9 Jul 2003 07:42:22 -   1.9
  @@ -865,7 +865,12 @@
   
   URL result;
   try {
  -result = this.servletContext.getResource(usedFileName);
  +// test if this is a qualified url
  +if ( usedFileName.indexOf(':') == -1) {
  +result = this.servletContext.getResource(usedFileName);
  +} else {
  +result = new URL(usedFileName);
  +}
   } catch (Exception mue) {
   String msg = Init

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/sax XMLByteStreamCompiler.java

2003-07-09 Thread cziegeler
cziegeler2003/07/09 10:53:03

  Modified:src/java/org/apache/cocoon/components/sax
XMLByteStreamCompiler.java
  Log:
  Return null if no events have arrived
  
  Revision  ChangesPath
  1.2   +4 -1  
cocoon-2.1/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java
  
  Index: XMLByteStreamCompiler.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLByteStreamCompiler.java9 Mar 2003 00:09:11 -   1.1
  +++ XMLByteStreamCompiler.java9 Jul 2003 17:53:03 -   1.2
  @@ -121,6 +121,9 @@
   
   
   public Object getSAXFragment() {
  +if ( this.bufCount == 6) { // no event arrived yet
  +return null;
  +}
   byte newbuf[] = new byte[this.bufCount];
   System.arraycopy(this.buf, 0, newbuf, 0, this.bufCount);
   return newbuf;
  
  
  


cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/acting HandleFormSubmitAction.java MakeFormAction.java

2003-07-08 Thread cziegeler
cziegeler2003/07/08 07:04:41

  Modified:src/blocks/woody/java/org/apache/cocoon/woody/acting
HandleFormSubmitAction.java MakeFormAction.java
  Log:
  Properly releasing sources
  
  Revision  ChangesPath
  1.5   +28 -22
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/acting/HandleFormSubmitAction.java
  
  Index: HandleFormSubmitAction.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/acting/HandleFormSubmitAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HandleFormSubmitAction.java   30 Jun 2003 13:25:28 -  1.4
  +++ HandleFormSubmitAction.java   8 Jul 2003 14:04:41 -   1.5
  @@ -61,6 +61,7 @@
   import org.apache.cocoon.woody.FormContext;
   import org.apache.cocoon.woody.FormHandler;
   import org.apache.cocoon.woody.formmodel.Form;
  +import org.apache.excalibur.source.Source;
   
   import java.util.Map;
   import java.util.Collections;
  @@ -80,33 +81,38 @@
*/
   public class HandleFormSubmitAction extends AbstractWoodyAction implements Action, 
ThreadSafe, Composable {
   
  -public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, 
String source, Parameters parameters)
  +public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, 
String src, Parameters parameters)
   throws Exception {
   String formSource = parameters.getParameter(form-definition);
   String formAttribute = parameters.getParameter(attribute-name);
   String formHandlerClassName = parameters.getParameter(formhandler, null);
   
  -Form form = formManager.createForm(resolver.resolveURI(formSource));
  -
  -Request request = ObjectModelHelper.getRequest(objectModel);
  -FormHandler formHandler = null;
  -
  -if (formHandlerClassName != null) {
  -// TODO cache these classes
  -Class clazz = Class.forName(formHandlerClassName);
  -formHandler = (FormHandler)clazz.newInstance();
  -formHandler.setup(form);
  -form.setFormHandler(formHandler);
  +Source source = resolver.resolveURI(formSource);
  +try {
  +Form form = formManager.createForm(source);
  +
  +Request request = ObjectModelHelper.getRequest(objectModel);
  +FormHandler formHandler = null;
  +
  +if (formHandlerClassName != null) {
  +// TODO cache these classes
  +Class clazz = Class.forName(formHandlerClassName);
  +formHandler = (FormHandler)clazz.newInstance();
  +formHandler.setup(form);
  +form.setFormHandler(formHandler);
  +}
  +
  +FormContext formContext = new FormContext(request, Locale.US);
  +
  +boolean finished = form.process(formContext);
  +request.setAttribute(formAttribute, form);
  +
  +if (finished)
  +return Collections.EMPTY_MAP;
  +else
  +return null;
  +} finally {
  +resolver.release(source);
   }
  -
  -FormContext formContext = new FormContext(request, Locale.US);
  -
  -boolean finished = form.process(formContext);
  -request.setAttribute(formAttribute, form);
  -
  -if (finished)
  -return Collections.EMPTY_MAP;
  -else
  -return null;
   }
   }
  
  
  
  1.4   +12 -5 
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/acting/MakeFormAction.java
  
  Index: MakeFormAction.java
  ===
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/acting/MakeFormAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MakeFormAction.java   15 May 2003 10:31:01 -  1.3
  +++ MakeFormAction.java   8 Jul 2003 14:04:41 -   1.4
  @@ -57,6 +57,7 @@
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.woody.FormManager;
   import org.apache.cocoon.woody.formmodel.Form;
  +import org.apache.excalibur.source.Source;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.component.Composable;
  @@ -82,15 +83,21 @@
   formManager = (FormManager)componentManager.lookup(FormManager.ROLE);
   }
   
  -public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, 
String source, Parameters parameters)
  +public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, 
String src, Parameters parameters)
   throws Exception {
   String formSource

  1   2   >