Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tvand committed Apr 13, 2020
1 parent a036543 commit 356da53
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 4 deletions.
27 changes: 27 additions & 0 deletions src/changes/changes.xml
Expand Up @@ -20,6 +20,33 @@
</properties>
<body>
<release version="3.0" date="unreleased">
<action issue="JCS-46" dev="tv" type="add">
Add configuration option to specify the datagram
time-to-live in UDPDiscoverySender
</action>
<action dev="tv" type="add">
Add configuration option to specify the network interface
to use for UDP multicast
</action>
<action issue="JCS-166" dev="tv" type="add">
Add configuration option to specify the host to bind the
LateralTCPListener to
</action>
<action issue="JCS-199" dev="tv" type="fix">
Properly shut down auxiliary caches
</action>
<action issue="JCS-182" dev="tv" type="fix">
Fix NPE while closing data source
</action>
<action issue="JCS-201" dev="tv" type="fix">
Fix initialization sequence
</action>
<action issue="JCS-122" dev="tv" type="remove">
Remove dependency on commons-logging
</action>
<action issue="JCS-122" dev="tv" type="add">
Add a log abstraction layer for java.util.logging or log4j2
</action>
<action dev="tv" type="add">
Add a get method to CacheAccess that allows a Supplier to be specified
</action>
Expand Down
109 changes: 109 additions & 0 deletions xdocs/UpgradingFrom2x.xml
@@ -0,0 +1,109 @@
<?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 2.x to 3.0</title>
<author email="tv@apache.org">Thomas Vandahl</author>
</properties>

<body>
<section name="Upgrading from JCS 2.x to 3.0">
<p>
This document lists a number of things that changed in Commons JCS
3.0.
</p>
<subsection name="Package Names and Maven Coordinates">
<p>
The Apache Commons project requires a change of the package names
and Maven coordinates on a major release.
So in all your code replace
<source><![CDATA[
import org.apache.commons.jcs.*;
]]></source>
with
<source><![CDATA[
import org.apache.commons.jcs3.*;
]]></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-jcs3-core</artifactId>
<version>3.0</version>
</dependency>
]]></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.commons.jcs.engine.CompositeCacheAttributes
]]></source>
to
<source><![CDATA[
jcs.default.cacheattributes=org.apache.commons.jcs3.engine.CompositeCacheAttributes
]]></source>
</p>
</subsection>
<subsection name="Logging Abstraction">
<p>
JCS 3.0 uses its own log abstraction layer. As newer and better
log systems become available, JCS is no longer limited to
commons-logging. As a result, JCS now uses java.util.logging as
default and does not depend on commons-logging anymore.
</p>
<p>
Optionally, JCS can use Log4j2 as a log system. You can activate
it by providing log4j.core as a dependency, a log configuration
such as log4j2.xml and a system property
<source><![CDATA[
-Djcs.logSystem=log4j2
]]></source>
As log initialization occurs very early in the startup process,
be sure to add this property before accessing any of JCS' classes.
</p>
<p>
JCS uses the Java SPI mechanism to find its log systems. If you want
to roll your own, you will need to implement a
<code>org.apache.commons.jcs.log.Log</code> object and a
<code>org.apache.commons.jcs.log.LogFactory</code>
and provide the implementation class in a text file
<code>META-INF/services/org.apache.commons.jcs.log.LogFactory</code>
in your code. Choose a name for your log system and activate it via
the system property as described above.
</p>
</subsection>
</section>
</body>
</document>



6 changes: 3 additions & 3 deletions xdocs/faq.fml
Expand Up @@ -26,10 +26,10 @@
<question>What jars are required by JCS?</question>
<answer>
<p>
As of version 2.0, the core of JCS (the LRU
As of version 3.0, the core of JCS (the LRU
memory cache, the indexed disk cache, the TCP
lateral, and the RMI remote server) only
requires commons-logging.
lateral, and the RMI remote server) have no
mandatory dependencies.
</p>
<p>
All of the other dependencies listed on the project
Expand Down
5 changes: 4 additions & 1 deletion xdocs/index.xml
Expand Up @@ -57,7 +57,10 @@
<li>Key pattern matching retrieval</li>
<li>Network efficient multi-key retrieval</li>
</ul>
<p> JCS 2.0 works on JDK versions 1.6 and up. It only has a
<p> JCS 3.x works on JDK versions 1.8 and up. It has no
mandatory external dependencies. See the document about
<a href="UpgradingFrom2x.html">upgrading</a>.</p>
<p> JCS 2.x works on JDK versions 1.6 and up. It only has a
dependency on Commons Logging. See the document about
<a href="UpgradingFrom13.html">upgrading</a>.</p>
</section>
Expand Down

0 comments on commit 356da53

Please sign in to comment.