mcardle 2005/11/30 17:11:16 CET
Modified files:
. ESI_readme.txt build.properties
build.properties.default build.xml
Log:
* build file cleaned up and reviewed to work without putting junit.jar in Ant
dir
* readme altered and extended
Revision Changes Path
1.3 +118 -20 esi_server/ESI_readme.txt
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/ESI_readme.txt.diff?r1=1.2&r2=1.3&f=h
1.2 +2 -12 esi_server/build.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/build.properties.diff?r1=1.1&r2=1.2&f=h
1.3 +1 -10 esi_server/build.properties.default
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/build.properties.default.diff?r1=1.2&r2=1.3&f=h
1.8 +35 -76 esi_server/build.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/build.xml.diff?r1=1.7&r2=1.8&f=h
Index: ESI_readme.txt
===================================================================
RCS file: /home/cvs/repository/esi_server/ESI_readme.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ESI_readme.txt 25 Oct 2005 12:31:16 -0000 1.2
+++ ESI_readme.txt 30 Nov 2005 16:11:16 -0000 1.3
@@ -11,42 +11,140 @@
1/ Install a fresh Tomcat 5
-2/ Remove all webapps directories in C:\YOUR_TOMCAT_DIR\webapps\ except
\ROOT and \balancer.
+2/ Remove all webapps directories in C:\YOUR_ESI_TOMCAT_DIR\webapps\ except
\ROOT and \balancer.
3/ Edit the build.properties.default in the root directory of the source
code and change
the path entries to your Tomcat install where appropriate
-4/ Compile the proxy source code by typing "ant go" in the root directory of
the source code.
- This should deploy all the necessary jars to
C:\YOUR_TOMCAT_DIR\webapps\ROOT\WEB-INF\lib
- and config files to C:\YOUR_TOMCAT_DIR\webapps\ROOT\WEB-INF\web.xml and
log4j.xml
- and C:\YOUR_TOMCAT_DIR\webapps\ROOT\WEB-INF\config\data.xml
+4/ Compile the proxy source code by typing "ant clean go -lib
WEB-INF\lib\junit.jar"
+ in the root directory of the source code.
+ This should deploy all the necessary jars to
C:\YOUR_ESI_TOMCAT_DIR\webapps\ROOT\WEB-INF\lib
+ and config files to C:\YOUR_ESI_TOMCAT_DIR\webapps\ROOT\WEB-INF\web.xml
and log4j.xml
+ and C:\YOUR_ESI_TOMCAT_DIR\webapps\ROOT\WEB-INF\config\data.xml
+
+5/ Install a Jahia instance on port 8080 (the default port when installing a
new Jahia server).
+
+6/ Once your Jahia installed, make the following modifications to the
jahia.properties
+ (by simply pasting the following settings over the appropriate section in
your
+ jahia.properties). Make sure to replace YOUR_ESI_SERVER_IP where
appropriate.
+
+ [...]
+
+ ### Output cache #####################
+ # The output (HTML) cache may also be controlled in more detail
with the
+ # following parameters.
+ outputCacheActivated = false
+ # the following value is in milliseconds, set to -1 for no time
expiration
+ outputCacheDefaultExpirationDelay = -1
+
+
+ ### ESI fragment-based Output cache ########################
+ # Note that the above conventional cache must be deactivated
+ # for ESI fragment caching to work
+ esiCacheActivated
= true
+ esiCacheServerLogin
= admin
+ esiCacheServerPassword
= password
+ # Display an HTML fieldset box around fragment tags
+ # useful for debugging purposes only :
+ esiDisplayFragmentDelimiters
= false
+ # Used to display the referenced content IDs in each
Template/Fragment
+ esiDisplayContentIDs
= false
+ # Should the cache of the remote ESI server (for the current
Jahia instance only)
+ # be cleared at boot time :
+ esiCleanupCacheAtBootTime
= true
+ # In order to do carry out esiCleanupCacheAtBootTime and for
other invalidation purposes,
+ # Jahia needs to know address(es) used to access one or more of
the ESI server instances at boot time.
+ # (Note that these IPs/ports are only used to generate the
appropriate cache key entry for the ESI server)
+ # You can declare a ';' seperated list of IP/server combinations
+ # e.g. :
+ # esiServerIPs = 192.168.2.178;192.168.4.2;80.2.201.100
+ # esiServerPorts = 8081;7079;80
+ # which corresponds to addresses 192.168.2.178:8081,
192.168.4.2:7079 and 80.2.201.100:80
+ esiServerIPs
= YOUR_ESI_SERVER_IP
+ esiServerPorts
= 8081
+ # The IP/Port of the ESI server where all SOAP invalidation
messages are sent to
+ esiInvalidationIP
= YOUR_ESI_SERVER_IP
+ esiInvalidationPort
= 6666
+
+
+ # ESI invalidation messages can be either send via HTML reponse
piggy-backing ( i.e.
+ # they are appended to Jahia HTML responses) or via a direct
SOAP transmission to the ESI
+ # server (default):
+ esiUsePiggyBackInvalidation
= false
+
+
+ #force use of cookies (instead of URL rewriting) to transmit
user specific ESI cache key parameter
+ esiUseCookieUserIdentifiers =
false
+ #encrypt the user specific identifiers
+ esiEncryptUserIdentifiers =
true
+ [...]
-5/ Edit C:\YOUR_TOMCAT_DIR\webapps\ROOT\WEB-INF\config\data.xml to change
the address of
+5/ Edit C:\YOUR_ESI_TOMCAT_DIR\webapps\ROOT\WEB-INF\config\data.xml to
change the address of
your remote Jahia server in the following entry :
- domainName="www.YourRemoteJahiaServerAddress.com:YourJahiaPort"
+ from :
+ domainName="localhost:8080"
+
+ to:
+ domainName="YOUR_JAHIA_SERVER_IP:8080"
6/ Warning: Make sure that your proxy's Tomcat does not use the same port as
that of your Jahia server
if they are running on the same machine.
-7/ Change your
C:\YOUR_JAHIA_DIR\tomcat\webapps\jahia\WEB-INF\etc\config\jahia.properties
- in your Jahia installation so that it points to the correct IP and port
of your proxy:
+X/ To activate routing to multiple Jahia instances, you need to replace in
data.xml :
+
+ <server className="net.sf.j2ep.servers.BaseServer"
+ domainName="localhost:8080"
+ isRewriting="true">
+ <rule
className="net.sf.j2ep.rules.AcceptEverythingRule"/>
+ </server>
+
+ by :
+
+ <cluster-server
className="net.sf.j2ep.servers.RoundRobinCluster" isRewriting="true" >
+ <server
domainName="YOUR_JAHIA_SERVER1:YOUR_JAHIA_SERVER2_PORT" />
+ <server
domainName="YOUR_JAHIA_SERVER2_IP:YOUR_JAHIA_SERVER2_PORT" />
+ <rule
className="net.sf.j2ep.rules.AcceptEverythingRule" />
+ </cluster-server>
+
+X/ Run the ESI server with the following command (or use the "Start Jahia
Cache Server"
+ icon in your Windows Start menu):
+
+ \YOUR_ESI_TOMCAT_DIR\tomcat\bin\catalina start
+
+X/ Start the Jahia server with the following command :
+
+ C:\YOUR_JAHIA_DIR\bin\jahia_Esi.bat (windows)
+
+ or
+
+ C:\YOUR_JAHIA_DIR\bin\jahia_Esi.sh (linux)
+
+X/ You can now browse Jahia via the ESI server at
http://YOUR_ESI_SERVER_IP:8081/jahia/Jahia.
+ Note that Jahia is still accessible at
http://YOUR_JAHIA_SERVER_IP:8080/jahia/Jahia.
+
+
+X/ If you need debug information on all ESI related processing, you can
change
+ to "debug" level all ESI related classes in
+ \YOUR_ESI_DIR\tomcat\webapps\ROOT\WEB-INF\log4j.xml.
+
+ You can also activate debug mode on the ESI server by replacing "info"
values
+ by "debug" in
\YOUR_JAHIA_DIR\tomcat\webapps\jahia\WEB-INF\etc\config\log4j.xml.
+ You will need to restart the ESI server for this changes to be taken into
account.
+
- esiServerIPs =
YOUR_PROXY_IP
- esiServerPorts =
YOUR_PROXY_PORT
- # The IP/Port of the ESI server where all SOAP invalidation messages
are sent to
- esiInvalidationIP =
YOUR_PROXY_IP
- esiInvalidationPort = 4004
+Note: In this example config, we used port 8080 for the Jahia server and
8081 for the ESI server.
+However, you can change this to any suitable port combination by first
changing the server.xml
+in Jahia's and ESI's \tomcat\conf\server.xml files.
-8/ You should now be able to access Jahia via the proxy by typing the
following address in your
- browser : http://YOUR_PROXY_IP:YOUR_PROXY_PORT/jahia/Jahia
+Limitations :
+------------
- Note that your Jahia server should still be accessible via the following
address:
+Currently ESI cache invalidation may still be buggy, so you may need to use
the "cache/offonce" parameter in the URL to force a refresh of the cache.
- http://www.YourRemoteJahiaServerAddress.com:YourJahiaPort/jahia/Jahia
+Other attributes will be added to JESI tags to allow fine tuning of the ESI
server behaviour when errors on fragments are encountered.
-9/ To control the debugging verbosity, please edit the
- C:\YOUR_TOMCAT_DIR\webapps\ROOT\WEB-INF\log4j.xml file
+Performance should also be improved in future releases of the ESI server.
Index: build.properties
===================================================================
RCS file: /home/cvs/repository/esi_server/build.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.properties 7 Oct 2005 09:03:09 -0000 1.1
+++ build.properties 30 Nov 2005 16:11:16 -0000 1.2
@@ -2,21 +2,11 @@
app.version=custom
# Tomcat specifics
-catalina.home=C:/EsiServerTomcat2
+catalina.home=C:/testserver/apache-tomcat-5.5.12/
manager.username=Jahia
manager.password=Jahia
-#Directory having the libs that will be copied to build
-#Change this to something that suits you and run the
-#download task before running anything else.
-#external.libs=${catalina.home}/webapps/j2ep/lib/
-external.libs=${catalina.home}/webapps/ROOT/WEB-INF/lib/
-
-catalina.targetapp=${catalina.home}/webapps/ROOT/WEB-INF/lib/
-
-
-#Here are the libs downloaded from
-download.libs=http://j2ep.sourceforge.net/lib
+targetapp.dir=${catalina.home}/webapps/ROOT/WEB-INF/
#server
server.url = http://localhost:8080
Index: build.properties.default
===================================================================
RCS file: /home/cvs/repository/esi_server/build.properties.default,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.properties.default 25 Oct 2005 09:19:57 -0000 1.2
+++ build.properties.default 30 Nov 2005 16:11:16 -0000 1.3
@@ -6,16 +6,7 @@
manager.username= username that can use the manager
manager.password= password for user above
-#Directory having the libs that will be copied to build
-#Change this to something that suits you and run the
-#download task before running anything else.
-external.libs=${catalina.home}/webapps/ROOT/WEB-INF/lib/
-
-catalina.targetapp.lib=${catalina.home}/webapps/ROOT/WEB-INF/lib/
-catalina.targetapp=${catalina.home}/webapps/ROOT/WEB-INF/
-
-#Here are the libs downloaded from
-download.libs=http://j2ep.sourceforge.net/lib
+targetapp.dir=${catalina.home}/webapps/ROOT/WEB-INF/
#server
server.url = http://localhost:8080
Index: build.xml
===================================================================
RCS file: /home/cvs/repository/esi_server/build.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.xml 18 Nov 2005 16:29:46 -0000 1.7
+++ build.xml 30 Nov 2005 16:11:16 -0000 1.8
@@ -23,7 +23,6 @@
-->
<property file="build.properties"/>
- <property file="build.properties.default"/>
<!--
@@ -32,7 +31,7 @@
-->
<property name="app.name" value="j2ep"/>
- <property name="build.home"
value="${basedir}/WEB-INF/classes"/>
+ <property name="build.home" value="${basedir}/build"/>
<property name="app.home" value="${basedir}/WEB-INF"/>
<property name="lib.home" value="${basedir}/WEB-INF/lib"/>
<property name="dist.home" value="${basedir}/dist"/>
@@ -57,30 +56,28 @@
<!-- Include all the external libs -->
<fileset dir="${lib.home}">
- <include name="*.jar" />
+ <include name="**/*.jar" />
</fileset>
<fileset dir="${catalina.home}/server/lib">
- <include name="*.jar" />
+ <include name="**/*.jar" />
</fileset>
<fileset dir="${catalina.home}/common/lib">
- <include name="*.jar" />
+ <include name="**/*.jar" />
</fileset>
<!-- Base path included for the tests to relate to -->
<pathelement location="${build.home}"/>
</path>
-
- <!--
+ <!--
Deletes all previous builds to clean up the filesystem.
-->
<target name="clean" description="Delete old build and dist directories">
<delete dir="${build.home}" />
- <delete dir="${lib.home}" />
<delete dir="${dist.home}" />
<delete dir="${docs.home}/api" />
</target>
@@ -222,15 +219,12 @@
<!--
- MARC : compiles and copies new jar into tomcat root webinf
+ MC : compiles and copies new jar into tomcat root webinf
-->
<target name="go" depends="release" description="MARC : compiles and
copies new jar into tomcat root webinf">
- <!--<echo> {catalina.targetapp.lib} : ${catalina.targetapp.lib}
</echo>
- <echo> fileset dir="{dist.home}/{app.name}-custom.jar" :
dir="${dist.home}/${app.name}-custom.jar" </echo>-->
-
- <copy file="${dist.home}/${app.name}-custom.jar"
todir="${catalina.targetapp.lib}">
+ <copy file="${dist.home}/${app.name}-custom.jar"
todir="${targetapp.dir}/lib">
</copy>
</target>
@@ -405,9 +399,10 @@
<property name="filterbuilder.jar"
value="${lib.home}/filterbuilder.jar" />
<property name="cactus-1.7.jar"
value="${lib.home}/cactus-1.7.jar" />
+ <property name="cactus-ant-1.7.jar"
value="${lib.home}/cactus-ant-1.7.jar" />
+
<property name="xercesImpl.jar"
value="${lib.home}/xercesImpl.jar" />
<property name="aspectjrt-1.2.1.jar"
value="${lib.home}/aspectjrt-1.2.1.jar" />
- <property name="junit.jar" value="${lib.home}/junit.jar" />
<property name="regexp-1.2.jar"
value="${lib.home}/regexp-1.2.jar" />
<!-- Create build directories as needed -->
@@ -415,35 +410,36 @@
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}"/>
<mkdir dir="${reports.test}"/>
- <mkdir dir="${catalina.targetapp}/config"/>
- <mkdir dir="${catalina.targetapp}/classes"/>
+ <mkdir dir="${targetapp.dir}/config"/>
+ <mkdir dir="${targetapp.dir}/classes"/>
<!-- Copy external dependencies as required -->
- <mkdir dir="${external.libs}"/>
- <copy todir="${external.libs}"
file="${commons-httpclient-3.0-rc3.jar}"/>
- <copy todir="${external.libs}" file="${commons-digester-1.7.jar}"/>
- <copy todir="${external.libs}" file="${commons-beanutils.jar}"/>
- <copy todir="${external.libs}" file="${commons-codec-1.3.jar}"/>
- <copy todir="${external.libs}" file="${commons-logging-1.0.4.jar}"/>
- <copy todir="${external.libs}" file="${log4j-1.2.8.jar}"/>
- <copy todir="${external.libs}" file="${fastmd5-2.6.jar}"/>
-
- <copy todir="${external.libs}" file="${htmllexer.jar}"/>
- <copy todir="${external.libs}" file="${htmlparser.jar}"/>
- <copy todir="${external.libs}" file="${thumbelina.jar}"/>
- <copy todir="${external.libs}" file="${filterbuilder.jar}"/>
-
- <copy todir="${external.libs}" file="${cactus-1.7.jar}"/>
- <copy todir="${external.libs}" file="${xercesImpl.jar}"/>
- <copy todir="${external.libs}" file="${aspectjrt-1.2.1.jar}"/>
- <copy todir="${external.libs}" file="${junit.jar}"/>
- <copy todir="${external.libs}" file="${regexp-1.2.jar}"/>
+ <mkdir dir="${targetapp.dir}/lib"/>
+ <copy todir="${targetapp.dir}/lib"
file="${commons-httpclient-3.0-rc3.jar}"/>
+ <copy todir="${targetapp.dir}/lib"
file="${commons-digester-1.7.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${commons-beanutils.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${commons-codec-1.3.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${commons-logging-1.0.4.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${log4j-1.2.8.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${fastmd5-2.6.jar}"/>
+
+ <copy todir="${targetapp.dir}/lib" file="${htmllexer.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${htmlparser.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${thumbelina.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${filterbuilder.jar}"/>
+
+ <copy todir="${targetapp.dir}/lib" file="${cactus-1.7.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${xercesImpl.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${aspectjrt-1.2.1.jar}"/>
+ <copy todir="${targetapp.dir}/lib" file="${regexp-1.2.jar}"/>
+
+ <copy todir="${targetapp.dir}/lib"
file="${cactus-ant-1.7.jar}"/>
<!-- Copy config files -->
- <copy todir="${catalina.targetapp}" file="${app.home}/web.xml"/>
- <copy todir="${catalina.targetapp}" file="${app.home}/log4j.xml"/>
- <copy todir="${catalina.targetapp}/config"
file="${app.home}/config/data.xml"/>
- <copy todir="${catalina.targetapp}/classes"
file="${app.home}/classes/WCSinvalidation.dtd"/>
+ <copy todir="${targetapp.dir}" file="${app.home}/web.xml"/>
+ <copy todir="${targetapp.dir}" file="${app.home}/log4j.xml"/>
+ <copy todir="${targetapp.dir}/config"
file="${app.home}/config/data.xml"/>
+ <copy todir="${targetapp.dir}/classes"
file="${app.home}/classes/WCSinvalidation.dtd"/>
<!-- Define the Cactus tasks -->
<taskdef resource="cactus.tasks" classpathref="compile.classpath" />
@@ -453,43 +449,6 @@
<taskdef name="reload"
classname="org.apache.catalina.ant.ReloadTask"
classpathref="compile.classpath"/>
<taskdef name="undeploy"
classname="org.apache.catalina.ant.UndeployTask"
classpathref="compile.classpath"/>
- <!-- debug info -->
- <!--<echo> {compile.debug} = ${compile.debug} </echo>
- <echo> {src.home} = ${src.home} </echo>
- <echo> {lib.home} = ${lib.home} </echo>
- <echo> {compile.classpath} = ${compile.classpath} </echo>
- <echo>classpath: ${java.class.path}</echo>-->
-
-
</target>
-
- <!--
-
- Downloads all the necesarry libarays to the external.libs
-
- -->
- <target name="download" description='Downloads all the necesarry
libarays to the external.libs'>
- <mkdir dir="${external.libs}" />
- <get src="${download.libs}/cactus-ant-1.7.jar"
dest="${lib.home}/cactus-ant-1.7.jar"/>
- <get src="${download.libs}/commons-beanutils.jar"
dest="${lib.home}/commons-beanutils.jar"/>
- <get src="${download.libs}/commons-codec-1.3.jar"
dest="${lib.home}/commons-codec-1.3.jar"/>
- <get src="${download.libs}/commons-digester-1.7.jar"
dest="${lib.home}/commons-digester-1.7.jar"/>
- <get src="${download.libs}/commons-httpclient-3.0-rc3.jar"
dest="${lib.home}/commons-httpclient-3.0-rc3.jar"/>
- <get src="${download.libs}/commons-logging-1.0.4.jar"
dest="${lib.home}/commons-logging-1.0.4.jar"/>
- <get src="${download.libs}/aspectjrt-1.2.1.jar"
dest="${lib.home}/aspectjrt-1.2.1.jar"/>
- <get src="${download.libs}/cactus-1.7.jar"
dest="${lib.home}/cactus-1.7.jar"/>
- <get src="${download.libs}/xercesImpl.jar"
dest="${lib.home}/xercesImpl.jar"/>
- <get src="${download.libs}/junit.jar" dest="${lib.home}/junit.jar"/>
-
- <!--<get src="${download.libs}/log4j-1.2.8.jar"
dest="${lib.home}/log4j-1.2.8.jar"/>
- <get src="${download.libs}/fastmd5-2.6.jar"
dest="${lib.home}/fastmd5-2.6.jar"/>
- <get src="${download.libs}/htmllexer.jar"
dest="${lib.home}/htmllexer.jar"/>
- <get src="${download.libs}/htmlparser.jar"
dest="${lib.home}/htmlparser.jar"/>
- <get src="${download.libs}/thumbelina.jar"
dest="${lib.home}/thumbelina.jar"/>
- <get src="${download.libs}/filterbuilder.jar"
dest="${lib.home}/filterbuilder.jar"/>-->
-
- </target>
-
-
</project>