home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / updating.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  16.2 KB  |  354 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.  <header>
  21.   <title>Updating Cocoon</title>
  22.   <authors>
  23.    <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
  24.    <person name="Jörg Heinicke" email="joerg@apache.org"/>
  25.    <person name="Bertrand Delacrétaz" email="bdelacretaz@apache.org"/>
  26.   </authors>
  27.  </header>
  28.  
  29.  <body>
  30.   <s1 title="Known Issues for 2.1.5">
  31.    <p>
  32.      This is a list of known issues for Cocoon 2.1.5.
  33.    </p>
  34.    <s2 title="Store">
  35.      <p>
  36.       Cocoon 2.1.5 uses different implementation of the store based on the
  37.       <link href="http://jakarta.apache.org/turbine/jcs">JCS</link>.
  38.       This new implementation currently does not allow storing of not serializable objects,
  39.       and it does not write out memory cache to the disk on shutdown. If you depend on
  40.       this functionality, you can keep 2.1.4 store configuration.
  41.      </p>
  42.      <p>
  43.       Cocoon 2.1.4 used MRUMemoryStore as store implementation and JISPStore as persistent
  44.       store implementation. JISPStore is known to corrupt storage file under some
  45.       conditions.
  46.      </p>
  47.    </s2>
  48.    <s2 title="Logging Configuration">
  49.      <p>
  50.       Cocoon 2.1.5 uses a newer version of the Avalon Excalibur logging package
  51.       than version 2.1.4. Unfortunately this logging package has an imcompatibility
  52.       to the version used in Cocoon 2.1.4.
  53.      </p>
  54.      <p>
  55.       If you update your application from 2.1.4 to 2.1.5 make sure that you have
  56.       a log definition for the empty category in your logkit.xconf. Add the following
  57.       lines to your category definition:
  58.      </p>
  59.      <source><![CDATA[
  60.     <category name="" log-level="INFO">
  61.       <log-target id-ref="core"/>
  62.       <log-target id-ref="error"/>
  63.     </category>
  64.      ]]></source>
  65.    </s2>
  66.   </s1>
  67.   <s1 title="Updating Cocoon">
  68.    <p>
  69.     Please take your time to read this document completely before trying to upgrade from
  70.     a Cocoon 2.0.x installation to 2.1 (or above). You can also read it if you want to
  71.     know what was going on in the development of Cocoon.
  72.    </p>
  73.    <p>
  74.     The Cocoon team took great care in making this new version as compatible as
  75.     possible. However, in order to achieve even more flexibility, usability and
  76.     performance, the internal architecure of Cocoon has been improved. Due to these
  77.     improvements it has not been possible to be compatible in every little detail.
  78.     If you follow the instructions of document closely, however,
  79.     you should be able to quickly upgrade your Cocoon 2.0.x installation.
  80.    </p>
  81.    <p>
  82.     The Cocoon team has developed many Avalon components that are not specific to Cocoon
  83.     and therefore have been donated to the Avalon Excalibur project and moved out
  84.     of Cocoon. This has led to some configuration changes which are also described
  85.     in this document.
  86.    </p>
  87.   </s1>
  88.   <s1 title="Sitemap">
  89.    <note>There are some changes in the sitemap and in the configuration of some
  90.     components in the sitemap. In general we recommend you to start with a new
  91.     sitemap from 2.1 and to adapt it to your needs. But for manual migration we
  92.     will list as many changes as possible.</note>
  93.    <s2 title="Pipelines configuration in the sitemap">
  94.      <p>
  95.       The configuration of the pipelines has moved from cocoon.xconf to the sitemap.
  96.       To update your installation, you have to remove the "event-pipeline" and "stream-pipeline"
  97.       section from your cocoon.xconf (see also the cocoon.xconf section) and add the
  98.       <code>map:pipes</code> section to the <code>map:components</code> section
  99.       of your sitemap. You can find the pipelines components definition in the sample
  100.       main sitemap of Cocoon. Here is an example:
  101.      </p>
  102.      <source><![CDATA[
  103. <map:sitemap>
  104.  <map:components>
  105.       ...
  106.   <map:pipes default="caching">
  107.    <map:pipe name="caching"
  108.     src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
  109.    <map:pipe name="noncaching"
  110.     src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
  111.   </map:pipes>
  112.  </map:components>
  113.    ...
  114. </map:sitemap>
  115.      ]]></source>
  116.      <p>You can choose these different pipeline implementations
  117.        in the <code>map:pipeline</code> section by specifying their <code>type</code> attribute:
  118.      </p>
  119.      <source><![CDATA[
  120. <map:sitemap>
  121.   ...
  122.  <map:pipelines>
  123.   <map:pipeline type="noncaching">
  124.    <map:match pattern="welcome">
  125.                   ...
  126.    </map:match>
  127.             ..
  128.   </map:pipeline>
  129.  </map:pipelines>
  130. </map:sitemap>
  131.      ]]></source>
  132.      <p>This is similar to choosing the type of a generator or any other sitemap component.
  133.        If the type attribute is omitted, the default configuration from the
  134.        <code>map:components</code> section is used.
  135.      </p>
  136.    </s2>
  137.    <s2 title="FOP Serializer">
  138.     <p>Relative paths in FOP serializer's <code><user-config></code> are now resolved
  139.       relatively to the directory that contains the sitemap.</p>
  140.     <p>All Cocoon URIs are supported too.</p>
  141.    </s2>
  142.    <s2 title="Sitemap components">
  143.     <p>Some of the sitemap components have been removed from Cocoon sources, others were renamed.
  144.       If you have the old declaration in your sitemap, you will get
  145.       <code>ClassNotFoundException</code>s. Trial and error will probably be the fastest way for
  146.       removing them and getting a clean and working sitemap. Hopefully you are not using one of the
  147.       removed components. The following components are known to be removed or renamed:</p>
  148.     <ul>
  149.      <li>
  150.       <code>o.a.c.XTTransformer</code> - use the TraxTransformer instead.
  151.      </li>
  152.      <li>
  153.       <code>o.a.c.webapps.authentication.selection.MediaSelector</code> - the full qualified class
  154.       name has changed to <code>o.a.c.webapps.session.selection.MediaSelector</code>.
  155.      </li>
  156.     </ul>
  157.    </s2>
  158.    <s2 title="Error handling">
  159.      <p>The <code>map:handle-errors</code> section must now be a complete pipeline. This means the
  160.        old form</p>
  161.      <source><![CDATA[
  162.     <map:handle-errors>
  163.       <map:transform src="stylesheets/system/error2html.xsl"/>
  164.       <map:serialize status-code="404"/>
  165.     </map:handle-errors>
  166.   ]]></source>
  167.      <p>is no longer valid, because the generator is missing. Therefore you can now describe
  168.      explicitely the error handling. The replacement of the above looks like the following:</p>
  169.      <source><![CDATA[
  170.     <map:handle-errors>
  171.       <map:generate type="notifying"/>
  172.       <map:transform src="stylesheets/system/error2html.xsl"/>
  173.       <map:serialize status-code="404"/>
  174.     </map:handle-errors>
  175.   ]]></source>
  176.      <p>For a more detailed example have a look into the default sitemap delivered with Cocoon
  177.        sources or read the
  178.        <link href="../userdocs/concepts/errorhandling.html">documentation on error handling</link>.
  179.      </p>
  180.    </s2>
  181.   </s1>
  182.   <s1 title="Namespace changes">
  183.     <p>
  184.       In order to have consistent namespaces, some transformers and generators
  185.       (listed below) use new namespaces. If you use any of these components, you
  186.       will need to use the new namespaces.
  187.     </p>
  188.     <s2 title="Request Generator">
  189.     <p>RequestGenerator changed its namespace from
  190.       <code>http://xml.apache.org/cocoon/requestgenerator/2.0</code> to
  191.       <code>http://apache.org/cocoon/request/2.0</code>.
  192.     </p>
  193.     </s2>
  194.     <s2 title="I18nTransformer">
  195.       <p>The I18nTransformer supports both
  196.          <code>http://apache.org/cocoon/i18n/2.0</code> and
  197.          <code>http://apache.org/cocoon/i18n/2.1</code> namespace.</p>
  198.     </s2>
  199.   </s1>
  200.   <s1 title="Changes in logging interfaces require recompilation">
  201.     <p>
  202.        Due to some interface changes in the Cocoon logging components, custom java
  203.        components (generators, transformers or actions for example) compiled for Cocoon
  204.        2.0.x will not run under Cocoon 2.1 unless recompiled.</p>
  205.        <p>It's also advisable to change your implementations from using <em>Loggable</em>
  206.          to <em>LogEnabled</em> when it comes to logging in your components.
  207.        </p>
  208.   </s1>
  209.   <s1 title="Components">
  210.    <p>
  211.     The Cocoon architecture has changed significantly. However, great care has been
  212.     taken to preserve backwards compatibility.
  213.    </p>
  214.    <s2 title="Cocoon Configuration (cocoon.xconf)">
  215.     <p>In order to reflect the new version, the version information in the <em>cocoon.xconf</em>
  216.        has changed from <em>2.0</em> to <em>2.1</em>.
  217.     </p>
  218.     <p>To update <em>cocoon.xconf</em>, we recommend that you start with the new cocoon.xconf from V2.1 and
  219.        incorporate your changes in it, instead of trying to migrate your old configuration file.</p>
  220.      <p>The SAXConnectors have been removed, so if you upgrade manually you have to remove
  221.         the <em>sax-connectors</em> configuration from <em>cocoon.xconf</em>.</p>
  222.    </s2>
  223.    <s2 title="Source Resolver">
  224.     <p>The SourceResolver is now an Avalon component
  225.       which can be accessed using <em>cocoon.manager.lookup(SourceResolver.ROLE).</em>.
  226.       The package name of the component is <em>org.apache.excalibur.source</em>.</p>
  227.    </s2>
  228.    <s2 title="XSLT Processor">
  229.     <p>There are some issues related to JDK 1.4.</p>
  230.      <s3 title="XML/XSLT with JDK 1.4">
  231.       <p>Another serious issue is the presence of the Xalan and Xerces
  232.        package in the JDK 1.4. For general information on this please read the
  233.        <link href="http://xml.apache.org/xalan-j/faq.html#jdk14">Xalan FAQ</link> and our own
  234.        <link href="http://wiki.cocoondev.org/Wiki.jsp?page=EndorsedLibsProblem">EndorsedLibsProblem</link>
  235.        wiki page.
  236.       </p>
  237.       <p>
  238.        Basically, you have to update your libraries in the endorsed dirs of the JDK
  239.        or the servlet containers with every new version of Xalan and Xerces delivered with Cocoon.
  240.        Strange errors can occur if you have different versions of these packages in the
  241.        classpath (independent of those in the JDK).
  242.       </p>
  243.      </s3>
  244.    </s2>
  245.    <s2 title="XML Parser">
  246.     <p>The XML parser component has been moved to Excalibur.
  247.      In cocoon.xconf, the hint name has therefore changed from <em>parser</em> to
  248.      <em>xml-parser</em>. The configuration has not changed, so changing the hint
  249.      names is sufficent.</p>
  250.     <p>Java code should not use
  251.       <em>org.apache.cocoon.components.parser.Parser.ROLE</em> anymore; use
  252.       <em>org.apache.excalibur.xml.sax.SAXParser.ROLE</em> instead.
  253.     </p>
  254.    </s2>
  255.    <s2 title="XML Entity Resolver">
  256.     <p>Similarly, the XML entity resolver component has been moved to Excalibur.
  257.      In cocoon.xconf the hint name has therefore changed from <em>resolver</em> to
  258.      <em>entity-resolver</em>. The configuration has not changed, so changing the hint
  259.      names is sufficent.</p>
  260.     <p>Java code should not use
  261.       <em>org.apache.cocoon.components.resolver.Resolver.ROLE</em> anymore; use
  262.       <em>org.apache.excalibur.xml.EntityResolver.ROLE</em> instead.
  263.     </p>
  264.     <p>The default entities (DTDs, entity sets, etc.) have moved to the
  265.      WEB-INF/ directory.
  266.     </p>
  267.    </s2>
  268.    <s2 title="Caching">
  269.     <p>Although the basic caching mechanism is still the same (each sitemap component
  270.        in the pipeline is queried), the interface for a component have been
  271.        improved as well.</p>
  272.     <p>The old interface <em>Cacheable</em> is deprecated in favour of the new
  273.       <em>CacheableProcessingComponent</em> interface. The basic behaviour of this
  274.       interface has been preserved, however the method names and the signatures
  275.       have changed a little bit.
  276.       </p>
  277.     <p>Some other interfaces, like the validity of the cached information has
  278.       moved to the source packacke in Avalon Excalibur.</p>
  279.     <p>The old interfaces are still support but deprecated, so it's advisable to
  280.       update your components. However, you can support both interfaces at the
  281.       same time, making your component runable in old and new Cocoon installations
  282.       at the same time.</p>
  283.    </s2>
  284.    <s2 title="Stores">
  285.     <p>The Store and StoreJanitor components and implementations have been moved to
  286.        Avalon Excalibur.</p>
  287.     <p>To make upgrading easier, the class attributes of the store janitor
  288.        component have been removed in <em>cocoon.xconf</em> as the class names have changed.
  289.        The <em>cache-transient</em> and <em>cache-persistent</em> components do
  290.        not exist anymore, so any reference to them must be removed from cocoon.xconf.
  291.        Use the <em>persistent-store</em> and <em>transient-store</em> components instead.
  292.     </p>
  293.     <p>In general the package names changed from <em>org.apache.cocoon.components.store</em>
  294.        to <em>org.apache.excalibur.store</em> (and <em>org.apache.excalibur.store.impl</em>). So
  295.        if you have custom java code using these components, you have to change
  296.        your imports.</p>
  297.     <p>The roles <em>PERSISTENT_CACHE</em> and <em>TRANSIENT_CACHE</em> have been renamed to
  298.        <em>PERSISTENT_STORE</em> and <em>TRANSIENT_STORE</em>. The hold() method has been removed
  299.        from the Store interface.</p>
  300.    </s2>
  301.    <s2 title="SAXConnectors, Stream and Event Pipeline">
  302.     <p>This is the only real incompatible change (But don't panic, this will
  303.        not affect you, or maybe just a little bit..).
  304.     </p>
  305.     <p>
  306.        The internal architecture of Cocoon
  307.        has changed: previously, the processing pipeline - consisting of
  308.        a generator, the transformers and a serializer - was represented by two components,
  309.        called <em>stream</em> and <em>event pipeline</em>.</p>
  310.     <p>For a simpler architecture, enhanced functionality and improved performance,
  311.        these components have been combined into one: the <em>processing pipeline</em>.
  312.        The <em>SAXConnectors</em>, which were rarely used, have been removed
  313.        to avoid overcomponentization.</p>
  314.    </s2>
  315.    <s2 title="File Upload">
  316.      <p>The class name for file upload has changed from <em>org.apache.cocoon.components.request.multipart.FilePart</em> to
  317.         <em>org.apache.cocoon.servlet.multipart.Part</em>, and the <em>getFilePath()</em> has been renamed
  318.         <em>Part.getUploadName()</em>.
  319.      </p>
  320.    </s2>
  321.    <s2 title="RequestLifeCycleComponent">
  322.     <p>If you are using the marker interface <em>RequestLifeCycleComponent</em> for your
  323.     own components, you have to make sure that your implementations still implement
  324.     the <em>Component</em> interface. The <em>RequestLifeCycleComponent</em> does no
  325.     longer extend the <em>Component</em> interface, so you have to declare it in your
  326.     own components together with <em>RequestLifeCycleComponent</em>. Otherwise you
  327.     will get a <em>ClassCastException</em> as soon as you access your component.</p>
  328.    </s2>
  329.   </s1>
  330.   <s1 title="Components from the scratchpad">
  331.     <p>Cocoon 2.0.x had some components in the scratchpad area that have now moved into
  332.        the main trunk as blocks. With this move some things have changed.
  333.     </p>
  334.     <s2 title="Session, Authentication and Portal">
  335.       <p>The session framework (sunShine), the authentication framework (sunRise)
  336.          and the portal framework (sunSpot) are now blocks (session-fw, authentication-fw
  337.          and portal-fw).
  338.       </p>
  339.       <p>The <em>sunShine transformer</em> has been renamed to <em>session transformer</em>.
  340.         All sitemap components starting with <em>sunrise-</em> have been changed to
  341.         start now with <em>auth-</em>. The <em>sunrise-auth</em> action has been
  342.         renamed to <em>auth-protect</em>.
  343.       </p>
  344.       <p>
  345.       The transformer namespace has changed from <em>http://cocoon.apache.org/sunshine/1.0</em>
  346.       to <em>http://apache.org/cocoon/session/1.0</em> and the context names have changed
  347.       from <em>sunshine</em> to <em>session</em> and from <em>sunrise</em> to
  348.       <em>authentication</em>.
  349.       </p>
  350.     </s2>
  351.   </s1>
  352.  </body>
  353. </document>
  354.