You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2016/09/26 19:27:32 UTC
svn commit: r1762368 - in /commons/proper/jcs/trunk: src/site/site.xml
xdocs/JCSandJCACHE.xml xdocs/UpgradingFrom13.xml xdocs/index.xml
Author: tv
Date: Mon Sep 26 19:27:32 2016
New Revision: 1762368
URL: http://svn.apache.org/viewvc?rev=1762368&view=rev
Log:
Add upgrade documentation
Added:
commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml (with props)
Modified:
commons/proper/jcs/trunk/src/site/site.xml
commons/proper/jcs/trunk/xdocs/JCSandJCACHE.xml
commons/proper/jcs/trunk/xdocs/index.xml
Modified: commons/proper/jcs/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/site/site.xml?rev=1762368&r1=1762367&r2=1762368&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/site/site.xml (original)
+++ commons/proper/jcs/trunk/src/site/site.xml Mon Sep 26 19:27:32 2016
@@ -31,6 +31,7 @@
<menu name="Development">
<item name="Release Notes" href="/changes-report.html"/>
+ <item name="Upgrading from 1.3 to 2.0" href="/UpgradingFrom13.html"/>
<item name="Mailing Lists" href="/mail-lists.html"/>
<item name="Issue Tracking" href="/issue-tracking.html"/>
<item name="Source Repository" href="/source-repository.html"/>
Modified: commons/proper/jcs/trunk/xdocs/JCSandJCACHE.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/xdocs/JCSandJCACHE.xml?rev=1762368&r1=1762367&r2=1762368&view=diff
==============================================================================
--- commons/proper/jcs/trunk/xdocs/JCSandJCACHE.xml (original)
+++ commons/proper/jcs/trunk/xdocs/JCSandJCACHE.xml Mon Sep 26 19:27:32 2016
@@ -30,10 +30,10 @@
<p>
Since version 2.x, Apache Commons JCS implements
JCache specification (and a few more providing some basic utilities
- in its extras module and a basic integration with apache OpenJPA).
+ in its extras module and a basic integration with Apache OpenJPA).
</p>
<p>
- Next section is about main differences between JCache design and original JCS one.
+ The next section is about the main differences between the JCache design and the original JCS one.
These are still globally valid and are kept to let you get a bit more food for thoughts
on Caching and JCS.
</p>
Added: commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml?rev=1762368&view=auto
==============================================================================
--- commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml (added)
+++ commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml Mon Sep 26 19:27:32 2016
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+ <properties>
+ <title>Upgrading from JCS 1.3 to 2.0</title>
+ <author email="tv@apache.org">Thomas Vandahl</author>
+ </properties>
+
+ <body>
+ <section name="Upgrading from JCS 1.3 to 2.0">
+ <p>
+ This document lists a number of things that changed in Commons JCS
+ 2.0.
+ </p>
+ <subsection name="Package Names and Maven Coordinates">
+ <p>
+ The main difference is the move to the Apache Commons project
+ which lead to the change of the package names and Maven coordinates.
+ So in all your code replace
+ <source><![CDATA[
+import org.apache.jcs.*;
+]]></source>
+ with
+ <source><![CDATA[
+import org.apache.commons.jcs.*;
+]]></source>
+ The Maven coordinates change from
+ <source><![CDATA[
+<dependency>
+ <groupId>org.apache.jcs</groupId>
+ <artifactId>jcs</artifactId>
+ <version>1.3</version>
+</dependency>
+]]></source>
+ to
+ <source><![CDATA[
+<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-jcs-core</artifactId>
+ <version>2.0</version>
+</dependency>
+]]></source>
+ </p>
+ </subsection>
+ <subsection name="Change Cache Access Object">
+ <p>
+ JCS now uses different cache access objects depending on
+ if you want to use cache groups or not. This was necessary
+ because the cache access objects are now generic which saves
+ you all the casts but doesn't allow different objects in the
+ same cache anymore. You now use
+ <source><![CDATA[
+import org.apache.commons.jcs.JCS;
+import org.apache.commons.jcs.access.CacheAccess;
+import org.apache.commons.jcs.access.GroupCacheAccess;
+
+CacheAccess<String, City> cityCache = JCS.getInstance( "city" );
+GroupCacheAccess<String, Country> countryCache = JCS.getGroupCacheInstance( "country" );
+]]></source>
+ </p>
+ </subsection>
+ <subsection name="Adjusting the Configuration">
+ <p>
+ Here again, change all package names in configuration entries
+ from e.g.
+ <source><![CDATA[
+jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
+]]></source>
+ to
+ <source><![CDATA[
+jcs.default.cacheattributes=org.apache.commons.jcs.engine.CompositeCacheAttributes
+]]></source>
+ and all <code>MaxLifeSeconds</code> lines to <code>MaxLife</code>
+ like
+ <source><![CDATA[
+jcs.default.elementattributes.MaxLifeSeconds=7
+]]></source>
+ to
+ <source><![CDATA[
+jcs.default.elementattributes.MaxLife=7
+]]></source>
+ </p>
+ </subsection>
+ </section>
+ </body>
+</document>
+
+
+
Propchange: commons/proper/jcs/trunk/xdocs/UpgradingFrom13.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: commons/proper/jcs/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/xdocs/index.xml?rev=1762368&r1=1762367&r2=1762368&view=diff
==============================================================================
--- commons/proper/jcs/trunk/xdocs/index.xml (original)
+++ commons/proper/jcs/trunk/xdocs/index.xml Mon Sep 26 19:27:32 2016
@@ -58,7 +58,8 @@
<li>Network efficient multi-key retrieval</li>
</ul>
<p> JCS 2.0 works on JDK versions 1.6 and up. It only has a
- dependency on Commons Logging.</p>
+ dependency on Commons Logging. See the document about
+ <a href="UpgradingFrom13.html">upgrading</a>.</p>
</section>
<section name="JCS is a Composite Cache">
<p>