gatein SVN: r7517 - in components/pc/trunk: test/servers and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-27 03:59:22 -0400 (Tue, 27 Sep 2011)
New Revision: 7517
Modified:
components/pc/trunk/pom.xml
components/pc/trunk/test/servers/jboss42/pom.xml
components/pc/trunk/test/servers/pom.xml
Log:
- fix the jboss42 pom that does not point to the right parent (likely because it is not released)
- use the release profile for all servers instead of all-servers
- moved the default-servers active by default as the pom modules
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-09-27 07:41:23 UTC (rev 7516)
+++ components/pc/trunk/pom.xml 2011-09-27 07:59:22 UTC (rev 7517)
@@ -75,7 +75,7 @@
<!-- maven-release-plugin -->
<useReleaseProfile>false</useReleaseProfile>
- <arguments>-Prelease,all-servers</arguments>
+ <arguments>-Prelease</arguments>
<autoVersionSubmodules>true</autoVersionSubmodules>
<preparationGoals>clean install</preparationGoals>
</properties>
Modified: components/pc/trunk/test/servers/jboss42/pom.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/pom.xml 2011-09-27 07:41:23 UTC (rev 7516)
+++ components/pc/trunk/test/servers/jboss42/pom.xml 2011-09-27 07:59:22 UTC (rev 7517)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-test-servers</artifactId>
- <version>2.3.0-Beta05-SNAPSHOT</version>
+ <version>2.3.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pc-test-jboss42</artifactId>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-09-27 07:41:23 UTC (rev 7516)
+++ components/pc/trunk/test/servers/pom.xml 2011-09-27 07:59:22 UTC (rev 7517)
@@ -232,29 +232,25 @@
</build>
+ <!-- By default we build those -->
+ <modules>
+ <module>tomcat6</module>
+ <module>tomcat7</module>
+ <module>jboss51</module>
+ <module>jboss6</module>
+ <module>jetty6</module>
+ </modules>
+
<profiles>
<!-- ***************************************************************** -->
<!-- * Server profiles * -->
<!-- ***************************************************************** -->
<profile>
- <id>default-servers</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
+ <id>release</id>
<modules>
<module>tomcat6</module>
<module>tomcat7</module>
- <module>jboss51</module>
- <module>jboss6</module>
- <module>jetty6</module>
- </modules>
- </profile>
- <profile>
- <id>all-servers</id>
- <modules>
- <module>tomcat6</module>
- <module>tomcat7</module>
<module>jboss42</module>
<module>jboss51</module>
<module>jboss6</module>
13 years, 3 months
gatein SVN: r7516 - portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-27 03:41:23 -0400 (Tue, 27 Sep 2011)
New Revision: 7516
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
Log:
- Fixed improper order of elements (new parsing in PC is stricter).
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2011-09-27 07:41:15 UTC (rev 7515)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2011-09-27 07:41:23 UTC (rev 7516)
@@ -23,11 +23,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
- <public-render-parameter>
- <identifier>navigation_uri</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
- </public-render-parameter>
-
<portlet>
<description xml:lang="EN">Organization Portlet</description>
<portlet-name>OrganizationPortlet</portlet-name>
@@ -440,4 +435,9 @@
<event-definition>
<name>NavigationChange</name>
</event-definition>
+
+ <public-render-parameter>
+ <identifier>navigation_uri</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
+ </public-render-parameter>
</portlet-app>
13 years, 3 months
gatein SVN: r7515 - components/pc/trunk/api/src/test/java/org/gatein/pc/api.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-27 03:41:15 -0400 (Tue, 27 Sep 2011)
New Revision: 7515
Modified:
components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java
Log:
clone object with IOTools
Modified: components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java
===================================================================
--- components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java 2011-09-27 07:35:03 UTC (rev 7514)
+++ components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java 2011-09-27 07:41:15 UTC (rev 7515)
@@ -23,14 +23,10 @@
package org.gatein.pc.api;
+import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
+import org.gatein.common.io.IOTools;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
@@ -458,20 +454,15 @@
try
{
- final File tempFile = File.createTempFile("pc-serialized", null, new File("/tmp"));
- tempFile.deleteOnExit();
- ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(tempFile.getName()));
- out.writeObject(context);
- out.close();
-
- final ObjectInputStream in = new ObjectInputStream(new FileInputStream(tempFile.getName()));
- final Object fromSerialization = in.readObject();
-
+ final Object fromSerialization = IOTools.clone(context);
+ assertNotSame(context, fromSerialization);
assertEquals(context, fromSerialization);
}
catch (Exception ex)
{
- fail(ex.getMessage());
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(ex);
+ throw afe;
}
}
}
13 years, 3 months
gatein SVN: r7514 - in components/pc/trunk/portlet/src: test/java/org/gatein/pc/portlet/deployment and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-27 03:35:03 -0400 (Tue, 27 Sep 2011)
New Revision: 7514
Added:
components/pc/trunk/portlet/src/test/resources/metadata/event/portlet-event-resource-bundle.xml
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java
components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java
Log:
GTNPC-73 : Incorrect parsing of resource bundle inside a portlet element
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java 2011-09-27 07:31:58 UTC (rev 7513)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/staxnav/PortletApplicationMetaDataBuilder.java 2011-09-27 07:35:03 UTC (rev 7514)
@@ -439,7 +439,7 @@
}
//
- if (nav.find(Element.resource_bundle))
+ if (nav.sibling(Element.resource_bundle))
{
md.setResourceBundle(nav.getContent());
nav.next();
Modified: components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java 2011-09-27 07:31:58 UTC (rev 7513)
+++ components/pc/trunk/portlet/src/test/java/org/gatein/pc/portlet/deployment/EventTestEverythingTestCase.java 2011-09-27 07:35:03 UTC (rev 7514)
@@ -126,4 +126,26 @@
String xmlFile = "metadata/event/portlet-event2-fail.xml";
unmarshall(xmlFile, true);
}
+
+ public void testFoo() throws Exception
+ {
+ String xmlFile = "metadata/event/portlet-event-resource-bundle.xml";
+ PortletApplication20MetaData md = unmarshall(xmlFile);
+
+ //
+ assertNotNull(md);
+ PortletMetaData portletMD = md.getPortlet("Portlet");
+ assertNotNull(portletMD);
+ assertEquals("bundle", portletMD.getResourceBundle());
+
+ //
+ assertEquals(null, md.getResourceBundle());
+ List<EventDefinitionMetaData> events = md.getEvents();
+ assertNotNull(events);
+ assertEquals(1, events.size());
+ EventDefinitionMetaData event = events.get(0);
+ assertNotNull(event);
+ assertEquals("event", event.getName());
+ assertEquals("org.jboss.portal.event.invoke.refill.beer", event.getValueType());
+ }
}
Added: components/pc/trunk/portlet/src/test/resources/metadata/event/portlet-event-resource-bundle.xml
===================================================================
--- components/pc/trunk/portlet/src/test/resources/metadata/event/portlet-event-resource-bundle.xml (rev 0)
+++ components/pc/trunk/portlet/src/test/resources/metadata/event/portlet-event-resource-bundle.xml 2011-09-27 07:35:03 UTC (rev 7514)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <portlet>
+ <portlet-name>Portlet</portlet-name>
+ <portlet-class>WhatevetPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <resource-bundle>bundle</resource-bundle>
+ <supported-publishing-event>
+ <name>event</name>
+ </supported-publishing-event>
+ </portlet>
+
+ <event-definition>
+ <name>event</name>
+ <value-type>org.jboss.portal.event.invoke.refill.beer</value-type>
+ </event-definition>
+
+
+</portlet-app>
\ No newline at end of file
13 years, 3 months
gatein SVN: r7513 - components/wsrp/trunk.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-27 03:31:58 -0400 (Tue, 27 Sep 2011)
New Revision: 7513
Modified:
components/wsrp/trunk/pom.xml
Log:
- Cleaned-up dependencies: upgraded to Chromattic 1.1.0-beta7 and gatein-dep to 1.1.0-Beta06, removed duplicated dependencies.
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2011-09-27 07:27:45 UTC (rev 7512)
+++ components/wsrp/trunk/pom.xml 2011-09-27 07:31:58 UTC (rev 7513)
@@ -52,15 +52,11 @@
<org.gatein.wci.version>2.1.0-Beta01</org.gatein.wci.version>
<jsf.version>1.2_12</jsf.version>
- <servlet.version>2.5</servlet.version>
- <apache.commons-fileupload.version>1.2.1</apache.commons-fileupload.version>
- <javax.mail.version>1.4.1</javax.mail.version>
<javax.xml.ws.version>2.1</javax.xml.ws.version>
<javax.xml.soap.saaj.version>1.3</javax.xml.soap.saaj.version>
- <org.chromattic.version>1.1.0-beta5</org.chromattic.version>
+ <org.chromattic.version>1.1.0-beta7</org.chromattic.version>
<org.jboss.arquillian.version>1.0.0.Alpha2</org.jboss.arquillian.version>
<org.mockito.version>1.8.5</org.mockito.version>
- <com.google.guava.version>r09</com.google.guava.version>
</properties>
<dependencyManagement>
@@ -69,7 +65,7 @@
<dependency>
<groupId>org.gatein</groupId>
<artifactId>gatein-dep</artifactId>
- <version>1.1.0-Beta03</version>
+ <version>1.1.0-Beta06</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -159,24 +155,6 @@
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${servlet.version}</version>
- </dependency>
-
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>${apache.commons-fileupload.version}</version>
- </dependency>
-
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- <version>${javax.mail.version}</version>
- </dependency>
-
- <dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>${javax.xml.ws.version}</version>
@@ -189,12 +167,6 @@
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>${com.google.guava.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.api</artifactId>
<version>${org.chromattic.version}</version>
13 years, 3 months
gatein SVN: r7512 - components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-27 03:27:45 -0400 (Tue, 27 Sep 2011)
New Revision: 7512
Modified:
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java
Log:
- GTNPC-72: expose schema validation switch on PortletApplicationDeployer so that it can be enabled/disabled in GateIn.
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java 2011-09-27 06:12:04 UTC (rev 7511)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/deployment/PortletApplicationDeployer.java 2011-09-27 07:27:45 UTC (rev 7512)
@@ -22,11 +22,10 @@
******************************************************************************/
package org.gatein.pc.portlet.impl.deployment;
+import org.gatein.common.io.IOTools;
import org.gatein.common.logging.Logger;
-import org.gatein.common.io.IOTools;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.api.PortletInvoker;
-import org.gatein.pc.portlet.impl.deployment.staxnav.PortletApplicationMetaDataBuilder;
import org.gatein.pc.portlet.container.ContainerPortletInvoker;
import org.gatein.pc.portlet.container.PortletContainer;
import org.gatein.pc.portlet.container.managed.LifeCycleStatus;
@@ -40,6 +39,7 @@
import org.gatein.pc.portlet.container.managed.PortletApplicationRegistry;
import org.gatein.pc.portlet.impl.container.PortletApplicationLifeCycle;
import org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle;
+import org.gatein.pc.portlet.impl.deployment.staxnav.PortletApplicationMetaDataBuilder;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.wci.ServletContainer;
import org.gatein.wci.ServletContainerFactory;
@@ -47,7 +47,6 @@
import org.gatein.wci.WebAppEvent;
import org.gatein.wci.WebAppLifeCycleEvent;
import org.gatein.wci.WebAppListener;
-import org.staxnav.ValueType;
import java.io.InputStream;
import java.net.MalformedURLException;
@@ -89,6 +88,18 @@
/** . */
private ManagedObjectRegistryEventBroadcaster broadcaster;
+ private boolean schemaValidated;
+
+ public boolean isSchemaValidated()
+ {
+ return schemaValidated;
+ }
+
+ public void setSchemaValidated(boolean schemaValidated)
+ {
+ this.schemaValidated = schemaValidated;
+ }
+
public PortletApplicationRegistry getRegistry()
{
return registry;
@@ -255,6 +266,7 @@
//
PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();
+ builder.setSchemaValidation(schemaValidated);
//
return builder.build(in);
13 years, 3 months
gatein SVN: r7511 - in epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US: modules/Advanced and 8 other directories.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-09-27 02:12:04 -0400 (Tue, 27 Sep 2011)
New Revision: 7511
Modified:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Revision_History.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/nodetypes-and-namespaces.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container-howto.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbossts-transaction-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jta.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/protocols/ftp.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/aggregation-rule.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/find-similar-nodes.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/higlight.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/ignore-accent-symbols.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/index-boost-value.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.bk
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/node-scope-index.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/regexp-indexing-rule.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/searching-repository-content.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/spell-checker.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/synonim-provider.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/statistics.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/container-configuration.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/data-source-provider.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/initialcontext-binder-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/inversion-of-control.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/jndi-naming.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/job-scheduler-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/listener-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/logging.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/manageability.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/LDAP.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
Spellcheck and revision bump
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,30 +4,30 @@
%BOOK_ENTITIES;
]>
<bookinfo id="book-Reference_Guide-Reference_Guide_eXo_JCR_1.14">
- <title>Reference Guide eXo JCR 1.14</title>
- <subtitle>An in-depth guide to Enterprise Portal Platform &VZ;</subtitle>
- <productname>JBoss Enterprise Portal Platform</productname>
- <productnumber>5.2</productnumber>
- <edition>5.2.0</edition>
- <pubsnumber>5</pubsnumber>
- <abstract>
- <para>
- This Reference Guide is a high-level usage document. It deals with more advanced topics than the Installation and User Guides, adding new content or taking concepts discussed in the earlier documents further. It aims to provide supporting documentation for advanced users of the JBoss Enterprise Portal Platform product. Its primary focus is on advanced use of the product and it assumes an intermediate or advanced knowledge of the technology and terms.
- </para>
+ <title>Reference Guide eXo JCR 1.14</title>
+ <subtitle>An in-depth guide to Enterprise Portal Platform &VZ;</subtitle>
+ <productname>JBoss Enterprise Portal Platform</productname>
+ <productnumber>5.2</productnumber>
+ <edition>5.2.0</edition>
+ <pubsnumber>1</pubsnumber>
+ <abstract>
+ <para>
+ This Reference Guide is a high-level usage document. It deals with more advanced topics than the Installation and User Guides, adding new content or taking concepts discussed in the earlier documents further. It aims to provide supporting documentation for advanced users of the JBoss Enterprise Portal Platform product. Its primary focus is on advanced use of the product and it assumes an intermediate or advanced knowledge of the technology and terms.
+ </para>
- </abstract>
- <corpauthor>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG" />
- </imageobject>
+ </abstract>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG" />
+ </imageobject>
- </inlinemediaobject>
+ </inlinemediaobject>
- </corpauthor>
- <!-- FOR PUBLICAN --> <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- FOR JDOCBOOK: --> <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
- </xi:include>
- <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </corpauthor>
+ <!-- FOR PUBLICAN --> <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- FOR JDOCBOOK: --> <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </xi:fallback>
+ </xi:include>
+ <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</bookinfo>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Revision_History.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Revision_History.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,48 +4,62 @@
%BOOK_ENTITIES;
]>
<appendix id="appe-Reference_Guide-Revision_History">
- <title>Revision History</title>
- <simpara>
- <revhistory>
- <revision>
- <revnumber>5.2.0-5</revnumber>
- <date>Wed Sep 14 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>5.2.0-1</revnumber>
+ <date>Tue Sep 27 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email></email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Incorporated eXo JCR 1.14 documentation.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-5</revnumber>
+ <date>Wed Sep 14 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Added Global Portlet Data section.</member>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Added Global Portlet Data section.</member>
- </simplelist>
+ </simplelist>
- </revdescription>
+ </revdescription>
- </revision>
- <revision>
- <revnumber>5.2.0-1</revnumber>
- <date>Mon Aug 29 2011</date>
- <author>
- <firstname>Scott</firstname>
- <surname>Mumford</surname>
- <email></email>
+ </revision>
+ <revision>
+ <revnumber>5.2.0-1</revnumber>
+ <date>Mon Aug 29 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email></email>
- </author>
- <revdescription>
- <simplelist>
- <member>Updating version and resetting pubs/ed numbers.</member>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Updating version and resetting pubs/ed numbers.</member>
- </simplelist>
+ </simplelist>
- </revdescription>
+ </revdescription>
- </revision>
+ </revision>
- </revhistory>
+ </revhistory>
- </simpara>
+ </simpara>
</appendix>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -5,180 +5,184 @@
]>
<section id="sect-Reference_Guide-JCR_FAQ">
<title>JCR FAQ</title>
- <para>
- It's the draft for a future FAQ of JCR usage.
- </para>
+
<section id="sect-Reference_Guide-JCR_FAQ-Kernel">
<title>Kernel</title>
- <section id="sect-Reference_Guide-Kernel-What_is_the_best_standardized_way_to_get_the_instance_of_a_service_">
- <title>What is the best, standardized way to get the instance of a service ?</title>
-
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>What is the best, standardized way to get the instance of a service ?</term>
+ <listitem>
+ <para>
<programlisting language="Java" role="Java">container.getComponentInstanceOfType(ServiceName.class);</programlisting>
-
+
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_FAQ-JCR">
- <title>JCR</title>
<section id="sect-Reference_Guide-JCR-JCR_core">
<title>JCR core</title>
- <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_Session.getNodeByUUID_or_Session.getItem">
- <title>Is it better to use Session.getNodeByUUID or Session.getItem?</title>
- <para>
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>Is it better to use Session.getNodeByUUID or Session.getItem?</term>
+ <listitem>
+ <para>
Session.getNodeByUUID() about 2.5 times faster of Session.getItem(String) and only 25% faster of Node.getNode(String). See the daily tests results for such comparisons, e.g.
- </para>
- <para>
- <ulink url="http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...">http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...</ulink>
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_it_make_sense_to_have_all_the_node_referencable_to_use_getNodeByUUID_all_the_time">
- <title>Does it make sense to have all the node referencable to use getNodeByUUID all the time?</title>
- <para>
- Until it's applicable for a business logic it can be. But take in account the paths are human readable and lets you think in hierarchy. If it's important a location based approach is preferable.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-What_should_I_use_to_check_if_an_Item_exists_before_getting_the_Value">
- <title>What should I use to check if an Item exists before getting the Value?</title>
- <para>
- Use Session.itemExists(String absPath), Node.hasNode(String relPath) or Property.hasProperty(String name). It's also is possible to check Node.hasNodes() and Node.hasProprties().
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_use_Observation_properly">
- <title>How to use Observation properly?</title>
- <para>
- JCR Observation's a way to listen on persistence changes of a Repository. It provides several options to configure the listener for an interesting only changes. To use properly, it's important to understand concept of events filtering for a registered EventListener (8.3.3 Observation Manager). An often confusing part, it's the <emphasis role="bold">absPath</emphasis>, it's an associated parent of a location you want to observe events on. I.e. it's a parent of child node(s) or this parent property(ies); if <emphasis role="bold">isDeep</emphasis> is true then you'll get events of all the subtree of child nodes also. The same actual for <emphasis role="bold">uuid</emphasis> and <emphasis role="bold">nodeTypeName</emphasis> parameters of ObservationManager.addEventListener() method.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_queries_that_to_access_the_data_by_the_JCR_API">
- <title>Is it better to use queries that to access the data by the JCR API?</title>
- <para>
- No, direct access to items via JCR API is more efficient. Search will consume additional resources for index querying and only then return the items.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-What_is_default_query_ordering">
- <title>What is default query ordering?</title>
- <para>
- By default (if query do not contains any ordering statements) result nodes is sorted by document order.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_ordering_by_jcrpath_or_Item_name_supported">
- <title>Is ordering by jcr:path or Item name supported?</title>
- <para>
- No, it does not supported. There is two ways to ordering results, when path may be used as criteria:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Order by property with value type NAME or PATH (jcr supports it).
</para>
+ <para>
+ <ulink url="http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...">http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...</ulink>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Does it make sense to have all the node referenceable to use getNodeByUUID all the time?</term>
+ <listitem>
+ <para>
+ Until it's applicable for a business logic it can be. But take in account the paths are human readable and lets you think in hierarchy. If it's important a location based approach is preferable.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>What should I use to check if an Item exists before getting the Value?</term>
+ <listitem>
+ <para>
+ Use Session.itemExists(String absPath), Node.hasNode(String relPath) or Property.hasProperty(String name). It's also is possible to check Node.hasNodes() and Node.hasProprties().
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to use Observation properly?</term>
+ <listitem>
+ <para>
+ JCR Observation's a way to listen on persistence changes of a Repository. It provides several options to configure the listener for an interesting only changes. To use properly, it's important to understand concept of events filtering for a registered EventListener (8.3.3 Observation Manager). An often confusing part, it's the <emphasis role="bold">absPath</emphasis>, it's an associated parent of a location you want to observe events on. I.e. it's a parent of child node(s) or this parent property(ies); if <emphasis role="bold">isDeep</emphasis> is true then you'll get events of all the subtree of child nodes also. The same actual for <emphasis role="bold">uuid</emphasis> and <emphasis role="bold">nodeTypeName</emphasis> parameters of ObservationManager.addEventListener() method.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Is it better to use queries that to access the data by the JCR API?</term>
+ <listitem>
+ <para>
+ No, direct access to items via JCR API is more efficient. Search will consume additional resources for index querying and only then return the items.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>What is default query ordering?</term>
+ <listitem>
+ <para>
+ By default (if query do not contains any ordering statements) result nodes is sorted by document order.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Is ordering by jcr:path or Item name supported?</term>
+ <listitem>
+ <para>
+ No, it does not supported. There is two ways to ordering results, when path may be used as criteria:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Order by property with value type NAME or PATH (jcr supports it).
+ </para>
- </listitem>
- <listitem>
- <para>
- Order by jcr:path - sort by exact path of node (jcr do not supports it).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Order by jcr:path - sort by exact path of node (jcr do not supports it).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Order by jcr:path
- </para>
- <para>
- If no order specification is supplied in the query statement, implementations may support document order on the result nodes (see 6.6.4.2 Document Order). And it is sorted by order number.
- </para>
- <para>
- By default, (if query do not contains any ordering statements) result nodes is sorted by document order.
- </para>
+ </itemizedlist>
+ <para>
+ Order by jcr:path
+ </para>
+ <para>
+ If no order specification is supplied in the query statement, implementations may support document order on the result nodes (see 6.6.4.2 Document Order). And it is sorted by order number.
+ </para>
+ <para>
+ By default, (if query do not contains any ordering statements) result nodes is sorted by document order.
+ </para>
<programlisting>SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%'</programlisting>
- <para>
- For specified jcr:path ordering there is different proceeding in XPath and SQL:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- SQL no matter ascending or descending - query returns result nodes in random order: {code}SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%' ORDER BY jcr:path{code}
- </para>
+ <para>
+ For specified jcr:path ordering there is different proceeding in XPath and SQL:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ SQL no matter ascending or descending - query returns result nodes in random order: {code}SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%' ORDER BY jcr:path{code}
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- XPath - jcr:path order construction is ignored (so result is not sorted according path); {code}/testRoot/* <ulink url="@jcr:primaryType='nt:unstructured'">@jcr:primaryType='nt:unstructured'</ulink> order by jcr:path{code}
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ XPath - jcr:path order construction is ignored (so result is not sorted according path); {code}/testRoot/* <ulink url="@jcr:primaryType='nt:unstructured'">@jcr:primaryType='nt:unstructured'</ulink> order by jcr:path{code}
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_eXo_JCR_indexer_uses_content_encoding">
- <title>How eXo JCR indexer uses content encoding?</title>
- <para>
- 1. Indexer uses jcr:encoding property of nt:resource node (used as jcr:content child node of nt:file) 2. if no jcr:encoding property set the Document Service will use the one configured in the service (defaultEncoding) 3. if nothing is configured a JVM, the default encoding will be used
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Which_database_server_is_better_for_eXo_JCR">
- <title>Which database server is better for eXo JCR?</title>
- <para>
- If the question is a performance, it's difficult question, as each database can be configured to be more (and more) faster for each special case. MySQL with MyISAM engine will be faster. But MySQL has limitations for indexes for multilingual columns (Item names actually). So, with long Item names (larger ofOracle or PostgreSQL also are good for performance. DB2 and MSSQL are slower in default configurations. Default configuration of Sybase leader of slowness. But in this question, take the database server maintenance in account. MySQL and PostgreSQL are simple in installation and can work even on limited hardware. Oracle, DB2, MSSQL or Sybase need more efforts. The same actual for maintenance during the work. Note for Sybase: "check-sns-new-connection" data container configuration parameter should be set to "true". For testing purpose, embedded database such as HSQLDB is the best choice. Apache Derby and H2 also supported. But H2 surprisingly needs "beta!
" feature enabled - MVCC=TRUE in JDBC url.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_setup_eXo_JCR_for_mutilingial_content_on_MySQL">
- <title>How to setup eXo JCR for mutilingial content on MySQL?</title>
- <para>
- To allow multiple character sets to be sent from the client, the UTF-8 encoding should be used, either by configuring utf8 as the default server character set, or by configuring the JDBC driver to use UTF-8 through the characterEncoding property. MySQL database should be created in single-byte encoding, e.g. "latin1":
- </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How eXo JCR indexer uses content encoding?</term>
+ <listitem>
+ <para>
+ Indexer uses jcr:encoding property of nt:resource node (used as jcr:content child node of nt:file) 2. if no jcr:encoding property set the Document Service will use the one configured in the service (defaultEncoding) 3. if nothing is configured a JVM, the default encoding will be used.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Which database server is better for eXo JCR?</term>
+ <listitem>
+ <para>
+ If the question is a performance, it's difficult question, as each database can be configured to be more (and more) faster for each special case. MySQL with MyISAM engine will be faster. But MySQL has limitations for indexes for multilingual columns (Item names actually). So, with long Item names (larger ofOracle or PostgreSQL also are good for performance. DB2 and MSSQL are slower in default configurations. Default configuration of Sybase leader of slowness. But in this question, take the database server maintenance in account. MySQL and PostgreSQL are simple in installation and can work even on limited hardware. Oracle, DB2, MSSQL or Sybase need more efforts. The same actual for maintenance during the work. Note for Sybase: "check-sns-new-connection" data container configuration parameter should be set to "true". For testing purpose, embedded database such as HSQLDB is the best choice. Apache Derby and H2 also supported. But H2 surprisingly!
needs "beta" feature enabled - MVCC=TRUE in JDBC url.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to setup eXo JCR for mutilingial content on MySQL?</term>
+ <listitem>
+ <para>
+ To allow multiple character sets to be sent from the client, the UTF-8 encoding should be used, either by configuring utf8 as the default server character set, or by configuring the JDBC driver to use UTF-8 through the characterEncoding property. MySQL database should be created in single-byte encoding, e.g. "latin1":
+ </para>
+
+ <programlisting>CREATE DATABASE db1 CHARACTER SET latin1 COLLATE latin1_general_cs;</programlisting>
+ <para>
+ eXo JCR application (e.g. GateIn) should use JCR dialect "MySQL-UTF8".
+ </para>
+ <para>
+ In other words: MySQL database default encoding and JCR dialect cannot be UTF8 both. Use single-byte encoding (e.g. "latin1") for database and "mysql-utf8" dialect for eXo JCR.
+ </para>
+ <para>
+ Notice: "MySQL-UTF8" dialect cannot be auto-detected, it should be set explicitly in configuration.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Does MySQL have limitation affecting on eXo JCR features?</term>
+ <listitem>
+ <para>
+ Index's key length of JCR_SITEM (JCR_MITEM) table for mysql-utf8 dialect is reduced to 765 bytes (or 255 chars).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Does use of Sybase database need special options in eXo JCR configuration?</term>
+ <listitem>
+ <para>
+ To enable JCR working properly with Sybase, a property 'check-sns-new-connection' with 'false' value is required for each workspace data container:
+ </para>
-<programlisting>CREATE DATABASE db1 CHARACTER SET latin1 COLLATE latin1_general_cs;</programlisting>
- <para>
- eXo JCR application (e.g. GateIn) should use JCR dialect "MySQL-UTF8".
- </para>
- <para>
- In other words: MySQL database default encoding and JCR dialect cannot be UTF8 both. Use single-byte encoding (e.g. "latin1") for database and "mysql-utf8" dialect for eXo JCR.
- </para>
- <para>
- Notice: "MySQL-UTF8" dialect cannot be auto-detected, it should be set explicitly in configuration.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_MySQL_have_limitation_affecting_on_eXo_JCR_features">
- <title>Does MySQL have limitation affecting on eXo JCR features?</title>
- <para>
- Index's key length of JCR_SITEM (JCR_MITEM) table for mysql-utf8 dialect is reduced to 765 bytes (or 255 chars).
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_use_of_Sybase_database_need_special_options_in_eXo_JCR_configuration">
- <title>Does use of Sybase database need special options in eXo JCR configuration?</title>
- <para>
- To enable JCR working properly with Sybase, a property 'check-sns-new-connection' with 'false' value is required for each workspace data container:
- </para>
-
<programlisting language="XML" role="XML"><container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -190,12 +194,11 @@
<property name="swap-directory" value="target/temp/swap/ws" />
<property name="check-sns-new-connection" value="false" />
</properties></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_open_and_close_a_session_properly_to_avoid_memory_leaks">
- <title>How to open and close a session properly to avoid memory leaks?</title>
-
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to open and close a session properly to avoid memory leaks?</term>
+ <listitem>
<programlisting language="Java" role="Java">Session session = repository.login(credentials);
try
{
@@ -205,41 +208,35 @@
{
session.logout();
}</programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Can_I_use_Session_after_loging_out">
- <title>Can I use Session after loging out?</title>
- <para>
- No. Any instance of Session or Node (acquired through session) shouldn't be used after loging out anymore. At least, it is highly recommended not to use.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_JCR_suitable_for_remote_sites_synchronization">
- <title>Is JCR suitable for remote sites\* synchronization?</title>
- <itemizedlist>
- <listitem>
- <para>
- Remote sites can be visualized as different buildings seperated by a WAN network.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_use_lucene_spellchecker">
- <title>How to use lucene spellchecker?</title>
- <para>
- There is few steps:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Enable lucene spellchecker in jcr QueryHandler configuration:
- </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Can I use Session after loging out?</term>
+ <listitem>
+ <para>
+ No. Any instance of Session or Node (acquired through session) shouldn't be used after logging out anymore. At least, it is highly recommended not to use.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Is JCR suitable for remote sites\* synchronization?</term>
+ <listitem>
+ <para>
+ Remote sites can be visualized as different buildings separated by a WAN network.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to use lucene spellchecker?</term>
+ <listitem>
+ <para>
+ There is few steps:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Enable lucene spellchecker in jcr QueryHandler configuration:
+ </para>
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -249,55 +246,55 @@
</properties>
</query-handler></programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- Execute query with rep:spellcheck function and word that is checked:
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Execute query with rep:spellcheck function and word that is checked:
+ </para>
<programlisting language="Java" role="Java">Query query = qm.createQuery("select rep:spellcheck() from nt:base where " + "jcr:path = '/' and spellcheck('word that is checked')", Query.SQL);
RowIterator rows = query.execute().getRows();</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- Fetch a result:
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Fetch a result:
+ </para>
<programlisting language="Java" role="Java">Row r = rows.nextRow();
Value v = r.getValue("rep:spellcheck()");</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- If there is no any results, that means there is no suggestion, so word is correct or spellcheckers dictionary do not contain any words like the checked word.
- </para>
+ </itemizedlist>
+ <para>
+ If there is no any results, that means there is no suggestion, so word is correct or spellcheckers dictionary do not contain any words like the checked word.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How can I affect to spellchecker results?</term>
+ <listitem>
+ <para>
+ There is two parameters in jcr QueryHandler configuration:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Minimal distance between checked word and proposed suggestion;
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_can_I_affect_to_spellchecker_results">
- <title>How can I affect to spellchecker results?</title>
- <para>
- There is two parameters in jcr QueryHandler configuration:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Minimal distance between checked word and proposed suggestion;
- </para>
-
- </listitem>
- <listitem>
- <para>
- Search for more popular suggestions;
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Search for more popular suggestions;
+ </para>
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -309,133 +306,156 @@
</properties>
</query-handler></programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Minimal distance is counted as Levenshtein distance between checked word and spellchecker suggestion.
- </para>
- <para>
- MorePopular paramter affects in next way: If "morePopular" disabled:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the proposed word exists in the directory - no suggestion given;
- </para>
+ </itemizedlist>
+ <para>
+ Minimal distance is counted as Levenshtein distance between checked word and spellchecker suggestion.
+ </para>
+ <para>
+ MorePopular paramter affects in next way: If "morePopular" disabled:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the proposed word exists in the directory - no suggestion given;
+ </para>
- </listitem>
- <listitem>
- <para>
- If the proposed word doesn't exist in the directory - propose the closed word;
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the proposed word doesn't exist in the directory - propose the closed word;
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- If "morePopular" enabled:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- No matter word exists or not, checker will propose the closed word that is more popular than the checked word.
- </para>
+ </itemizedlist>
+ <para>
+ If "morePopular" enabled:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ No matter word exists or not, checker will propose the closed word that is more popular than the checked word.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
- </section>
-
-
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term></term>
+ <listitem>
+ <para>
+
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+
+
+
+ </variablelist>
</section>
<section id="sect-Reference_Guide-JCR-JCR_extensions">
<title>JCR extensions</title>
- <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_repository_to_existing_repository_">
- <title>How to restore repository to existing repository ?</title>
- <orderedlist>
- <listitem>
- <para>
- Remove existing repository, use:
- </para>
-
-<programlisting language="Java" role="Java">RepositoryService.removeRepository(String repositoryName)</programlisting>
+
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>How to restore repository to existing repository ?</term>
+ <listitem>
+ <orderedlist>
+ <listitem>
+ <para>
+ Remove existing repository, use:
+ </para>
+
+ <programlisting language="Java" role="Java">RepositoryService.removeRepository(String repositoryName)</programlisting>
- </listitem>
- <listitem>
- <para>
- Restore repository, use
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Restore repository, use
+ </para>
<programlisting language="Java" role="Java">BackupManager.restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous)</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_workspace_to_existing_worksapce">
- <title>How to restore workspace to existing worksapce?</title>
- <orderedlist>
- <listitem>
- <para>
- Remove existing workspace, use:
- </para>
+ </orderedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to restore workspace to existing workspace?</term>
+ <listitem>
+ <orderedlist>
+ <listitem>
+ <para>
+ Remove existing workspace, use:
+ </para>
<programlisting language="Java" role="Java">ManageableRepository.removeWorkspace(String workspaceName)</programlisting>
- </listitem>
- <listitem>
- <para>
- Restore workspace, use:
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Restore workspace, use:
+ </para>
<programlisting language="Java" role="Java">BackupManager.restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous)</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_extensions-Does_JCR_support_hot_backup">
- <title>Does JCR support hot backup?</title>
- <para>
- Yes, JCR is support hot backup. Will use org.exoplatform.services.jcr.ext.backup.BackupManager.
- </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Does JCR support hot backup?</term>
+ <listitem>
+ <para>
+ Yes, JCR is support hot backup. Will use org.exoplatform.services.jcr.ext.backup.BackupManager.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
+
+ </variablelist>
- </section>
-
-
</section>
<section id="sect-Reference_Guide-JCR-WebDAV">
<title>WebDAV</title>
- <section id="sect-Reference_Guide-WebDAV-I_uploaded_a_file_to_WebDAV_server_using_Mac_OS_Finder_but_the_file_size_is_0_what_is_wrong_">
- <title>I uploaded a file to WebDAV server using Mac OS Finder, but the file size is '0', what is wrong ?</title>
- <para>
- This is known as a finder bug started from Mac OS v.10.5.3 and not yet fixed, .
- </para>
- <para>
- For more details follow:&nbsp; <ulink url="http://discussions.apple.com/thread.jspa?threadID=1538882&start=0&...">Apple Disscussion thread.</ulink>
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-Can_I_manage_cache_control_value_for_different_media_types_from_server_configuration_">
- <title>Can I manage 'cache-control' value for different media-types from server configuration ?</title>
- <para>
- Use "cache-control" configuration parameter.
- </para>
- <para>
- The value of this parameter must contain colon-separated pairs "MediaType:cache-control value"
- </para>
- <para>
- For example, if you need to cache all text/xml and text/plain files for 5 minutes (300 sec.) and other text/\* files for 10 minutes (600 sec.), use the next configuration:
- </para>
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>I uploaded a file to WebDAV server using Mac OS Finder, but the file size is '0', what is wrong?</term>
+ <listitem>
+ <para>
+ This is known as a finder bug started from Mac OS v.10.5.3 and not yet fixed, .
+ </para>
+ <para>
+ For more details follow:&nbsp; <ulink url="http://discussions.apple.com/thread.jspa?threadID=1538882&start=0&...">Apple Discussion thread.</ulink>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Can I manage 'cache-control' value for different media-types from server configuration?</term>
+ <listitem>
+ <para>
+ Use "cache-control" configuration parameter.
+ </para>
+ <para>
+ The value of this parameter must contain colon-separated pairs "MediaType:cache-control value"
+ </para>
+ <para>
+ For example, if you need to cache all text/xml and text/plain files for 5 minutes (300 sec.) and other text/\* files for 10 minutes (600 sec.), use the next configuration:
+ </para>
<programlisting language="XML" role="XML"><component>
<type>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</type>
@@ -447,81 +467,76 @@
<init-params>
<component>
</programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-How_to_perform_WebDAV_requests_using_curl_">
- <title>How to perform WebDAV requests using curl ?</title>
- <para>
- Simple Requests
- </para>
- <para>
- For simple request such as: GET, HEAD, MKCOL, COPY, MOVE, DELETE, CHECKIN, CHECKOUT, UNCHECKOUT, LOCK, UNLOCK, VERSIONCONTROL, OPTIONS
- </para>
- <para>
- perform:
- </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How to perform WebDAV requests using curl?</term>
+ <listitem>
+ <para>
+ Simple Requests
+ </para>
+ <para>
+ For simple request such as: GET, HEAD, MKCOL, COPY, MOVE, DELETE, CHECKIN, CHECKOUT, UNCHECKOUT, LOCK, UNLOCK, VERSIONCONTROL, OPTIONS
+ </para>
+ <para>
+ perform:
+ </para>
<programlisting>curl -i -u 'user:pass' -X 'METHOD_NAME' 'resource_url'</programlisting>
- <para>
- for example to create a folder named test perform:
- </para>
+ <para>
+ for example to create a folder named test perform:
+ </para>
<programlisting>curl -i -u 'root:exo' -X MKCOL 'http://localhost:8080/rest/jcr/repository/production/test</programlisting>
- <para>
- to PUT a test.txt file from your current folder to "test "folder on server perform:
- </para>
+ <para>
+ to PUT a test.txt file from your current folder to "test "folder on server perform:
+ </para>
<programlisting>curl -i -u 'root:exo' -X PUT 'http://localhost:8080/rest/jcr/repository/production/test/test.txt' -d @test.txt</programlisting>
- <para>
- Requests with XML body
- </para>
- <para>
- For requests which contains xml body such as: ORDER, PROPFIND, PROPPATCH, REPORT, SEARCH
- </para>
- <para>
- add <emphasis role="bold">-d 'xml_body text'</emphasis> or <emphasis role="bold">-d @body.xml</emphasis>
- </para>
- <para>
- (body.xml must contain a valid xml request bidy.) to you curl-command:
- </para>
+ <para>
+ Requests with XML body
+ </para>
+ <para>
+ For requests which contains xml body such as: ORDER, PROPFIND, PROPPATCH, REPORT, SEARCH
+ </para>
+ <para>
+ add <emphasis role="bold">-d 'xml_body text'</emphasis> or <emphasis role="bold">-d @body.xml</emphasis>
+ </para>
+ <para>
+ (body.xml must contain a valid xml request body.) to you curl-command:
+ </para>
<programlisting>curl -i -u 'user:pass' -X 'METHOD_NAME' -H 'Headers' 'resource_url' -d 'xml_body text'</programlisting>
- <para>
- For example about finding all files containing "test" perform:
- </para>
+ <para>
+ For example about finding all files containing "test" perform:
+ </para>
<programlisting>curl -i -u "root:exo" -X "SEARCH" "http://192.168.0.7:8080/rest/jcr/repository/production/" -d
"<?xml version='1.0' encoding='UTF-8' ?>
<D:searchrequest xmlns:D='DAV:'>
<D:sql>SELECT * FROM nt:base WHERE contains(*, 'text')</D:sql>
</D:searchrequest>"</programlisting>
- <para>
- If you need to add some headers to your request, use \-H key.
- </para>
- <para>
- To have more information about methods parameters, you can find in <ulink url="http://www.ietf.org/rfc/rfc2518.txt">HTTP Extensions for Distributed Authoring</ulink> specification.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-How_eXo_JCR_WebDAV_server_treats_content_encoding">
- <title>How eXo JCR WebDAV server treats content encoding?</title>
- <para>
- OS client (Windows, Linux etc) doesn't set an encoding in a request. But eXo JCR WebDAV server looks for an encoding in a Content-Type header and set it to jcr:encoding. See <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,</ulink> 14.17 Content-Type. e.g. Content-Type: text/html; charset=ISO-8859-4 So, if a client will set Content-Type header, e.g. JS code from a page, it will works for a text file as expected.
- </para>
- <para>
- If WebDAV request doesn't contain a content encoding, it's possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, e.g. based on IP or user preferences.
- </para>
-
- </section>
-
-
+ <para>
+ If you need to add some headers to your request, use \-H key.
+ </para>
+ <para>
+ To have more information about methods parameters, you can find in <ulink url="http://www.ietf.org/rfc/rfc2518.txt">HTTP Extensions for Distributed Authoring</ulink> specification.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>How eXo JCR WebDAV server treats content encoding?</term>
+ <listitem>
+ <para>
+ OS client (Windows, Linux etc) doesn't set an encoding in a request. But eXo JCR WebDAV server looks for an encoding in a Content-Type header and set it to jcr:encoding. See <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,</ulink> 14.17 Content-Type. e.g. Content-Type: text/html; charset=ISO-8859-4 So, if a client will set Content-Type header, e.g. JS code from a page, it will works for a text file as expected.
+ </para>
+ <para>
+ If WebDAV request doesn't contain a content encoding, it's possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, e.g. based on IP or user preferences.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
-
-
- </section>
-
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/nodetypes-and-namespaces.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/nodetypes-and-namespaces.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/nodetypes-and-namespaces.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,24 +4,24 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Node_Types_and_Namespaces">
- <title>Node Types and Namespaces</title>
- <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Introduction">
- <title>Introduction</title>
- <para>
- Support of node types and namespaces is required by the JSR-170 specification. Beyond the methods required by the specification, eXo JCR has its own API extension for the <xref linkend="sect-Reference_Guide-NodeType_Registration" /> as well as the ability to declaratively define node types in the Repository at the start-up time.
- </para>
+ <title>Node Types and Namespaces</title>
+ <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Introduction">
+ <title>Introduction</title>
+ <para>
+ Support of node types and namespaces is required by the JSR-170 specification. Beyond the methods required by the specification, eXo JCR has its own API extension for the <xref linkend="sect-Reference_Guide-NodeType_Registration" /> as well as the ability to declaratively define node types in the Repository at the start-up time.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Node_Types_definition">
- <title>Node Types definition</title>
- <para>
- Node type registration extension is declared in org.exoplatform.services.jcr.core.nodetype.ExtendedNodeTypeManager interface
- </para>
- <para>
- Your custom service can register some neccessary predefined node types at the start-up time. The node definition should be placed in a special XML file (see DTD below) and declared in the service's configuration file thanks to eXo component plugin mechanism, described as follows:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Node_Types_definition">
+ <title>Node Types definition</title>
+ <para>
+ Node type registration extension is declared in org.exoplatform.services.jcr.core.nodetype.ExtendedNodeTypeManager interface
+ </para>
+ <para>
+ Your custom service can register some necessary predefined node types at the start-up time. The node definition should be placed in a special XML file (see DTD below) and declared in the service's configuration file thanks to eXo component plugin mechanism, described as follows:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
<component-plugin>
@@ -47,13 +47,13 @@
</values-param>
</init-params>
</component-plugin></programlisting>
- <para>
- There are two types of registration. The first type is the registration of node types in all created repositories, it is configured in values-param with the name <emphasis role="bold">autoCreatedInNewRepository</emphasis>. The second type is registration of node types in specified repository and it is configured in values-param with the name of repository.
- </para>
- <para>
- Node type definition file format:
- </para>
-
+ <para>
+ There are two types of registration. The first type is the registration of node types in all created repositories, it is configured in values-param with the name <emphasis role="bold">autoCreatedInNewRepository</emphasis>. The second type is registration of node types in specified repository and it is configured in values-param with the name of repository.
+ </para>
+ <para>
+ Node type definition file format:
+ </para>
+
<programlisting language="XML" role="XML"> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nodeTypes [
<!ELEMENT nodeTypes (nodeType)*>
@@ -105,17 +105,17 @@
<!ELEMENT requiredPrimaryType (CDATA)>
]></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Namespaces_definition">
- <title>Namespaces definition</title>
- <para>
- Default namespaces are registered by repository at the start-up time
- </para>
- <para>
- Your custom service can extend a set of namespaces with some application specific ones, declaring it in service's configuration file thanks to eXo component plugin mechanism, described as follows:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Node_Types_and_Namespaces-Namespaces_definition">
+ <title>Namespaces definition</title>
+ <para>
+ Default namespaces are registered by repository at the start-up time
+ </para>
+ <para>
+ Your custom service can extend a set of namespaces with some application specific ones, declaring it in service's configuration file thanks to eXo component plugin mechanism, described as follows:
+ </para>
+
<programlisting language="XML" role="XML"> <component-plugin>
<name>add.namespaces</name>
<set-method>addPlugin</set-method>
@@ -128,7 +128,7 @@
</init-params>
</component-plugin></programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container-howto.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container-howto.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container-howto.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,79 +4,79 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-How_to_implement_Workspace_Data_Container">
- <title>How-to implement Workspace Data Container</title>
- <section id="sect-Reference_Guide-How_to_implement_Workspace_Data_Container-Short_intro_about_Workspace_data_container_implementation_practices">
- <title>Short intro about Workspace data container implementation practices:</title>
- <orderedlist>
- <listitem>
- <para>
- Read a bit about the <xref linkend="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract" />.
- </para>
+ <title>How-to implement Workspace Data Container</title>
+ <section id="sect-Reference_Guide-How_to_implement_Workspace_Data_Container-Short_intro_about_Workspace_data_container_implementation_practices">
+ <title>Short intro about Workspace data container implementation practices:</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Read a bit about the <xref linkend="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract" />.
+ </para>
- </listitem>
- <listitem>
- <para>
- Start new implementation project pom.xml with org.exoplatform.jcr parent. (optional, but will makes the development easy)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Start new implementation project pom.xml with org.exoplatform.jcr parent. (optional, but will makes the development easy)
+ </para>
- </listitem>
- <listitem>
- <para>
- Update sources of JCR Core and read JavaDoc on <emphasis role="bold">org.exoplatform.services.jcr.storage.WorkspaceDataContainer</emphasis> and <emphasis role="bold">org.exoplatform.services.jcr.storage.WorkspaceStorageConnection</emphasis> interfaces. They are the main part for the implemenation.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Update sources of JCR Core and read JavaDoc on <emphasis role="bold">org.exoplatform.services.jcr.storage.WorkspaceDataContainer</emphasis> and <emphasis role="bold">org.exoplatform.services.jcr.storage.WorkspaceStorageConnection</emphasis> interfaces. They are the main part for the implementation.
+ </para>
- </listitem>
- <listitem>
- <para>
- Look at <emphasis role="bold">org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager</emphasis> sourcecode, check how data menager uses container and its connections (see in save() method)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Look at <emphasis role="bold">org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager</emphasis> sourcecode, check how data manager uses container and its connections (see in save() method)
+ </para>
- </listitem>
- <listitem>
- <para>
- Create <emphasis role="bold">WorkspaceStorageConnection</emphasis> dummy implementation class. It's freeform class, but to be close to the eXo JCR, check how to implement JDBC or SimpleDB containers ( <emphasis role="bold">org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection</emphasis> and <emphasis role="bold">org.exoplatform.services.jcr.aws.storage.sdb.SDBWorkspaceStorageConnection</emphasis>). Take in account usage of <emphasis role="bold">ValueStoragePluginProvider</emphasis> in both implementations.Value storage is an useful option for production versions. But leave it to the end of implementation work.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Create <emphasis role="bold">WorkspaceStorageConnection</emphasis> dummy implementation class. It's freeform class, but to be close to the eXo JCR, check how to implement JDBC or SimpleDB containers ( <emphasis role="bold">org.exoplatform.services.jcr.impl.storage.jdbc.JDBCStorageConnection</emphasis> and <emphasis role="bold">org.exoplatform.services.jcr.aws.storage.sdb.SDBWorkspaceStorageConnection</emphasis>). Take in account usage of <emphasis role="bold">ValueStoragePluginProvider</emphasis> in both implementations.Value storage is an useful option for production versions. But leave it to the end of implementation work.
+ </para>
- </listitem>
- <listitem>
- <para>
- Create the connection implementation unit tests to play TTD. (optional, but takes many benefits for the process)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Create the connection implementation unit tests to play TTD. (optional, but takes many benefits for the process)
+ </para>
- </listitem>
- <listitem>
- <para>
- Implement CRUD starting from the read to write etc. Test the methods by using the external implementation ways of data read/write in your backend.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Implement CRUD starting from the read to write etc. Test the methods by using the external implementation ways of data read/write in your backend.
+ </para>
- </listitem>
- <listitem>
- <para>
- When all methods of the connection done start <emphasis role="bold">WorkspaceDataContainer</emphasis>. Container class is very simple, it's like a factory for the connections only.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ When all methods of the connection done start <emphasis role="bold">WorkspaceDataContainer</emphasis>. Container class is very simple, it's like a factory for the connections only.
+ </para>
- </listitem>
- <listitem>
- <para>
- Care about container reuseConnection(WorkspaceStorageConnection) method logic. For some backends, it cab be same as openConnection(), but for some others, it's important to reuse physical backend connection, e.g. to be in the same transaction - see JDBC container.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Care about container reuseConnection(WorkspaceStorageConnection) method logic. For some backends, it cab be same as openConnection(), but for some others, it's important to reuse physical backend connection, e.g. to be in the same transaction - see JDBC container.
+ </para>
- </listitem>
- <listitem>
- <para>
- It's almost ready to use in data manager. Start another test and go on.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ It's almost ready to use in data manager. Start another test and go on.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- <para>
- When the container will be ready to run as JCR persistence storage (e.g. for this level testing), it should be configured in Repository configuration.
- </para>
- <para>
- Assuming that our new implementation class name is <emphasis role="bold">org.project.jcr.impl.storage.MyWorkspaceDataContainer</emphasis>.
- </para>
-
+ </orderedlist>
+ <para>
+ When the container will be ready to run as JCR persistence storage (e.g. for this level testing), it should be configured in Repository configuration.
+ </para>
+ <para>
+ Assuming that our new implementation class name is <emphasis role="bold">org.project.jcr.impl.storage.MyWorkspaceDataContainer</emphasis>.
+ </para>
+
<programlisting language="XML" role="XML"> <repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="production" default-workspace="production">
@@ -96,21 +96,21 @@
</container>
</programlisting>
- <para>
- Container can be configured by using set properties.
- </para>
+ <para>
+ Container can be configured by using set properties.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-How_to_implement_Workspace_Data_Container-Notes_on_Value_storage_usage">
- <title>Notes on Value storage usage:</title>
- <para>
- Value storages are pluggable to the container but if they are used, the container implementation should respect set of interfaces and external storage usage principles.
- </para>
- <para>
- If the container has <emphasis role="bold">ValueStoragePluginProvider</emphasis> (e.g. via constructor), it's just a few methods to manipulate external Values data.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_implement_Workspace_Data_Container-Notes_on_Value_storage_usage">
+ <title>Notes on Value storage usage:</title>
+ <para>
+ Value storages are pluggable to the container but if they are used, the container implementation should respect set of interfaces and external storage usage principles.
+ </para>
+ <para>
+ If the container has <emphasis role="bold">ValueStoragePluginProvider</emphasis> (e.g. via constructor), it's just a few methods to manipulate external Values data.
+ </para>
+
<programlisting language="Java" role="Java">// get channel for ValueData write (add or update)
ValueIOChannel channel = valueStorageProvider.getApplicableChannel(data, i);
if (channel == null) {
@@ -133,15 +133,15 @@
ValueData vdata = channel.read(propertyData.getIdentifier(), orderNumber, maxBufferSize);
</programlisting>
- <important>
- <title>Important</title>
- <para>
- After a sequence of write and/or delete operations on the storage channel, the channel should be committed (or rolled back on an error). See <emphasis role="bold">ValueIOChannel.commit()</emphasis> and <emphasis role="bold">ValueIOChannel.rollback()</emphasis> and how those methods are used in JDBC container.
- </para>
+ <important>
+ <title>Important</title>
+ <para>
+ After a sequence of write and/or delete operations on the storage channel, the channel should be committed (or rolled back on an error). See <emphasis role="bold">ValueIOChannel.commit()</emphasis> and <emphasis role="bold">ValueIOChannel.rollback()</emphasis> and how those methods are used in JDBC container.
+ </para>
- </important>
+ </important>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/data-container.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,608 +4,608 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract">
- <title>JCR Workspace Data Container (architecture contract)</title>
- <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Goals">
- <title>Goals</title>
- <itemizedlist>
- <listitem>
- <para>
- Cover the requirements on Workspace Data Container implementation
- </para>
+ <title>JCR Workspace Data Container (architecture contract)</title>
+ <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Goals">
+ <title>Goals</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Cover the requirements on Workspace Data Container implementation
+ </para>
- </listitem>
- <listitem>
- <para>
- Describe container life cycle
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Describe container life cycle
+ </para>
- </listitem>
- <listitem>
- <para>
- Describe relations between container and high-level DataManagers
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Describe relations between container and high-level DataManagers
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Concepts">
- <title>Concepts</title>
- <section id="sect-Reference_Guide-Concepts-Container_and_connection">
- <title>Container and connection</title>
- <para>
- Workspace Data Container (container) serves Repository Workspace persistent storage. WorkspacePersistentDataManager (data manager) uses container to perform CRUD operation on the persistent storage. Accessing to the storage in the data manager is implemented via storage connection obtained from the container (WorkspaceDataContainer interface implemenatiton). Each connection represents a transaction on the storage. Storage Connection (connection) should be an implementation of WorkspaceStorageConnection.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Container acts as a factory of a new storage connections. Usually, this method is designed to be synchronized to avoid possible concurrent issues.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Concepts">
+ <title>Concepts</title>
+ <section id="sect-Reference_Guide-Concepts-Container_and_connection">
+ <title>Container and connection</title>
+ <para>
+ Workspace Data Container (container) serves Repository Workspace persistent storage. WorkspacePersistentDataManager (data manager) uses container to perform CRUD operation on the persistent storage. Accessing to the storage in the data manager is implemented via storage connection obtained from the container (WorkspaceDataContainer interface implementation). Each connection represents a transaction on the storage. Storage Connection (connection) should be an implementation of WorkspaceStorageConnection.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Container acts as a factory of a new storage connections. Usually, this method is designed to be synchronized to avoid possible concurrent issues.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">WorkspaceStorageConnection openConnection() throws RepositoryException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Open read-only WorkspaceStorageConnection. Read-only connections can be potentially a bit faster in some cases.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Open read-only WorkspaceStorageConnection. Read-only connections can be potentially a bit faster in some cases.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">WorkspaceStorageConnection openConnection(boolean readOnly) throws RepositoryException;
</programlisting>
- <note>
- <title>*EXPERIMENTAL*</title>
- <para>
- Read-only WorkspaceStorageConnection is experimental feature and not currently handled in JCR. Actually, such connections didn't prove their performance, so JCR Core doesn't use them.
- </para>
+ <note>
+ <title>*EXPERIMENTAL*</title>
+ <para>
+ Read-only WorkspaceStorageConnection is experimental feature and not currently handled in JCR. Actually, such connections didn't prove their performance, so JCR Core doesn't use them.
+ </para>
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Storage connection might also be reused. This means reuse of physical resource (e.g. JDBC Connection) allocated by one connection in another. This feature is used in a data manager for saving ordinary and system changes on the system Workspace. But the reuse is an optional feature and it can work, otherwise a new connection will open.
- </para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Storage connection might also be reused. This means reuse of physical resource (e.g. JDBC Connection) allocated by one connection in another. This feature is used in a data manager for saving ordinary and system changes on the system Workspace. But the reuse is an optional feature and it can work, otherwise a new connection will open.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">WorkspaceStorageConnection reuseConnection(WorkspaceStorageConnection original) throws RepositoryException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- When checking Same-Name Siblings (SNS) existence, JCR Core can use new connection or not. This is defined via Workspace Data Container configuration and retrieved by using a special method.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ When checking Same-Name Siblings (SNS) existence, JCR Core can use new connection or not. This is defined via Workspace Data Container configuration and retrieved by using a special method.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">boolean isCheckSNSNewConnection();
</programlisting>
- <para>
- Container initialization is only based on a configuration. After the container has been created, it's not possible to change parameters. Configuration consists of implementation class and set of properties and Value Storages configuration.
- </para>
+ <para>
+ Container initialization is only based on a configuration. After the container has been created, it's not possible to change parameters. Configuration consists of implementation class and set of properties and Value Storages configuration.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Concepts-Value_storages">
- <title>Value storages</title>
- <para>
- Container provides optional special mechanism for Value storing. It's possible to configure external Value Storages via container configuration (available only via configuration). Value Storage works as fully independent pluggable storage. All required parameters storage obtains from its configuration. Some storages are possible for one container. Configuration describes such parameters as ValueStoragePluginimplementation class, set of implementation specific properties and filters. The filters declares criteria for Value matching to the storage. Only matched Property Values will be stored. So, in common case, the storage might contains only the part of the Workspace content. Value Storages are very useful for BLOB storing. E.g. storing on the File System instead of a database.
- </para>
- <para>
- Container obtains Values Storages from ValueStoragePluginProvider component. Provider acts as a factory of Value channels (ValueIOChannel). Channel provides all CRUD operation for Value Storage respecting the transaction manner of work (how it can be possible due to implementation specifics of the storages).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Concepts-Value_storages">
+ <title>Value storages</title>
+ <para>
+ Container provides optional special mechanism for Value storing. It's possible to configure external Value Storages via container configuration (available only via configuration). Value Storage works as fully independent pluggable storage. All required parameters storage obtains from its configuration. Some storages are possible for one container. Configuration describes such parameters as ValueStoragePluginimplementation class, set of implementation specific properties and filters. The filters declares criteria for Value matching to the storage. Only matched Property Values will be stored. So, in common case, the storage might contains only the part of the Workspace content. Value Storages are very useful for BLOB storing. E.g. storing on the File System instead of a database.
+ </para>
+ <para>
+ Container obtains Values Storages from ValueStoragePluginProvider component. Provider acts as a factory of Value channels (ValueIOChannel). Channel provides all CRUD operation for Value Storage respecting the transaction manner of work (how it can be possible due to implementation specifics of the storages).
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Concepts-Lifecycle">
- <title>Lifecycle</title>
- <para>
- Container is used for read and write operations by data manager. Read operations (getters) uses connection once and close it on the finally. Write operations performs in commit method as a sequence of creating/ updating calls and final commit (or rollback on error). Writes uses one connection (or two - another for system workspace) per commit call. One connection guaranties transaction support for write operations. Commit or rollback should free/clean all resources consumed by the container (connection).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Concepts-Lifecycle">
+ <title>Lifecycle</title>
+ <para>
+ Container is used for read and write operations by data manager. Read operations (getters) uses connection once and close it on the finally. Write operations performs in commit method as a sequence of creating/ updating calls and final commit (or rollback on error). Writes uses one connection (or two - another for system workspace) per commit call. One connection guaranties transaction support for write operations. Commit or rollback should free/clean all resources consumed by the container (connection).
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Concepts-Value_storage_lifecycle">
- <title>Value storage lifecycle</title>
- <para>
- Value storage is used from the container inside. Reads are related to a container reads. Writes are commit-related. Container (connection) implementation should use transaction capabilities of the storages in the same way as for other operations.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Concepts-Value_storage_lifecycle">
+ <title>Value storage lifecycle</title>
+ <para>
+ Value storage is used from the container inside. Reads are related to a container reads. Writes are commit-related. Container (connection) implementation should use transaction capabilities of the storages in the same way as for other operations.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Requirements">
- <title>Requirements</title>
- <para>
- Connection creation and reuse should be a thread safe operation. Connection provides CRUD operations support on the storage.
- </para>
- <section id="sect-Reference_Guide-Requirements-Read_operations">
- <title>Read operations</title>
- <itemizedlist>
- <listitem>
- <para>
- Read ItemData from the storage by item identifier.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Requirements">
+ <title>Requirements</title>
+ <para>
+ Connection creation and reuse should be a thread safe operation. Connection provides CRUD operations support on the storage.
+ </para>
+ <section id="sect-Reference_Guide-Requirements-Read_operations">
+ <title>Read operations</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Read ItemData from the storage by item identifier.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">ItemData getItemData(String identifier) throws RepositoryException, IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Read ItemData from the storage by using the parent and name of the item, related to the parent location.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Read ItemData from the storage by using the parent and name of the item, related to the parent location.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Read List of NodeData from the storage by using the parent location of the item.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Read List of NodeData from the storage by using the parent location of the item.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Reads List of PropertyData from the storage by using the parent location of the item.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Reads List of PropertyData from the storage by using the parent location of the item.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Reads List of PropertyData with empty ValueData from the storage by using the parent location of the item.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Reads List of PropertyData with empty ValueData from the storage by using the parent location of the item.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- This methiod specially dedicated for non-content modification operations (e.g. Items delete).
- </para>
-
+ </itemizedlist>
+ <para>
+ This method specially dedicated for non-content modification operations (e.g. Items delete).
+ </para>
+
<programlisting language="Java" role="Java">List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Reads List of PropertyData from the storage by using the parent location of the item.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Reads List of PropertyData from the storage by using the parent location of the item.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- It's REFERENCE type: Properties referencing Node with given nodeIdentifier. See more in javax.jcr.Node.getReferences()
- </para>
-
+ </itemizedlist>
+ <para>
+ It's REFERENCE type: Properties referencing Node with given nodeIdentifier. See more in javax.jcr.Node.getReferences()
+ </para>
+
<programlisting language="Java" role="Java">List<PropertyData> getReferencesData(String nodeIdentifier) throws RepositoryException,IllegalStateException,UnsupportedOperationException;
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Requirements-Write_operations">
- <title>Write operations</title>
- <itemizedlist>
- <listitem>
- <para>
- Add single NodeData.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Requirements-Write_operations">
+ <title>Write operations</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add single NodeData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void add(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Add single PropertyData.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add single PropertyData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void add(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Update NodeData.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Update NodeData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void update(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Update PropertyData.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Update PropertyData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void update(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Rename NodeData by using Node identifier and new name and indexing from the data.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Rename NodeData by using Node identifier and new name and indexing from the data.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void rename(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Delete NodeData.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Delete NodeData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void delete(NodeData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Delete PropertyData.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Delete PropertyData.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void delete(PropertyData data) throws RepositoryException,UnsupportedOperationException,InvalidItemStateException,IllegalStateException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Persist changes and closes connection. It can be database transaction commit for instance etc.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Persist changes and closes connection. It can be database transaction commit for instance etc.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void commit() throws IllegalStateException, RepositoryException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Refuse persistent changes and closes connection. It can be database transaction rollback for instance etc.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Refuse persistent changes and closes connection. It can be database transaction rollback for instance etc.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void rollback() throws IllegalStateException, RepositoryException;
</programlisting>
- <para>
- All methods throw IllegalStateException if connection is closed. UnsupportedOperationException if the method is not supported (e.g. JCR Level 1 implementation etc). RepositoryException if some errors occur during preparation, validation or persistence.
- </para>
+ <para>
+ All methods throw IllegalStateException if connection is closed. UnsupportedOperationException if the method is not supported (e.g. JCR Level 1 implementation etc). RepositoryException if some errors occur during preparation, validation or persistence.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Requirements-State_operations">
- <title>State operations</title>
- <itemizedlist>
- <listitem>
- <para>
- Return true if connection can be used.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Requirements-State_operations">
+ <title>State operations</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Return true if connection can be used.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">boolean isOpened();
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Requirements-Validation_of_write_operations">
- <title>Validation of write operations</title>
- <para>
- Container has to care about storage consistency (JCR constraints) on write operations: (InvalidItemStateException should be thrown according the spec). At least, the following checks should be performed:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- On ADD errors
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Parent not found. Condition: Parent ID (Item with ID is not exists).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Requirements-Validation_of_write_operations">
+ <title>Validation of write operations</title>
+ <para>
+ Container has to care about storage consistency (JCR constraints) on write operations: (InvalidItemStateException should be thrown according the spec). At least, the following checks should be performed:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ On ADD errors
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Parent not found. Condition: Parent ID (Item with ID is not exists).
+ </para>
- </listitem>
- <listitem>
- <para>
- Item already exists. Condition: ID (Item with ID already exists).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Item already exists. Condition: ID (Item with ID already exists).
+ </para>
- </listitem>
- <listitem>
- <para>
- Item already exists. Condition: Parent ID, Name, Index (Item with parent ID, name and index already exists).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Item already exists. Condition: Parent ID, Name, Index (Item with parent ID, name and index already exists).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- On DELETE errors
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Item not found. Condition ID.
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ On DELETE errors
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Item not found. Condition ID.
+ </para>
- </listitem>
- <listitem>
- <para>
- Can not delete parent till children exists.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Can not delete parent till children exists.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- On UPDATE errors
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Item not found. Condition ID.
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ On UPDATE errors
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Item not found. Condition ID.
+ </para>
- </listitem>
- <listitem>
- <para>
- Item already exists with higher Version. Condition: ID, Version (Some Session had updated Item with ID prior this update).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Item already exists with higher Version. Condition: ID, Version (Some Session had updated Item with ID prior this update).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Requirements-Consistency_of_save">
- <title>Consistency of save</title>
- <para>
- The container (connection) should implement consistency of Commit (Rollback) in <emphasis role="bold">transaction manner</emphasis>. I.e. If a set of operations was performed <emphasis role="bold">before</emphasis> the future <emphasis role="bold">Commit</emphasis> and another next operation <emphasis role="bold">fails</emphasis>. <emphasis role="bold">It should be possible to</emphasis> rollback applied changes using <emphasis role="bold">Rollback</emphasis> command.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Requirements-Consistency_of_save">
+ <title>Consistency of save</title>
+ <para>
+ The container (connection) should implement consistency of Commit (Rollback) in <emphasis role="bold">transaction manner</emphasis>. I.e. If a set of operations was performed <emphasis role="bold">before</emphasis> the future <emphasis role="bold">Commit</emphasis> and another next operation <emphasis role="bold">fails</emphasis>. <emphasis role="bold">It should be possible to</emphasis> rollback applied changes using <emphasis role="bold">Rollback</emphasis> command.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Value_storages_API">
- <title>Value storages API</title>
- <section id="sect-Reference_Guide-Value_storages_API-Storages_provider">
- <title>Storages provider:</title>
- <para>
- Container implementation obtains Values Storages option via ValueStoragePluginProvider component. Provider acts as a factory of Value channels (ValueIOChannel) and has two methods for this purpose:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Return ValueIOChannel matched this property and valueOrderNumer. Null will be returned if no channel matches.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Workspace_Data_Container_architecture_contract-Value_storages_API">
+ <title>Value storages API</title>
+ <section id="sect-Reference_Guide-Value_storages_API-Storages_provider">
+ <title>Storages provider:</title>
+ <para>
+ Container implementation obtains Values Storages option via ValueStoragePluginProvider component. Provider acts as a factory of Value channels (ValueIOChannel) and has two methods for this purpose:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Return ValueIOChannel matched this property and valueOrderNumer. Null will be returned if no channel matches.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Return ValueIOChannel associated with given storageId.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Return ValueIOChannel associated with given storageId.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">ValueIOChannel getChannel(String storageId) throws IOException, ValueStorageNotFoundException;
</programlisting>
- <para>
- There is also method for consistency check, but this method doesn't used anywhere and storage implementations has it empty.
- </para>
+ <para>
+ There is also method for consistency check, but this method doesn't used anywhere and storage implementations has it empty.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Value_storages_API-Value_storage_plugin">
- <title>Value storage plugin</title>
- <para>
- Provider implementation should use ValueStoragePlugin abstract class as a base for all storage implementations. Plugin provides support for provider implementation methods. Plugin's methods should be implemented:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Initialize this plugin. Used at start time in ValueStoragePluginProvider.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Value_storages_API-Value_storage_plugin">
+ <title>Value storage plugin</title>
+ <para>
+ Provider implementation should use ValueStoragePlugin abstract class as a base for all storage implementations. Plugin provides support for provider implementation methods. Plugin's methods should be implemented:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Initialize this plugin. Used at start time in ValueStoragePluginProvider.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">public abstract void init(Properties props, ValueDataResourceHolder resources) throws RepositoryConfigurationException, IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Open ValueIOChannel.Used in ValueStoragePluginProvider.getApplicableChannel(PropertyData, int) and getChannel(String)
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Open ValueIOChannel.Used in ValueStoragePluginProvider.getApplicableChannel(PropertyData, int) and getChannel(String)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">public abstract ValueIOChannel openIOChannel() throws IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Return true if this storage has the same storageId.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Return true if this storage has the same storageId.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">public abstract boolean isSame(String valueDataDescriptor);
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Value_storages_API-Value_IO_channel">
- <title>Value I/O channel</title>
- <para>
- Channel should implement ValueIOChannel interface. CRUD operation for Value Storage:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Read Property value.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Value_storages_API-Value_IO_channel">
+ <title>Value I/O channel</title>
+ <para>
+ Channel should implement ValueIOChannel interface. CRUD operation for Value Storage:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Read Property value.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">ValueData read(String propertyId, int orderNumber, int maxBufferSize) throws IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Add or update Property value.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add or update Property value.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void write(String propertyId, ValueData data) throws IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Delete Property all values.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Delete Property all values.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void delete(String propertyId) throws IOException;
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Value_storages_API-Transaction_support_via_channel">
- <title>Transaction support via channel</title>
- <para>
- Modification operations should be applied only when commiting. Rollback is required for data created cleanup.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Commit channel changes.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Value_storages_API-Transaction_support_via_channel">
+ <title>Transaction support via channel</title>
+ <para>
+ Modification operations should be applied only when committing. Rollback is required for data created cleanup.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Commit channel changes.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void commit() throws IOException;
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Rollback channel changes.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Rollback channel changes.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">void rollback() throws IOException;
</programlisting>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -66,7 +66,7 @@
<section id="sect-Reference_Guide-JBoss_Cache_configuration-Shipped_JBoss_Cache_configuration_templates">
<title>Shipped JBoss Cache configuration templates</title>
<para>
- eXo JCR implementation is shipped with ready-to-use JBoss Cache configuration templates for JCR's components. They are situated in application package in /conf/porta/ folder.
+ eXo JCR implementation is shipped with ready-to-use JBoss Cache configuration templates for JCR's components. They are situated in application package in /conf/portal/ folder.
</para>
<section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Data_container_template">
<title>Data container template</title>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbossts-transaction-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbossts-transaction-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbossts-transaction-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -11,7 +11,7 @@
JBossTransactionsService implements eXo <xref linkend="sect-Reference_Guide-TransactionService" /> and provides access to <ulink url="http://www.jboss.org/jbosstm/">JBoss Transaction Service (JBossTS)</ulink> JTA implementation via eXo container dependency.
</para>
<para>
- TransactionService used in JCR cache <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis> implementaion. See <xref linkend="sect-Reference_Guide-Cluster_Config" /> for example.
+ TransactionService used in JCR cache <emphasis>org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache</emphasis> implementation. See <xref linkend="sect-Reference_Guide-Cluster_Config" /> for example.
</para>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jta.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jta.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jta.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,10 +4,10 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JTA">
- <!-- This document was created with Syntext Serna Free. --> <title>JTA</title>
- <para>
- eXo JCR supports the Java Transaction API out of the box. If a <emphasis>TransactionService</emphasis> has been defined (refer to the section about the TransactionService for more details) at session save, it checks if a global transaction is active and if so, it automatically enrolles the JCR session in the global transaction. If you intend to use a managed data source, you will have to configure the service <emphasis>DataSourceProvider</emphasis> (for more details please refer to the corresponding section).
- </para>
+ <!-- This document was created with Syntext Serna Free. --> <title>JTA</title>
+ <para>
+ eXo JCR supports the Java Transaction API out of the box. If a <emphasis>TransactionService</emphasis> has been defined (refer to the section about the TransactionService for more details) at session save, it checks if a global transaction is active and if so, it automatically enrols the JCR session in the global transaction. If you intend to use a managed data source, you will have to configure the service <emphasis>DataSourceProvider</emphasis> (for more details please refer to the corresponding section).
+ </para>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -135,7 +135,7 @@
<programlisting language="Java" role="Java">void update(InputStream stream, long length, long position) throws IOException;</programlisting>
<para>
- Set the length of the Value in bytes to the specified size. If the size is lower than 0, the IOException exception will be thrown. This operation can be used to extend or truncat the Value size. This method is used internally in the update operation in case of extending the size to the given position.
+ Set the length of the Value in bytes to the specified size. If the size is lower than 0, the IOException exception will be thrown. This operation can be used to extend or truncate the Value size. This method is used internally in the update operation in case of extending the size to the given position.
</para>
<programlisting language="Java" role="Java">void setLength(long size) throws IOException;</programlisting>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -160,7 +160,7 @@
</table>
<para>
- <citetitle>Read operaion with more threads</citetitle>:
+ <citetitle>Read operation with more threads</citetitle>:
</para>
<simplelist>
<member>Warm-up iterations: 100</member>
@@ -274,7 +274,7 @@
<section id="sect-Reference_Guide-Performance_Tuning_Guide-JBoss_AS_Tuning">
<title>JBoss AS Tuning</title>
<para>
- You can use <parameter>maxThreads</parameter> parameter to increase maximum amount of threads that can be launched in AS instance. This can improve performance if you need a high level of concurrency. also you can use <code>-XX:+UseParallelGC</code> java directory to use paralel garbage collector.
+ You can use <parameter>maxThreads</parameter> parameter to increase maximum amount of threads that can be launched in AS instance. This can improve performance if you need a high level of concurrency. also you can use <code>-XX:+UseParallelGC</code> java directory to use parallel garbage collector.
</para>
<note>
<title>Note</title>
@@ -308,13 +308,13 @@
<citetitle>Eviction</citetitle>
</para>
<para>
- Manipulations with eviction <parameter>wakeUpInterval</parameter> value doestn't affect on performance. Performance results with values from 500 up to 3000 are approximately equal.
+ Manipulations with eviction <parameter>wakeUpInterval</parameter> value does not affect on performance. Performance results with values from 500 up to 3000 are approximately equal.
</para>
<para>
<citetitle>Transaction Timeout</citetitle>
</para>
<para>
- Using short timeout for long transactions such as Export/Import, removing huge subtree defined timeout may cause <exceptionname>TransactionTimeoutException</exceptionname>. [TODO] put recomended timeout value
+ Using short timeout for long transactions such as Export/Import, removing huge subtree defined timeout may cause <exceptionname>TransactionTimeoutException</exceptionname>.
</para>
</section>
@@ -334,7 +334,7 @@
<citetitle>Write performance in cluster</citetitle>
</para>
<para>
- Exo JCR implementation uses Lucene indexing engine to provide search capabilities. But Lucene brings some limitations for write operations: it can perform indexing only in one thread. Thats why write performance in cluster is not higher than in singleton environment. Data is indexed on coordinator node, so increasing write-load on cluster may lead to ReplicationTimeout exception. It occurs because writing threads queue in the indexer and under high load timeout for replication to coordinator will be exceeded.
+ Exo JCR implementation uses Lucene indexing engine to provide search capabilities. But Lucene brings some limitations for write operations: it can perform indexing only in one thread. That is why write performance in cluster is not higher than in singleton environment. Data is indexed on coordinator node, so increasing write-load on cluster may lead to ReplicationTimeout exception. It occurs because writing threads queue in the indexer and under high load timeout for replication to coordinator will be exceeded.
</para>
<para>
Taking in consideration this fact, it is recommended to exceed <parameter>replTimeout</parameter> value in cache configurations in case of high write-load.
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/protocols/ftp.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/protocols/ftp.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/protocols/ftp.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,54 +4,54 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-FTP">
- <title>FTP</title>
- <section id="sect-Reference_Guide-FTP-Introdution">
- <title>Introdution</title>
- <para>
- The JCR-FTP Server represents the standard eXo service, operates as an FTP server with an access to a content stored in JCR repositories in the form of <emphasis role="bold">nt:file/nt:folder</emphasis> nodes or their successors. The client of an executed Server can be any FTP client. The FTP server is supported by a standard configuration which can be changed as required.
- </para>
+ <title>FTP</title>
+ <section id="sect-Reference_Guide-FTP-Introduction">
+ <title>Introdution</title>
+ <para>
+ The JCR-FTP Server represents the standard eXo service, operates as an FTP server with an access to a content stored in JCR repositories in the form of <emphasis role="bold">nt:file/nt:folder</emphasis> nodes or their successors. The client of an executed Server can be any FTP client. The FTP server is supported by a standard configuration which can be changed as required.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FTP-Configuration_Parameters">
- <title>Configuration Parameters</title>
- <section id="sect-Reference_Guide-Configuration_Parameters-command_port">
- <title>command-port:</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FTP-Configuration_Parameters">
+ <title>Configuration Parameters</title>
+ <section id="sect-Reference_Guide-Configuration_Parameters-command_port">
+ <title>command-port:</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>command-port</name>
<value>21</value>
</value-param></programlisting>
- <para>
- The value of the command channel port. The value '21' is default.
- </para>
- <para>
- When you have already some FTP server installed in your system , this parameter needs to be changed (2121 for example) to avoid conflicts or if the port is protected.
- </para>
+ <para>
+ The value of the command channel port. The value '21' is default.
+ </para>
+ <para>
+ When you have already some FTP server installed in your system , this parameter needs to be changed (2121 for example) to avoid conflicts or if the port is protected.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-data_min_port_amp_data_max_port">
- <title>data-min-port & data-max-port</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-data_min_port_amp_data_max_port">
+ <title>data-min-port & data-max-port</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>data-min-port</name>
<value>52000</value>
</value-param></programlisting>
-
+
<programlisting language="XML" role="XML"><value-param>
<name>data-max-port</name>
<value>53000</value>
</value-param></programlisting>
- <para>
- These two parameters indicate the minimal and maximal values of the range of ports, used by the server. The usage of the additional data channel is required by the FTP - protocol, which is used to transfer the contents of files and the listing of catalogues. This range of ports should be free from listening by other server-programs.
- </para>
+ <para>
+ These two parameters indicate the minimal and maximal values of the range of ports, used by the server. The usage of the additional data channel is required by the FTP - protocol, which is used to transfer the contents of files and the listing of catalogues. This range of ports should be free from listening by other server-programs.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-system">
- <title>system</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-system">
+ <title>system</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>system</name>
@@ -59,15 +59,15 @@
or
<value>UNIX Type: L8</value>
</value-param></programlisting>
- <para>
- Types of formats of listing of catalogues which are supported.
- </para>
+ <para>
+ Types of formats of listing of catalogues which are supported.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-client_side_encoding">
- <title>client-side-encoding</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-client_side_encoding">
+ <title>client-side-encoding</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>client-side-encoding</name>
@@ -76,105 +76,105 @@
<value>KOI8-R</value>
</value-param></programlisting>
- <para>
- This parameter specifies the coding which is used for dialogue with the client.
- </para>
+ <para>
+ This parameter specifies the coding which is used for dialogue with the client.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-def_folder_node_type">
- <title>def-folder-node-type</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-def_folder_node_type">
+ <title>def-folder-node-type</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>def-folder-node-type</name>
<value>nt:folder</value>
</value-param></programlisting>
- <para>
- This parameter specifies the type of a node, when an FTP-folder is created.
- </para>
+ <para>
+ This parameter specifies the type of a node, when an FTP-folder is created.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-def_file_node_type">
- <title>def-file-node-type</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-def_file_node_type">
+ <title>def-file-node-type</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>def-file-node-type</name>
<value>nt:file</value>
</value-param></programlisting>
- <para>
- This parameter specifies the type of a node, when an FTP - file is created.
- </para>
+ <para>
+ This parameter specifies the type of a node, when an FTP - file is created.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-def_file_mime_type">
- <title>def-file-mime-type</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-def_file_mime_type">
+ <title>def-file-mime-type</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>def-file-mime-type</name>
<value>application/zip</value>
</value-param></programlisting>
- <para>
- The mime type of a created file is chosen by using its file extention. In case, a server cannot find the corresponding mime type, this value is used.
- </para>
+ <para>
+ The mime type of a created file is chosen by using its file extention. In case, a server cannot find the corresponding mime type, this value is used.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-cache_folder_name">
- <title>cache-folder-name</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-cache_folder_name">
+ <title>cache-folder-name</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>cache-folder-name</name>
<value>../temp/ftp_cache</value>
</value-param></programlisting>
- <para>
- The Path of the cache folder.
- </para>
+ <para>
+ The Path of the cache folder.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-upload_speed_limit">
- <title>upload-speed-limit</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-upload_speed_limit">
+ <title>upload-speed-limit</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>upload-speed-limit</name>
<value>20480</value>
</value-param></programlisting>
- <para>
- Restriction of the upload speed. It is measured in bytes.
- </para>
+ <para>
+ Restriction of the upload speed. It is measured in bytes.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-download_speed_limit">
- <title>download-speed-limit</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-download_speed_limit">
+ <title>download-speed-limit</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>download-speed-limit</name>
<value>20480</value>
</value-param></programlisting>
- <para>
- Restriction of the download speed. It is measured in bytes.
- </para>
+ <para>
+ Restriction of the download speed. It is measured in bytes.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Parameters-timeout">
- <title>timeout</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Parameters-timeout">
+ <title>timeout</title>
+
<programlisting language="XML" role="XML"><value-param>
<name>timeout</name>
<value>60</value>
</value-param></programlisting>
- <para>
- Defines the value of a timeout.
- </para>
+ <para>
+ Defines the value of a timeout.
+ </para>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -21,16 +21,16 @@
<itemizedlist>
<listitem>
<para>
- <xref linkend="sect-Reference_Guide-Database_Creator" /> - DBCreator used to create new database for each unbinded datasource.
+ <!--<xref linkend="sect-Reference_Guide-Database_Creator" />--> DBCreator used to create new database for each unbinded datasource.
</para>
</listitem>
- <!--<listitem>
+ <listitem>
<para>
- <xref linkend="sect-Reference_Guide-eXo_JCR_Backup_Service" /> - BackupManager used to created repository from backup.
+ <!--<xref linkend="sect-Reference_Guide-eXo_JCR_Backup_Service" /> --> BackupManager used to created repository from backup.
</para>
- </listitem>-->
+ </listitem>
<listitem>
<para>
<xref linkend="sect-Reference_Guide-RPC_Service" /> - RPCService used for communication between cluster-nodes
@@ -53,13 +53,13 @@
</listitem>
<listitem>
<para>
- than user executes createRepository(String backupId, RepositoryEntry rEntry, String token). Coordinator-node checks the token, and creates Repository.
+ Then user executes createRepository(String backupId, RepositoryEntry rEntry, String token). Coordinator-node checks the token, and creates Repository.
</para>
</listitem>
<listitem>
<para>
- whan repository become created - user-node broadcast message to all clusterNodes with RepositoryEntry, so each cluster node starts new Repository.
+ When repository become created - user-node broadcast message to all clusterNodes with RepositoryEntry, so each cluster node starts new Repository.
</para>
</listitem>
@@ -246,7 +246,7 @@
<section id="sect-Reference_Guide-RepositoryCreationService-Conclusions_and_restrictions">
<title>Conclusions and restrictions</title>
<para>
- Each datasource in RepositoryEntry of new Repository must have unbinded datasources. Thats mean, such datasource must have not databases behind them. This restriction exists to avoid corruption of existing repositories data.
+ Each datasource in RepositoryEntry of new Repository must have unbinded datasources. That means, such datasource must have not databases behind them. This restriction exists to avoid corruption of existing repositories data.
</para>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/aggregation-rule.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/aggregation-rule.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/aggregation-rule.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -6,7 +6,7 @@
<section id="sect-Reference_Guide-Finding_ntfile_node_by_content_of_child_jcrcontent_node">
<title>Finding nt:file node by content of child jcr:content node</title>
<para>
- The node type nt:file represents a file. It requires a single child node, called jcr:content. This node type represents images and other binary content in a JCRWiki entry. The node type of jcr:conent is nt:resource which represents the actual content of a file.
+ The node type nt:file represents a file. It requires a single child node, called jcr:content. This node type represents images and other binary content in a JCRWiki entry. The node type of jcr:content is nt:resource which represents the actual content of a file.
</para>
<para>
Find node with the primary type is 'nt:file' and which whose 'jcr:content' child node contains "cats".
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/find-similar-nodes.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/find-similar-nodes.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/find-similar-nodes.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -9,7 +9,7 @@
Find similar nodes to node by path '/baseFile/jcr:content'.
</para>
<para>
- In our example, baseFile will contain text where "terms" word happens many times. That's a reason why the existanse of this word will be used as a criteria of node similarity (for node baseFile).
+ In our example, baseFile will contain text where "terms" word happens many times. That's a reason why the existence of this word will be used as a criteria of node similarity (for node baseFile).
</para>
<note>
<para>
@@ -91,7 +91,7 @@
<itemizedlist>
<listitem>
<para>
- jcr:content (nt:resource) jcr:data=" <emphasis role="bold">Terms</emphasis> occures here"
+ jcr:content (nt:resource) jcr:data=" <emphasis role="bold">Terms</emphasis> occurs here"
</para>
</listitem>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/higlight.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/higlight.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/higlight.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -29,7 +29,7 @@
Also, remember that we can make indexing rules, as in the example below:
</para>
<para>
- Let's write rule for all nodes with primary node type 'nt:unstructed' where property 'rule' equal to "excerpt" string. For those nodes, we will exclude property "title" from high-lighting and set "text" property as highlightable. Indexing-configuration.xml must containt the next rule:
+ Let's write rule for all nodes with primary node type 'nt:unstructured' where property 'rule' equal to "excerpt" string. For those nodes, we will exclude property "title" from high-lighting and set "text" property as highlightable. Indexing-configuration.xml must contain the next rule:
</para>
<programlisting language="XML" role="XML"><index-rule nodeType="nt:unstructured" condition="@rule='excerpt'">
@@ -159,7 +159,7 @@
</table>
<para>
- As you see, words "eXo" and "implamentation" is highlighted.
+ As you see, words "eXo" and "implementation" is highlighted.
</para>
<para>
Also, we can get exactly "rep:excerpt" value:
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/ignore-accent-symbols.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/ignore-accent-symbols.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/ignore-accent-symbols.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -29,7 +29,7 @@
<itemizedlist>
<listitem>
<para>
- The second way: Register new Analyzer in QueryHandler configuration (this one eccepted since 1.12 version);
+ The second way: Register new Analyzer in QueryHandler configuration (this one accepted since 1.12 version);
</para>
</listitem>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/index-boost-value.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/index-boost-value.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/index-boost-value.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,28 +4,28 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Changing_Priority_of_Node">
- <title>Changing Priority of Node</title>
- <para>
- In this example, we will set different boost values for predefined nodes, and will check effect by selecting those nodes and order them by jcr:score.
- </para>
- <para>
- The default boost value is 1.0. Higher boost values (a reasonable range is 1.0 - 5.0) will yield a higher score value and appear as more relevant.
- </para>
- <note>
- <para>
- See 4.2.2 Index Boost Value <xref linkend="sect-Reference_Guide-Search_Configuration" />
- </para>
+ <title>Changing Priority of Node</title>
+ <para>
+ In this example, we will set different boost values for predefined nodes, and will check effect by selecting those nodes and order them by jcr:score.
+ </para>
+ <para>
+ The default boost value is 1.0. Higher boost values (a reasonable range is 1.0 - 5.0) will yield a higher score value and appear as more relevant.
+ </para>
+ <note>
+ <para>
+ See 4.2.2 Index Boost Value <xref linkend="sect-Reference_Guide-Search_Configuration" />
+ </para>
- </note>
- <section id="sect-Reference_Guide-Changing_Priority_of_Node-Indexing_configuration">
- <title>Indexing configuration</title>
- <para>
- In next configuration, we will set boost values for nt:ustructured nodes 'text' property.
- </para>
- <para>
- indexing-config.xml:
- </para>
-
+ </note>
+ <section id="sect-Reference_Guide-Changing_Priority_of_Node-Indexing_configuration">
+ <title>Indexing configuration</title>
+ <para>
+ In next configuration, we will set boost values for nt:unstructured nodes 'text' property.
+ </para>
+ <para>
+ indexing-config.xml:
+ </para>
+
<programlisting language="XML" role="XML"><!--
This rule actualy do nothing. 'text' property has default boost value.
-->
@@ -50,52 +50,52 @@
<property boost="3.0">text</property>
</index-rule></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Changing_Priority_of_Node-Repository_structure">
- <title>Repository structure:</title>
- <para>
- Repository contains many nodes with primary type nt:unstructured. Each node contains 'text' property and 'rule' property with different values.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- root
- </para>
- <itemizedlist>
- <listitem>
- <para>
- node1(nt:unstructured) rule='boost1' text='The quick brown fox jump...'
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Changing_Priority_of_Node-Repository_structure">
+ <title>Repository structure:</title>
+ <para>
+ Repository contains many nodes with primary type nt:unstructured. Each node contains 'text' property and 'rule' property with different values.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ root
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ node1(nt:unstructured) rule='boost1' text='The quick brown fox jump...'
+ </para>
- </listitem>
- <listitem>
- <para>
- node2(nt:unstructured) rule='boost2' text='The quick brown fox jump...'
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ node2(nt:unstructured) rule='boost2' text='The quick brown fox jump...'
+ </para>
- </listitem>
- <listitem>
- <para>
- node3(nt:unstructured) rule='boost3' text='The quick brown fox jump...'
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ node3(nt:unstructured) rule='boost3' text='The quick brown fox jump...'
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Changing_Priority_of_Node-Query_execution">
- <title>Query execution</title>
- <para>
- <emphasis role="bold">SQL</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Changing_Priority_of_Node-Query_execution">
+ <title>Query execution</title>
+ <para>
+ <emphasis role="bold">SQL</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -103,10 +103,10 @@
Query query = queryManager.createQuery(sqlStatement, Query.SQL);
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- <para>
- <emphasis role="bold">XPath</emphasis>
- </para>
-
+ <para>
+ <emphasis role="bold">XPath</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -115,25 +115,25 @@
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Changing_Priority_of_Node-Fetching_result">
- <title>Fetching result</title>
- <para>
- Let's get nodes:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Changing_Priority_of_Node-Fetching_result">
+ <title>Fetching result</title>
+ <para>
+ Let's get nodes:
+ </para>
+
<programlisting language="Java" role="Java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
Node findedNode = it.nextNode();
}</programlisting>
- <para>
- NodeIterator will return nodes in next order "node3", "node2", "node1".
- </para>
+ <para>
+ NodeIterator will return nodes in next order "node3", "node2", "node1".
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.bk
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.bk 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.bk 2011-09-27 06:12:04 UTC (rev 7511)
@@ -182,7 +182,7 @@
</section>
<section>
- <title>Ordering specifing</title>
+ <title>Ordering specifying</title>
<itemizedlist>
<listitem>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/jcr-query-usecases.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,33 +4,33 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JCR_Query_Usecases">
- <title>JCR Query Usecases</title>
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Intro">
- <title>Intro</title>
- <para>
- JCR supports two query languages - JCR and XPath. A query, whether XPath or SQL, specifies a subset of nodes within a workspace, called the result set. The result set constitutes all the nodes in the workspace that meet the constraints stated in the query.
- </para>
+ <title>JCR Query Usecases</title>
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Intro">
+ <title>Intro</title>
+ <para>
+ JCR supports two query languages - JCR and XPath. A query, whether XPath or SQL, specifies a subset of nodes within a workspace, called the result set. The result set constitutes all the nodes in the workspace that meet the constraints stated in the query.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_Lifecycle">
- <title>Query Lifecycle</title>
- <section id="sect-Reference_Guide-Query_Lifecycle-Query_Creation_and_Execution">
- <title>Query Creation and Execution</title>
- <para>
- <emphasis role="bold">SQL</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_Lifecycle">
+ <title>Query Lifecycle</title>
+ <section id="sect-Reference_Guide-Query_Lifecycle-Query_Creation_and_Execution">
+ <title>Query Creation and Execution</title>
+ <para>
+ <emphasis role="bold">SQL</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make SQL query
Query query = queryManager.createQuery("SELECT * FROM nt:base ", Query.SQL);
// execute query
QueryResult result = query.execute();</programlisting>
- <para>
- <emphasis role="bold">XPath</emphasis>
- </para>
-
+ <para>
+ <emphasis role="bold">XPath</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// get QueryManager
QueryManager queryManager = workspace.getQueryManager();
// make XPath query
@@ -38,22 +38,22 @@
// execute query
QueryResult result = query.execute();</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Query_Lifecycle-Query_Result_Processing">
- <title>Query Result Processing</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Query_Lifecycle-Query_Result_Processing">
+ <title>Query Result Processing</title>
+
<programlisting language="Java" role="Java">// fetch query result
QueryResult result = query.execute();</programlisting>
- <para>
- Now we can get result in an iterator of nodes:
- </para>
-
+ <para>
+ Now we can get result in an iterator of nodes:
+ </para>
+
<programlisting language="Java" role="Java">NodeIterator it = result.getNodes();</programlisting>
- <para>
- or we get the result in a table:
- </para>
-
+ <para>
+ or we get the result in a table:
+ </para>
+
<programlisting language="Java" role="Java">// get column names
String[] columnNames = result.getColumnNames();
// get column rows
@@ -65,334 +65,334 @@
Value[] values = row.getValues();
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Query_Lifecycle-Scoring">
- <title>Scoring</title>
- <para>
- The result returns a score for each row in the result set. The score contains a value that indicates a rating of how well the result node matches the query. A high value means a better matching than a low value. This score can be used for ordering the result.
- </para>
- <para>
- eXo JCR Scoring is a mapping of Lucene scoring. For a more in-depth understanding, please study <ulink url="http://lucene.apache.org/java/2_4_1/scoring.html">Lucene documentation</ulink>.
- </para>
- <para>
- jcr:score counted in next way - (lucene score)*1000f.
- </para>
- <para>
- Score may be increased for specified nodes, see <xref linkend="sect-Reference_Guide-Changing_Priority_of_Node" />
- </para>
- <para>
- Also, see an example <xref linkend="sect-Reference_Guide-Ordering_by_Score" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Query_Lifecycle-Scoring">
+ <title>Scoring</title>
+ <para>
+ The result returns a score for each row in the result set. The score contains a value that indicates a rating of how well the result node matches the query. A high value means a better matching than a low value. This score can be used for ordering the result.
+ </para>
+ <para>
+ eXo JCR Scoring is a mapping of Lucene scoring. For a more in-depth understanding, please study <ulink url="http://lucene.apache.org/java/2_4_1/scoring.html">Lucene documentation</ulink>.
+ </para>
+ <para>
+ jcr:score counted in next way - (lucene score)*1000f.
+ </para>
+ <para>
+ Score may be increased for specified nodes, see <xref linkend="sect-Reference_Guide-Changing_Priority_of_Node" />
+ </para>
+ <para>
+ Also, see an example <xref linkend="sect-Reference_Guide-Ordering_by_Score" />
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_result_settings">
- <title>Query result settings</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-SetOffset_and_SetLimit" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_result_settings">
+ <title>Query result settings</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-SetOffset_and_SetLimit" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Type_Constraints">
- <title>Type Constraints</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_All_Nodes" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Type_Constraints">
+ <title>Type Constraints</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_All_Nodes" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_Nodes_by_Primary_Type" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_Nodes_by_Primary_Type" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_Nodes_by_Mixin_Type" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_Nodes_by_Mixin_Type" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Property_Constraints">
- <title>Property Constraints</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Property_Comparison" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Property_Constraints">
+ <title>Property Constraints</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Property_Comparison" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-LIKE_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-LIKE_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Escaping_in_LIKE_Statements" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Escaping_in_LIKE_Statements" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-NOT_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-NOT_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-AND_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-AND_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-OR_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-OR_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Property_Existence_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Property_Existence_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_Nodes_in_a_Case_Insensitive_Way" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_Nodes_in_a_Case_Insensitive_Way" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Date_Property_Comparison" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Date_Property_Comparison" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Node_Name_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Node_Name_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Multivalue_Property_Comparison" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Multivalue_Property_Comparison" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Path_Constraint">
- <title>Path Constraint</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Exact_Path_Constraint" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Path_Constraint">
+ <title>Path Constraint</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Exact_Path_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Child_Node_Constraint" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Child_Node_Constraint" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_All_Descendant_Nodes" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_All_Descendant_Nodes" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Ordering_specifing">
- <title>Ordering specifing</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Sorting_Nodes_by_Property" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Ordering_specifing">
+ <title>Ordering specifying</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Sorting_Nodes_by_Property" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Ordering_by_Descendant_Nodes_Property_XPath_only" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Ordering_by_Descendant_Nodes_Property_XPath_only" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Ordering_by_Score" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Ordering_by_Score" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Ordering_by_Path_or_Name" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Ordering_by_Path_or_Name" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section>
- <title><xref linkend="sect-Reference_Guide-Fulltext_Search_And_Affecting_Settings" /></title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Fulltext_Search_by_Property" />
- </para>
+ </section>
+
+ <section>
+ <title><xref linkend="sect-Reference_Guide-Fulltext_Search_And_Affecting_Settings" /></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Fulltext_Search_by_Property" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Fulltext_Search_by_All_Properties_in_Node" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Fulltext_Search_by_All_Properties_in_Node" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_ntfile_node_by_content_of_child_jcrcontent_node" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_ntfile_node_by_content_of_child_jcrcontent_node" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Ignoring_Accent_Symbols._New_Analyzer_Setting." />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Ignoring_Accent_Symbols._New_Analyzer_Setting." />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Indexing_rules_and_additional_features">
- <title>Indexing rules and additional features</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_ntfile_node_by_content_of_child_jcrcontent_node" />
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Indexing_rules_and_additional_features">
+ <title>Indexing rules and additional features</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_ntfile_node_by_content_of_child_jcrcontent_node" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-High_lighting_Result_of_Fulltext_Search" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-High_lighting_Result_of_Fulltext_Search" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Changing_Priority_of_Node" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Changing_Priority_of_Node" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Removing_Nodes_Property_From_Indexing_Scope" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Removing_Nodes_Property_From_Indexing_Scope" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Regular_Expression_as_Property_Name_in_Indexing_Rules" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Regular_Expression_as_Property_Name_in_Indexing_Rules" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Searching_By_Synonim" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Searching_By_Synonim" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Checking_the_spelling_of_Phrase" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Checking_the_spelling_of_Phrase" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Finding_Similar_Nodes" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Finding_Similar_Nodes" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_Examples">
- <title>Query Examples</title>
- <xi:include href="offset-and-limit.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-all-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-nodes-by-primary-type.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-nodes-by-mixin-type.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="like-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="escaping-like-statements.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="not-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="and-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="or-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="property-existance-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-nodes-case-insensitive.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="date-property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="node-name-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="multivalue-property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="exact-path-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="child-node-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-all-descendant-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="order-by-property.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="order-by-descendant.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="order-by-score.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="order-by-path-or-name.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="fulltext-search-by-property.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="fulltext-search-by-all-properties.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ignore-accent-symbols.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="aggregation-rule.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="index-boost-value.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="node-scope-index.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="regexp-indexing-rule.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="higlight.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="synonim-provider.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="spell-checker.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="find-similar-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Query_Examples">
+ <title>Query Examples</title>
+ <xi:include href="offset-and-limit.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-all-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-nodes-by-primary-type.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-nodes-by-mixin-type.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="like-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="escaping-like-statements.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="not-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="and-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="or-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="property-existance-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-nodes-case-insensitive.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="date-property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="node-name-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="multivalue-property-comparison.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="exact-path-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="child-node-constraint.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-all-descendant-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="order-by-property.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="order-by-descendant.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="order-by-score.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="order-by-path-or-name.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="fulltext-search-by-property.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="fulltext-search-by-all-properties.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="ignore-accent-symbols.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="aggregation-rule.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="index-boost-value.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="node-scope-index.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="regexp-indexing-rule.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="higlight.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="synonim-provider.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="spell-checker.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="find-similar-nodes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </section>
-
- <section id="sect-Reference_Guide-JCR_Query_Usecases-Tips_and_tricks">
- <title>Tips and tricks</title>
- <xi:include href="tip-nodename-with-number.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Query_Usecases-Tips_and_tricks">
+ <title>Tips and tricks</title>
+ <xi:include href="tip-nodename-with-number.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/node-scope-index.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/node-scope-index.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/node-scope-index.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -6,7 +6,7 @@
<section id="sect-Reference_Guide-Removing_Nodes_Property_From_Indexing_Scope">
<title>Removing Nodes Property From Indexing Scope</title>
<para>
- In this example, we will exclude some 'text' property of nt:unstructured node from indexind. And, therefore, node will not be found by the content of this property, even if it accepts all constraints.
+ In this example, we will exclude some 'text' property of nt:unstructured node from indexing. And, therefore, node will not be found by the content of this property, even if it accepts all constraints.
</para>
<para>
First of all, add rules to indexing-configuration.xml:
@@ -52,7 +52,7 @@
</listitem>
<listitem>
<para>
- node3 (nt:unstructured) text="The quick brown fox ..." // as you see this node not mentioned in indexing-coniguration
+ node3 (nt:unstructured) text="The quick brown fox ..." // as you see this node not mentioned in indexing-configuration
</para>
</listitem>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/regexp-indexing-rule.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/regexp-indexing-rule.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/regexp-indexing-rule.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -6,7 +6,7 @@
<section id="sect-Reference_Guide-Regular_Expression_as_Property_Name_in_Indexing_Rules">
<title>Regular Expression as Property Name in Indexing Rules</title>
<para>
- In this example, we want to configure indexind in the next way. All properties of nt:unstructured nodes must be excluded from search, except properties whoes names ends with 'Text' string. First of all, add rules to indexing-configuration.xml:
+ In this example, we want to configure indexing in the next way. All properties of nt:unstructured nodes must be excluded from search, except properties whoes names ends with 'Text' string. First of all, add rules to indexing-configuration.xml:
</para>
<programlisting language="XML" role="XML"><index-rule nodeType="nt:unstructured"">
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/searching-repository-content.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/searching-repository-content.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/searching-repository-content.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,45 +4,45 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Searching_Repository_Content">
- <title>Searching Repository Content</title>
- <section id="sect-Reference_Guide-Searching_Repository_Content-Introduction">
- <title>Introduction</title>
- <para>
- You can find the JCR configuration file here: .../portal/WEB-INF/conf/jcr/repository-configuration.xml. Please read also <xref linkend="sect-Reference_Guide-Search_Configuration" /> for more information about index configuration.
- </para>
+ <title>Searching Repository Content</title>
+ <section id="sect-Reference_Guide-Searching_Repository_Content-Introduction">
+ <title>Introduction</title>
+ <para>
+ You can find the JCR configuration file here: .../portal/WEB-INF/conf/jcr/repository-configuration.xml. Please read also <xref linkend="sect-Reference_Guide-Search_Configuration" /> for more information about index configuration.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-Bi_directional_RangeIterator_since_1.9">
- <title>Bi-directional RangeIterator (since 1.9)</title>
- <para>
- QueryResult.getNodes() will return bi-directional NodeIterator implementation.
- </para>
- <note>
- <para>
- Bi-directional NodeIterator is <emphasis role="bold">not supported</emphasis> in two cases:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- SQL query: select * from nt:base
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-Bi_directional_RangeIterator_since_1.9">
+ <title>Bi-directional RangeIterator (since 1.9)</title>
+ <para>
+ QueryResult.getNodes() will return bi-directional NodeIterator implementation.
+ </para>
+ <note>
+ <para>
+ Bi-directional NodeIterator is <emphasis role="bold">not supported</emphasis> in two cases:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ SQL query: select * from nt:base
+ </para>
- </listitem>
- <listitem>
- <para>
- XPath query: //* .
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ XPath query: //* .
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </note>
- <para>
- TwoWayRangeIterator interface:
- </para>
-
+ </note>
+ <para>
+ TwoWayRangeIterator interface:
+ </para>
+
<programlisting language="Java" role="Java">/**
* Skip a number of elements in the iterator.
*
@@ -51,10 +51,10 @@
* in the iterator.
*/
public void skipBack(long skipNum);</programlisting>
- <para>
- Usage:
- </para>
-
+ <para>
+ Usage:
+ </para>
+
<programlisting language="Java" role="Java">NodeIterator iter = queryResult.getNodes();
while (iter.hasNext()) {
if (skipForward) {
@@ -66,39 +66,39 @@
.......
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-Fuzzy_Searches_since_1.0">
- <title>Fuzzy Searches (since 1.0)</title>
- <para>
- JCR supports such features as Lucene Fuzzy Searches <ulink url="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</ulink>.
- </para>
- <para>
- To use it, you have to form a query like the one described below:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-Fuzzy_Searches_since_1.0">
+ <title>Fuzzy Searches (since 1.0)</title>
+ <para>
+ JCR supports such features as Lucene Fuzzy Searches <ulink url="http://lucene.apache.org/java/2_3_2/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</ulink>.
+ </para>
+ <para>
+ To use it, you have to form a query like the one described below:
+ </para>
+
<programlisting language="Java" role="Java">QueryManager qman = session.getWorkspace().getQueryManager();
Query q = qman.createQuery("select * from nt:base where contains(field, 'ccccc~')", Query.SQL);
QueryResult res = q.execute();</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-SynonymSearch_since_1.9">
- <title>SynonymSearch (since 1.9)</title>
- <para>
- Searching with synonyms is integrated in the jcr:contains() function and uses the same syntax as synonym searches in Google. If a search term is prefixed by a tilde symbol ( ~ ), also synonyms of the search term are taken into consideration. For example:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-SynonymSearch_since_1.9">
+ <title>SynonymSearch (since 1.9)</title>
+ <para>
+ Searching with synonyms is integrated in the jcr:contains() function and uses the same syntax as synonym searches in Google. If a search term is prefixed by a tilde symbol ( ~ ), also synonyms of the search term are taken into consideration. For example:
+ </para>
+
<programlisting>SQL: select * from nt:resource where contains(., '~parameter')
XPath: //element(*, nt:resource)[jcr:contains(., '~parameter')</programlisting>
- <para>
- This feature is disabled by default and you need to add a configuration parameter to the query-handler element in your jcr configuration file to enable it.
- </para>
-
+ <para>
+ This feature is disabled by default and you need to add a configuration parameter to the query-handler element in your jcr configuration file to enable it.
+ </para>
+
<programlisting language="XML" role="XML"><param name="synonymprovider-config-path" value="..you path to configuration file....."/>
<param name="synonymprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.PropertiesSynonymProvider"/></programlisting>
-
+
<programlisting language="XML" role="XML">/**
* <code>SynonymProvider</code> defines an interface for a component that
* returns synonyms for a given term.
@@ -129,29 +129,29 @@
public String[] getSynonyms(String term);
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-High_lighting_Since_1.9">
- <title>High-lighting (Since 1.9)</title>
- <para>
- An ExcerptProvider retrieves text excerpts for a node in the query result and marks up the words in the text that match the query terms.
- </para>
- <para>
- By default highlighting words matched the query is disabled because this feature requires that additional information is written to the search index. To enable this feature, you need to add a configuration parameter to the query-handler element in your jcr configuration file to enable it.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-High_lighting_Since_1.9">
+ <title>High-lighting (Since 1.9)</title>
+ <para>
+ An ExcerptProvider retrieves text excerpts for a node in the query result and marks up the words in the text that match the query terms.
+ </para>
+ <para>
+ By default highlighting words matched the query is disabled because this feature requires that additional information is written to the search index. To enable this feature, you need to add a configuration parameter to the query-handler element in your jcr configuration file to enable it.
+ </para>
+
<programlisting language="XML" role="XML"><param name="support-highlighting" value="true"/></programlisting>
- <para>
- Additionally, there is a parameter that controls the format of the excerpt created. In JCR 1.9, the default is set to org.exoplatform.services.jcr.impl.core.query.lucene.DefaultHTMLExcerpt. The configuration parameter for this setting is:
- </para>
-
+ <para>
+ Additionally, there is a parameter that controls the format of the excerpt created. In JCR 1.9, the default is set to org.exoplatform.services.jcr.impl.core.query.lucene.DefaultHTMLExcerpt. The configuration parameter for this setting is:
+ </para>
+
<programlisting language="XML" role="XML"><param name="excerptprovider-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.DefaultXMLExcerpt"/></programlisting>
- <section id="sect-Reference_Guide-High_lighting_Since_1.9-DefaultXMLExcerpt">
- <title>DefaultXMLExcerpt</title>
- <para>
- This excerpt provider creates an XML fragment of the following form:
- </para>
-
+ <section id="sect-Reference_Guide-High_lighting_Since_1.9-DefaultXMLExcerpt">
+ <title>DefaultXMLExcerpt</title>
+ <para>
+ This excerpt provider creates an XML fragment of the following form:
+ </para>
+
<programlisting language="XML" role="XML"><excerpt>
<fragment>
<highlight>exoplatform</highlight> implements both the mandatory
@@ -163,14 +163,14 @@
</fragment>
</excerpt></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-High_lighting_Since_1.9-DefaultHTMLExcerpt">
- <title>DefaultHTMLExcerpt</title>
- <para>
- This excerpt provider creates an HTML fragment of the following form:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-High_lighting_Since_1.9-DefaultHTMLExcerpt">
+ <title>DefaultHTMLExcerpt</title>
+ <para>
+ This excerpt provider creates an HTML fragment of the following form:
+ </para>
+
<programlisting language="HTML" role="HTML"><div>
<span>
<strong>exoplatform</strong> implements both the mandatory XPath
@@ -182,14 +182,14 @@
</span>
</div></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-High_lighting_Since_1.9-How_to_use_it">
- <title>How to use it</title>
- <para>
- If you are using XPath, you must use the rep:excerpt() function in the last location step, just like you would select properties:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-High_lighting_Since_1.9-How_to_use_it">
+ <title>How to use it</title>
+ <para>
+ If you are using XPath, you must use the rep:excerpt() function in the last location step, just like you would select properties:
+ </para>
+
<programlisting language="Java" role="Java">QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("//*[jcr:contains(., 'exoplatform')]/(@Title|rep:excerpt(.))", Query.XPATH);
QueryResult result = q.execute();
@@ -198,19 +198,19 @@
Value title = r.getValue("Title");
Value excerpt = r.getValue("rep:excerpt(.)");
}</programlisting>
- <para>
- The above code searches for nodes that contain the word exoplatform and then gets the value of the Title property and an excerpt for each result node.
- </para>
- <para>
- It is also possible to use a relative path in the call Row.getValue() while the query statement still remains the same. Also, you may use a relative path to a string property. The returned value will then be an excerpt based on string value of the property.
- </para>
- <para>
- Both available excerpt provider will create fragments of about 150 characters and up to 3 fragments.
- </para>
- <para>
- In SQL, the function is called excerpt() without the rep prefix, but the column in the RowIterator will nonetheless be labled rep:excerpt(.)!
- </para>
-
+ <para>
+ The above code searches for nodes that contain the word exoplatform and then gets the value of the Title property and an excerpt for each result node.
+ </para>
+ <para>
+ It is also possible to use a relative path in the call Row.getValue() while the query statement still remains the same. Also, you may use a relative path to a string property. The returned value will then be an excerpt based on string value of the property.
+ </para>
+ <para>
+ Both available excerpt provider will create fragments of about 150 characters and up to 3 fragments.
+ </para>
+ <para>
+ In SQL, the function is called excerpt() without the rep prefix, but the column in the RowIterator will nonetheless be labelled rep:excerpt(.)!
+ </para>
+
<programlisting language="Java" role="Java">QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("select excerpt(.) from nt:resource where contains(., 'exoplatform')", Query.SQL);
QueryResult result = q.execute();
@@ -219,73 +219,73 @@
Value excerpt = r.getValue("rep:excerpt(.)");
}</programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-SpellChecker">
- <title>SpellChecker</title>
- <para>
- The lucene based query handler implementation supports a pluggable spell checker mechanism. By default, spell checking is not available and you have to configure it first. See parameter spellCheckerClass on page <xref linkend="sect-Reference_Guide-Search_Configuration" /> JCR currently provides an implementation class , which uses the <ulink url="http://wiki.apache.org/jakarta-lucene/SpellChecker">lucene-spellchecker</ulink> to contribute . The dictionary is derived from the fulltext indexed content of the workspace and updated periodically. You can configure the refresh interval by picking one of the available inner classes of org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- OneMinuteRefreshInterval
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-SpellChecker">
+ <title>SpellChecker</title>
+ <para>
+ The lucene based query handler implementation supports a pluggable spell checker mechanism. By default, spell checking is not available and you have to configure it first. See parameter spellCheckerClass on page <xref linkend="sect-Reference_Guide-Search_Configuration" /> JCR currently provides an implementation class , which uses the <ulink url="http://wiki.apache.org/jakarta-lucene/SpellChecker">lucene-spellchecker</ulink> to contribute . The dictionary is derived from the fulltext indexed content of the workspace and updated periodically. You can configure the refresh interval by picking one of the available inner classes of org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ OneMinuteRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- FiveMinutesRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ FiveMinutesRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- ThirtyMinutesRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ ThirtyMinutesRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- OneHourRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ OneHourRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- SixHoursRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ SixHoursRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- TwelveHoursRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ TwelveHoursRefreshInterval
+ </para>
- </listitem>
- <listitem>
- <para>
- OneDayRefreshInterval
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ OneDayRefreshInterval
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- For example, if you want a refresh interval of six hours, the class name is: org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$SixHoursRefreshInterval. If you use org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker, the refresh interval will be one hour.
- </para>
- <para>
- The spell checker dictionary is stored as a lucene index under <emphasis role="bold">"index-dir"/spellchecker</emphasis>. If it does not exist, a background thread will create it on startup. Similarly, the dictionary refresh is also done in a background thread to not block regular queries.
- </para>
- <section id="sect-Reference_Guide-SpellChecker-How_do_I_use_it">
- <title>How do I use it?</title>
- <para>
- You can spell check a fulltext statement either with an XPath or a SQL query:
- </para>
-
+ </itemizedlist>
+ <para>
+ For example, if you want a refresh interval of six hours, the class name is: org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$SixHoursRefreshInterval. If you use org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker, the refresh interval will be one hour.
+ </para>
+ <para>
+ The spell checker dictionary is stored as a lucene index under <emphasis role="bold">"index-dir"/spellchecker</emphasis>. If it does not exist, a background thread will create it on startup. Similarly, the dictionary refresh is also done in a background thread to not block regular queries.
+ </para>
+ <section id="sect-Reference_Guide-SpellChecker-How_do_I_use_it">
+ <title>How do I use it?</title>
+ <para>
+ You can spell check a fulltext statement either with an XPath or a SQL query:
+ </para>
+
<programlisting language="Java" role="Java">// rep:spellcheck('explatform') will always evaluate to true
Query query = qm.createQuery("/jcr:root[rep:spellcheck('explatform')]/(rep:spellcheck())", Query.XPATH);
RowIterator rows = query.execute().getRows();
@@ -299,10 +299,10 @@
} else {
String suggestion = v.getString();
}</programlisting>
- <para>
- And the same using SQL:
- </para>
-
+ <para>
+ And the same using SQL:
+ </para>
+
<programlisting language="Java" role="Java">// SPELLCHECK('exoplatform') will always evaluate to true
Query query = qm.createQuery("SELECT rep:spellcheck() FROM nt:base WHERE jcr:path = '/' AND SPELLCHECK('explatform')", Query.SQL);
RowIterator rows = query.execute().getRows();
@@ -317,67 +317,67 @@
String suggestion = v.getString();
}</programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Searching_Repository_Content-Similarity_Since_1.12">
- <title>Similarity (Since 1.12)</title>
- <para>
- Starting with version, 1.12 JCR allows you to search for nodes that are similar to an existing node.
- </para>
- <para>
- Similarity is determined by looking up terms that are common to nodes. There are some conditions that must be met for a term to be considered. This is required to limit the number possibly relevant terms.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Only terms with at least 4 characters are considered.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_Repository_Content-Similarity_Since_1.12">
+ <title>Similarity (Since 1.12)</title>
+ <para>
+ Starting with version, 1.12 JCR allows you to search for nodes that are similar to an existing node.
+ </para>
+ <para>
+ Similarity is determined by looking up terms that are common to nodes. There are some conditions that must be met for a term to be considered. This is required to limit the number possibly relevant terms.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Only terms with at least 4 characters are considered.
+ </para>
- </listitem>
- <listitem>
- <para>
- Only terms that occur at least 2 times in the source node are considered.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Only terms that occur at least 2 times in the source node are considered.
+ </para>
- </listitem>
- <listitem>
- <para>
- Only terms that occur in at least 5 nodes are considered.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Only terms that occur in at least 5 nodes are considered.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Note: The similarity functionality requires that the support Hightlighting is enabled. Please make sure that you have the following parameter set for the query handler in your workspace.xml.
- </para>
-
+ </itemizedlist>
+ <para>
+ Note: The similarity functionality requires that the support Hightlighting is enabled. Please make sure that you have the following parameter set for the query handler in your workspace.xml.
+ </para>
+
<programlisting language="XML" role="XML"><param name="support-highlighting" value="true"/></programlisting>
- <para>
- The functions are called rep:similar() (in XPath) and similar() (in SQL) and have two arguments:
- </para>
- <para>
- relativePath: a relative path to a descendant node or . for the current node. absoluteStringPath: a string literal that contains the path to the node for which to find similar nodes.
- </para>
- <warning>
- <para>
- Relative path is not supported yet.
- </para>
+ <para>
+ The functions are called rep:similar() (in XPath) and similar() (in SQL) and have two arguments:
+ </para>
+ <para>
+ relativePath: a relative path to a descendant node or . for the current node. absoluteStringPath: a string literal that contains the path to the node for which to find similar nodes.
+ </para>
+ <warning>
+ <para>
+ Relative path is not supported yet.
+ </para>
- </warning>
- <para>
- Examples:
- </para>
-
+ </warning>
+ <para>
+ Examples:
+ </para>
+
<programlisting>//element(*, nt:resource)[rep:similar(., '/parentnode/node.txt/jcr:content')]</programlisting>
- <para>
- Finds nt:resource nodes, which are similar to node by path /parentnode/node.txt/jcr:content.
- </para>
+ <para>
+ Finds nt:resource nodes, which are similar to node by path /parentnode/node.txt/jcr:content.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/spell-checker.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/spell-checker.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/spell-checker.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,23 +4,23 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase">
- <title>Checking the spelling of Phrase</title>
- <para>
- Check the correct spelling of phrase 'quik OR (-foo bar)' according to data already stored in index.
- </para>
- <note>
- <para>
- See also about SpellChecker configuration - <xref linkend="sect-Reference_Guide-Searching_Repository_Content" />
- </para>
+ <title>Checking the spelling of Phrase</title>
+ <para>
+ Check the correct spelling of phrase 'quik OR (-foo bar)' according to data already stored in index.
+ </para>
+ <note>
+ <para>
+ See also about SpellChecker configuration - <xref linkend="sect-Reference_Guide-Searching_Repository_Content" />
+ </para>
- </note>
- <para>
- SpellChecker must be settled in query-handler config.
- </para>
- <para>
- test-jcr-config.xml:
- </para>
-
+ </note>
+ <para>
+ SpellChecker must be settled in query-handler config.
+ </para>
+ <para>
+ test-jcr-config.xml:
+ </para>
+
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
@@ -28,41 +28,41 @@
...
</properties>
</query-handler></programlisting>
- <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Repository_structure">
- <title>Repository structure:</title>
- <para>
- Repository contains node, with string property "The quick brown fox jumps over the lazy dog."
- </para>
- <itemizedlist>
- <listitem>
- <para>
- root
- </para>
- <itemizedlist>
- <listitem>
- <para>
- node1 property="The quick brown fox jumps over the lazy dog."
- </para>
+ <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Repository_structure">
+ <title>Repository structure:</title>
+ <para>
+ Repository contains node, with string property "The quick brown fox jumps over the lazy dog."
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ root
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ node1 property="The quick brown fox jumps over the lazy dog."
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Query_execution">
- <title>Query execution</title>
- <para>
- Query looks only for root node, because spell checker looks for suggestions by full index. So complicated query is redundant.
- </para>
- <para>
- <emphasis role="bold">SQL</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Query_execution">
+ <title>Query execution</title>
+ <para>
+ Query looks only for root node, because spell checker looks for suggestions by full index. So complicated query is redundant.
+ </para>
+ <para>
+ <emphasis role="bold">SQL</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -70,10 +70,10 @@
Query query = queryManager.createQuery(sqlStatement, Query.SQL);
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- <para>
- <emphasis role="bold">XPath</emphasis>
- </para>
-
+ <para>
+ <emphasis role="bold">XPath</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -82,23 +82,23 @@
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Fetching_result">
- <title>Fetching result</title>
- <para>
- Get suggestion of coorect spelling our phrase:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Checking_the_spelling_of_Phrase-Fetching_result">
+ <title>Fetching result</title>
+ <para>
+ Get suggestion of correct spelling our phrase:
+ </para>
+
<programlisting language="Java" role="Java">RowIterator it = result.getRows();
Row r = rows.nextRow();
Value v = r.getValue("rep:spellcheck()");
String correctPhrase = v.getString();</programlisting>
- <para>
- So, correct spelling for phrase "quik OR (-foo bar)" is "quick OR (-fox bar)".
- </para>
+ <para>
+ So, correct spelling for phrase "quik OR (-foo bar)" is "quick OR (-fox bar)".
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/synonim-provider.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/synonim-provider.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/searching/synonim-provider.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -3,21 +3,21 @@
<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent">
%BOOK_ENTITIES;
]>
-<section id="sect-Reference_Guide-Searching_By_Synonim">
- <title>Searching By Synonim</title>
- <para>
- Find all mix:title nodes where title contains synonims to 'fast' word.
- </para>
- <note>
- <para>
- See also about synonim propvider configuration - <xref linkend="sect-Reference_Guide-Searching_Repository_Content" />
- </para>
+<section id="sect-Reference_Guide-Searching_By_Synonym">
+ <title>Searching By Synonym</title>
+ <para>
+ Find all mix:title nodes where title contains synonyms to 'fast' word.
+ </para>
+ <note>
+ <para>
+ See also about synonym provider configuration - <xref linkend="sect-Reference_Guide-Searching_Repository_Content" />
+ </para>
- </note>
- <para>
- Synonim provider must be configured in indexing-configuration.xml :
- </para>
-
+ </note>
+ <para>
+ Synonym provider must be configured in indexing-configuration.xml :
+ </para>
+
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
@@ -26,45 +26,45 @@
...
</properties>
</query-handler></programlisting>
- <para>
- File synonim.properties contains next synonims list:
- </para>
-
+ <para>
+ File synonym.properties contains next synonyms list:
+ </para>
+
<programlisting>ASF=Apache Software Foundation
quick=fast
sluggish=lazy</programlisting>
- <section id="sect-Reference_Guide-Searching_By_Synonim-Repository_structure">
- <title>Repository structure:</title>
- <para>
- Repository contains mix:title nodes, where jcr:title has different values.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- root
- </para>
- <itemizedlist>
- <listitem>
- <para>
- document1 (mix:title) jcr:title="The quick brown fox jumps over the lazy dog."
- </para>
+ <section id="sect-Reference_Guide-Searching_By_synonym-Repository_structure">
+ <title>Repository structure:</title>
+ <para>
+ Repository contains mix:title nodes, where jcr:title has different values.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ root
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ document1 (mix:title) jcr:title="The quick brown fox jumps over the lazy dog."
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Searching_By_Synonim-Query_execution">
- <title>Query execution</title>
- <para>
- <emphasis role="bold">SQL</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_By_synonym-Query_execution">
+ <title>Query execution</title>
+ <para>
+ <emphasis role="bold">SQL</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make SQL query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -72,10 +72,10 @@
Query query = queryManager.createQuery(sqlStatement, Query.SQL);
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- <para>
- <emphasis role="bold">XPath</emphasis>
- </para>
-
+ <para>
+ <emphasis role="bold">XPath</emphasis>
+ </para>
+
<programlisting language="Java" role="Java">// make XPath query
QueryManager queryManager = workspace.getQueryManager();
// create query
@@ -84,25 +84,25 @@
// execute query and fetch result
QueryResult result = query.execute();</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Searching_By_Synonim-Fetching_result">
- <title>Fetching result</title>
- <para>
- Let's get nodes:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Searching_By_synonym-Fetching_result">
+ <title>Fetching result</title>
+ <para>
+ Let's get nodes:
+ </para>
+
<programlisting language="Java" role="Java">NodeIterator it = result.getNodes();
if(it.hasNext())
{
Node findedNode = it.nextNode();
}</programlisting>
- <para>
- NodeIterator will return expected document1. This is a purpose of synonim providers. Find by specified word, but return by all synonims to.
- </para>
+ <para>
+ NodeIterator will return expected document1. This is a purpose of synonym providers. Find by specified word, but return by all synonyms to.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/statistics.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/statistics.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/statistics.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,280 +4,280 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-eXo_JCR_statistics">
- <title>eXo JCR statistics</title>
- <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_on_the_Database_Access_Layer">
- <title>Statistics on the Database Access Layer</title>
- <para>
- In order to have a better idea of the time spent into the database access layer, it can be interesting to get some statistics on that part of the code, knowing that most of the time spent into eXo JCR is mainly the database access. This statistics will then allow you to identify without using any profiler what is normally slow in this layer, which could help to fix the problem quickly.
- </para>
- <para>
- In case you use <envar>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</envar> or <envar>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</envar> as <envar>WorkspaceDataContainer</envar>, you can get statistics on the time spent into the database access layer. The database access layer (in eXo JCR) is represented by the methods of the interface <envar>org.exoplatform.services.jcr.storage.WorkspaceStorageConnection</envar>, so for all the methods defined in this interface, we can have the following figures:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The minimum time spent into the method.
- </para>
+ <title>eXo JCR statistics</title>
+ <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_on_the_Database_Access_Layer">
+ <title>Statistics on the Database Access Layer</title>
+ <para>
+ In order to have a better idea of the time spent into the database access layer, it can be interesting to get some statistics on that part of the code, knowing that most of the time spent into eXo JCR is mainly the database access. This statistics will then allow you to identify without using any profiler what is normally slow in this layer, which could help to fix the problem quickly.
+ </para>
+ <para>
+ In case you use <envar>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</envar> or <envar>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</envar> as <envar>WorkspaceDataContainer</envar>, you can get statistics on the time spent into the database access layer. The database access layer (in eXo JCR) is represented by the methods of the interface <envar>org.exoplatform.services.jcr.storage.WorkspaceStorageConnection</envar>, so for all the methods defined in this interface, we can have the following figures:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The minimum time spent into the method.
+ </para>
- </listitem>
- <listitem>
- <para>
- The maximum time spent into the method.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The maximum time spent into the method.
+ </para>
- </listitem>
- <listitem>
- <para>
- The average time spent into the method.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The average time spent into the method.
+ </para>
- </listitem>
- <listitem>
- <para>
- The total amount of time spent into the method.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The total amount of time spent into the method.
+ </para>
- </listitem>
- <listitem>
- <para>
- The total amount of time the method has been called.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The total amount of time the method has been called.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Those figures are also available globaly for all the methods which gives us the global behavior of this layer.
- </para>
- <para>
- If you want to enable the statistics, you just need to set the JVM parameter called <emphasis>JDBCWorkspaceDataContainer.statistics.enabled</emphasis> to <emphasis>true</emphasis>. The corresponding CSV file is <emphasis>StatisticsJDBCStorageConnection-${creation-timestamp}.csv</emphasis> for more details about how the csv files are managed, please refer to the section dedicated to the statistics manager.
- </para>
- <para>
- The format of each column header is ${method-alias}-${metric-alias}. The metric alias are described in the statistics manager section.
- </para>
- <para>
- The name of the category of statistics corresponding to these statistics is <emphasis>JDBCStorageConnection</emphasis>, this name is mostly needed to access to the statistics through JMX.
- </para>
- <table id="tabl-Reference_Guide-Statistics_on_the_Database_Access_Layer-Method_Alias">
- <title>Method Alias</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- global
- </entry>
- <entry>
- This is the alias for all the methods.
- </entry>
+ </itemizedlist>
+ <para>
+ Those figures are also available globaly for all the methods which gives us the global behavior of this layer.
+ </para>
+ <para>
+ If you want to enable the statistics, you just need to set the JVM parameter called <emphasis>JDBCWorkspaceDataContainer.statistics.enabled</emphasis> to <emphasis>true</emphasis>. The corresponding CSV file is <emphasis>StatisticsJDBCStorageConnection-${creation-timestamp}.csv</emphasis> for more details about how the csv files are managed, please refer to the section dedicated to the statistics manager.
+ </para>
+ <para>
+ The format of each column header is ${method-alias}-${metric-alias}. The metric alias are described in the statistics manager section.
+ </para>
+ <para>
+ The name of the category of statistics corresponding to these statistics is <emphasis>JDBCStorageConnection</emphasis>, this name is mostly needed to access to the statistics through JMX.
+ </para>
+ <table id="tabl-Reference_Guide-Statistics_on_the_Database_Access_Layer-Method_Alias">
+ <title>Method Alias</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ global
+ </entry>
+ <entry>
+ This is the alias for all the methods.
+ </entry>
- </row>
- <row>
- <entry>
- getItemDataById
- </entry>
- <entry>
- This is the alias for the method <emphasis>getItemData(String identifier).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getItemDataById
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getItemData(String identifier).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- getItemDataByNodeDataNQPathEntry
- </entry>
- <entry>
- This is the alias for the method <emphasis>getItemData(NodeData parentData, QPathEntry name).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getItemDataByNodeDataNQPathEntry
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getItemData(NodeData parentData, QPathEntry name).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- getChildNodesData
- </entry>
- <entry>
- This is the alias for the method <emphasis>getChildNodesData(NodeData parent).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getChildNodesData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getChildNodesData(NodeData parent).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- getChildNodesCount
- </entry>
- <entry>
- This is the alias for the method <emphasis>getChildNodesCount(NodeData parent).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getChildNodesCount
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getChildNodesCount(NodeData parent).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- getChildPropertiesData
- </entry>
- <entry>
- This is the alias for the method <emphasis>getChildPropertiesData(NodeData parent).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getChildPropertiesData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getChildPropertiesData(NodeData parent).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- listChildPropertiesData
- </entry>
- <entry>
- This is the alias for the method <emphasis>listChildPropertiesData(NodeData parent).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ listChildPropertiesData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>listChildPropertiesData(NodeData parent).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- getReferencesData
- </entry>
- <entry>
- This is the alias for the method <emphasis>getReferencesData(String nodeIdentifier).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ getReferencesData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>getReferencesData(String nodeIdentifier).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- commit
- </entry>
- <entry>
- This is the alias for the method <emphasis>commit().</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ commit
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>commit().</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- addNodeData
- </entry>
- <entry>
- This is the alias for the method <emphasis>add(NodeData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ addNodeData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>add(NodeData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- addPropertyData
- </entry>
- <entry>
- This is the alias for the method <emphasis>add(PropertyData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ addPropertyData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>add(PropertyData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- updateNodeData
- </entry>
- <entry>
- This is the alias for the method <emphasis>update(NodeData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ updateNodeData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>update(NodeData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- updatePropertyData
- </entry>
- <entry>
- This is the alias for the method <emphasis>update(PropertyData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ updatePropertyData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>update(PropertyData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- deleteNodeData
- </entry>
- <entry>
- This is the alias for the method <emphasis>delete(NodeData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ deleteNodeData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>delete(NodeData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- deletePropertyData
- </entry>
- <entry>
- This is the alias for the method <emphasis>delete(PropertyData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ deletePropertyData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>delete(PropertyData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- renameNodeData
- </entry>
- <entry>
- This is the alias for the method <emphasis>rename(NodeData data).</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ renameNodeData
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>rename(NodeData data).</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- rollback
- </entry>
- <entry>
- This is the alias for the method <emphasis>rollback().</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ rollback
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>rollback().</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- isOpened
- </entry>
- <entry>
- This is the alias for the method <emphasis>isOpened().</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ isOpened
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>isOpened().</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- close
- </entry>
- <entry>
- This is the alias for the method <emphasis>close().</emphasis>
- </entry>
+ </row>
+ <row>
+ <entry>
+ close
+ </entry>
+ <entry>
+ This is the alias for the method <emphasis>close().</emphasis>
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
- <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_on_the_JCR_API_accesses">
- <title>Statistics on the JCR API accesses</title>
- <para>
- In order to know exactly how your application uses eXo JCR, it can be interesting to register all the JCR API accesses in order to easily create real life test scenario based on pure JCR calls and also to tune your eXo JCR to better fit your requirements.
- </para>
- <para>
- In order to allow you to specify the configuration which part of eXo JCR needs to be monitored whithout applying any changes in your code and/or building anything, we choose to rely on the Load-time Weaving proposed by AspectJ.
- </para>
- <para>
- To enable this feature, you will have to add in your classpath the following jar files:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>exo.jcr.component.statistics-X.Y.Z</emphasis>.jar corresponding to your eXo JCR version that you can get from the jboss maven repository <ulink url="http://repository.jboss.com/maven2/org/exoplatform/jcr/exo.jcr.component....">http://repository.jboss.com/maven2/org/exoplatform/jcr/exo.jcr.component....</ulink>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_on_the_JCR_API_accesses">
+ <title>Statistics on the JCR API accesses</title>
+ <para>
+ In order to know exactly how your application uses eXo JCR, it can be interesting to register all the JCR API accesses in order to easily create real life test scenario based on pure JCR calls and also to tune your eXo JCR to better fit your requirements.
+ </para>
+ <para>
+ In order to allow you to specify the configuration which part of eXo JCR needs to be monitored without applying any changes in your code and/or building anything, we choose to rely on the Load-time Weaving proposed by AspectJ.
+ </para>
+ <para>
+ To enable this feature, you will have to add in your classpath the following jar files:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>exo.jcr.component.statistics-X.Y.Z</emphasis>.jar corresponding to your eXo JCR version that you can get from the jboss maven repository <ulink url="http://repository.jboss.com/maven2/org/exoplatform/jcr/exo.jcr.component....">http://repository.jboss.com/maven2/org/exoplatform/jcr/exo.jcr.component....</ulink>.
+ </para>
- </listitem>
- <listitem>
- <para>
- aspectjrt-1.6.8.jar that you can get from the main maven repository <ulink url="http://repo2.maven.org/maven2/org/aspectj/aspectjrt"><uri>http://repo2.maven.org/maven2/org/aspectj/aspectjrt</uri></ulink>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ aspectjrt-1.6.8.jar that you can get from the main maven repository <ulink url="http://repo2.maven.org/maven2/org/aspectj/aspectjrt"><uri>http://repo2.maven.org/maven2/org/aspectj/aspectjrt</uri></ulink>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- You will also need to get aspectjweaver-1.6.8.jar from the main maven repository <ulink url="http://repo2.maven.org/maven2/org/aspectj/aspectjweaver">http://repo2.maven.org/maven2/org/aspectj/aspectjweaver</ulink>. At this stage, to enable the statistics on the JCR API accesses, you will need to add the JVM parameter <emphasis>-javaagent:${pathto}/aspectjweaver-1.6.8.jar</emphasis> to your command line, for more details please refer to <ulink url="http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html">http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html</ulink>.
- </para>
- <para>
- By default, the configuration will collect statistcs on all the methods of the internal interfaces <emphasis>org.exoplatform.services.jcr.core.ExtendedSession</emphasis> and <emphasis>org.exoplatform.services.jcr.core.ExtendedNode</emphasis>, and the JCR API interface <emphasis>javax.jcr.Property</emphasis>. To add and/or remove some interfaces to monitor, you have two configuration files to change that are bundled into the jar <emphasis>exo.jcr.component.statistics-X.Y.Z</emphasis>.jar, which are <emphasis>conf/configuration.xml</emphasis> and <emphasis>META-INF/aop.xml</emphasis>.
- </para>
- <para>
- The file content below is the content of <emphasis>conf/configuration.xml</emphasis> that you will need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the list of parameter values of the init param called <emphasis>targetInterfaces</emphasis>.
- </para>
-
+ </itemizedlist>
+ <para>
+ You will also need to get aspectjweaver-1.6.8.jar from the main maven repository <ulink url="http://repo2.maven.org/maven2/org/aspectj/aspectjweaver">http://repo2.maven.org/maven2/org/aspectj/aspectjweaver</ulink>. At this stage, to enable the statistics on the JCR API accesses, you will need to add the JVM parameter <emphasis>-javaagent:${pathto}/aspectjweaver-1.6.8.jar</emphasis> to your command line, for more details please refer to <ulink url="http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html">http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html</ulink>.
+ </para>
+ <para>
+ By default, the configuration will collect statistics on all the methods of the internal interfaces <emphasis>org.exoplatform.services.jcr.core.ExtendedSession</emphasis> and <emphasis>org.exoplatform.services.jcr.core.ExtendedNode</emphasis>, and the JCR API interface <emphasis>javax.jcr.Property</emphasis>. To add and/or remove some interfaces to monitor, you have two configuration files to change that are bundled into the jar <emphasis>exo.jcr.component.statistics-X.Y.Z</emphasis>.jar, which are <emphasis>conf/configuration.xml</emphasis> and <emphasis>META-INF/aop.xml</emphasis>.
+ </para>
+ <para>
+ The file content below is the content of <emphasis>conf/configuration.xml</emphasis> that you will need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the list of parameter values of the init param called <emphasis>targetInterfaces</emphasis>.
+ </para>
+
<programlisting language="XML" role="XML"><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
@@ -293,10 +293,10 @@
</init-params>
</component>
</configuration></programlisting>
- <para>
- The file content below is the content of <emphasis>META-INF/aop.xml</emphasis> that you will to need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the expression filter of the pointcut called <emphasis>JCRAPIPointcut</emphasis>. As you can see below, by default only JCR API calls from the exoplatform packages are took into account, don't hesistate to modify this filter to add your own package names.
- </para>
-
+ <para>
+ The file content below is the content of <emphasis>META-INF/aop.xml</emphasis> that you will to need to modify to add and/or remove the full qualified name of the interfaces to monitor, into the expression filter of the pointcut called <emphasis>JCRAPIPointcut</emphasis>. As you can see below, by default only JCR API calls from the exoplatform packages are took into account, do not hesitate to modify this filter to add your own package names.
+ </para>
+
<programlisting language="XML" role="XML"><aspectj>
<aspects>
<concrete-aspect name="org.exoplatform.services.jcr.statistics.JCRAPIAspectImpl" extends="org.exoplatform.services.jcr.statistics.JCRAPIAspect">
@@ -308,169 +308,169 @@
<include within="org.exoplatform..*" />
</weaver>
</aspectj></programlisting>
- <para>
- The corresponding CSV files are of type <emphasis>Statistics${interface-name}-${creation-timestamp}.csv</emphasis> for more details about how the csv files are managed, please refer to the section dedicated to the statistics manager.
- </para>
- <para>
- The format of each column header is ${method-alias}-${metric-alias}. The method alias will be of type ${method-name}(list of parameter types separeted by ; to be compatible with the CSV format).
- </para>
- <para>
- The metric alias are described in the statistics manager section.
- </para>
- <para>
- The name of the category of statistics corresponding to these statistics is the simple name of the monitored interface (e.g. ExtendedSession for org.exoplatform.services.jcr.core.ExtendedSession), this name is mostly needed to access to the statistics through JMX.
- </para>
- <remark>Please note that this feature will affect the performances of eXo JCR so it must be used with caution.</remark>
+ <para>
+ The corresponding CSV files are of type <emphasis>Statistics${interface-name}-${creation-timestamp}.csv</emphasis> for more details about how the csv files are managed, please refer to the section dedicated to the statistics manager.
+ </para>
+ <para>
+ The format of each column header is ${method-alias}-${metric-alias}. The method alias will be of type ${method-name}(list of parameter types separated by ; to be compatible with the CSV format).
+ </para>
+ <para>
+ The metric alias are described in the statistics manager section.
+ </para>
+ <para>
+ The name of the category of statistics corresponding to these statistics is the simple name of the monitored interface (e.g. ExtendedSession for org.exoplatform.services.jcr.core.ExtendedSession), this name is mostly needed to access to the statistics through JMX.
+ </para>
+ <remark>Please note that this feature will affect the performances of eXo JCR so it must be used with caution.</remark>
- </section>
-
- <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_Manager">
- <title>Statistics Manager</title>
- <para>
- The statistics manager manages all the statistics provided by eXo JCR, it is responsible of printing the data into the CSV files and also exposing the statistics through JMX and/or Rest.
- </para>
- <para>
- The statistics manager will create all the CSV files for each category of statistics that it manages, the format of those files is <emphasis>Statistics${category-name}-${creation-timestamp}.csv</emphasis>. Those files will be created into the user directory if it is possible otherwise it will create them into the temporary directory. The format of those files is <envar>CSV</envar> (i.e. Comma-Seperated Values), one new line will be added regularily (every 5 seconds by default) and one last line will be added at JVM exit. Each line, will be composed of the 5 figures described below for each method and globaly for all the methods.
- </para>
- <para>
- <table id="tabl-Reference_Guide-Statistics_Manager-Metric_Alias">
- <title>Metric Alias</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- Min
- </entry>
- <entry>
- The minimum time spent into the method expressed in milliseconds.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-eXo_JCR_statistics-Statistics_Manager">
+ <title>Statistics Manager</title>
+ <para>
+ The statistics manager manages all the statistics provided by eXo JCR, it is responsible of printing the data into the CSV files and also exposing the statistics through JMX and/or Rest.
+ </para>
+ <para>
+ The statistics manager will create all the CSV files for each category of statistics that it manages, the format of those files is <emphasis>Statistics${category-name}-${creation-timestamp}.csv</emphasis>. Those files will be created into the user directory if it is possible otherwise it will create them into the temporary directory. The format of those files is <envar>CSV</envar> (i.e. Comma-Separated Values), one new line will be added regularly (every 5 seconds by default) and one last line will be added at JVM exit. Each line, will be composed of the 5 figures described below for each method and globally for all the methods.
+ </para>
+ <para>
+ <table id="tabl-Reference_Guide-Statistics_Manager-Metric_Alias">
+ <title>Metric Alias</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ Min
+ </entry>
+ <entry>
+ The minimum time spent into the method expressed in milliseconds.
+ </entry>
- </row>
- <row>
- <entry>
- Max
- </entry>
- <entry>
- The maximum time spent into the method expressed in milliseconds.
- </entry>
+ </row>
+ <row>
+ <entry>
+ Max
+ </entry>
+ <entry>
+ The maximum time spent into the method expressed in milliseconds.
+ </entry>
- </row>
- <row>
- <entry>
- Total
- </entry>
- <entry>
- The total amount of time spent into the method expressed in milliseconds.
- </entry>
+ </row>
+ <row>
+ <entry>
+ Total
+ </entry>
+ <entry>
+ The total amount of time spent into the method expressed in milliseconds.
+ </entry>
- </row>
- <row>
- <entry>
- Avg
- </entry>
- <entry>
- The average time spent into the method expressed in milliseconds.
- </entry>
+ </row>
+ <row>
+ <entry>
+ Avg
+ </entry>
+ <entry>
+ The average time spent into the method expressed in milliseconds.
+ </entry>
- </row>
- <row>
- <entry>
- Times
- </entry>
- <entry>
- The total amount of times the method has been called.
- </entry>
+ </row>
+ <row>
+ <entry>
+ Times
+ </entry>
+ <entry>
+ The total amount of times the method has been called.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- You can disable the persistence of the statistics by setting the JVM parameter called <emphasis>JCRStatisticsManager.persistence.enabled</emphasis> to <emphasis>false</emphasis>, by default, it is set to <emphasis>true</emphasis>. You can aslo define the period of time between each record (i.e. line of data into the file) by setting the JVM parameter called <emphasis>JCRStatisticsManager.persistence.timeout</emphasis> to your expected value expressed in milliseconds, by default it is set to <emphasis>5000</emphasis>.
- </para>
- <para>
- You can also access to the statistics thanks to JMX, the available methods are the following:
- </para>
- <para>
- <table id="tabl-Reference_Guide-Statistics_Manager-JMX_Methods">
- <title>JMX Methods</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- getMin
- </entry>
- <entry>
- Give the minimum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </table>
+ You can disable the persistence of the statistics by setting the JVM parameter called <emphasis>JCRStatisticsManager.persistence.enabled</emphasis> to <emphasis>false</emphasis>, by default, it is set to <emphasis>true</emphasis>. You can also define the period of time between each record (i.e. line of data into the file) by setting the JVM parameter called <emphasis>JCRStatisticsManager.persistence.timeout</emphasis> to your expected value expressed in milliseconds, by default it is set to <emphasis>5000</emphasis>.
+ </para>
+ <para>
+ You can also access to the statistics thanks to JMX, the available methods are the following:
+ </para>
+ <para>
+ <table id="tabl-Reference_Guide-Statistics_Manager-JMX_Methods">
+ <title>JMX Methods</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ getMin
+ </entry>
+ <entry>
+ Give the minimum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- getMax
- </entry>
- <entry>
- Give the maximum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </row>
+ <row>
+ <entry>
+ getMax
+ </entry>
+ <entry>
+ Give the maximum time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- getTotal
- </entry>
- <entry>
- Give the total amount of time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </row>
+ <row>
+ <entry>
+ getTotal
+ </entry>
+ <entry>
+ Give the total amount of time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- getAvg
- </entry>
- <entry>
- Give the average time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </row>
+ <row>
+ <entry>
+ getAvg
+ </entry>
+ <entry>
+ Give the average time spent into the method corresponding to the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- getTimes
- </entry>
- <entry>
- Give the total amount of times the method has been called corresponding to the given ,category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </row>
+ <row>
+ <entry>
+ getTimes
+ </entry>
+ <entry>
+ Give the total amount of times the method has been called corresponding to the given ,category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- reset
- </entry>
- <entry>
- Reset the statistics for the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
- </entry>
+ </row>
+ <row>
+ <entry>
+ reset
+ </entry>
+ <entry>
+ Reset the statistics for the given category name and statistics name. The expected arguments are the name of the category of statistics (e.g. JDBCStorageConnection) and the name of the expected method or global for the global value.
+ </entry>
- </row>
- <row>
- <entry>
- resetAll
- </entry>
- <entry>
- Reset all the statistics for the given category name. The expected argument is the name of the category of statistics (e.g. JDBCStorageConnection).
- </entry>
+ </row>
+ <row>
+ <entry>
+ resetAll
+ </entry>
+ <entry>
+ Reset all the statistics for the given category name. The expected argument is the name of the category of statistics (e.g. JDBCStorageConnection).
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- The full name of the related MBean is <emphasis>exo:service=statistic, view=jcr</emphasis>.
- </para>
+ </table>
+ The full name of the related MBean is <emphasis>exo:service=statistic, view=jcr</emphasis>.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -160,7 +160,7 @@
<section id="sect-Reference_Guide-Advanced_concepts-Invalidation">
<title>Invalidation</title>
<para>
- In case, you have big values or non serializable values and you need a replicated cache to at list invalidate the data when it is needed, you can use the invalidation mode that will work on top of any replicated cache implementations. This is possible thanks to the class <emphasis>InvalidationExoCache</emphasis> which is actually a decorator whose idea is to replicate the the hash code of the value in order to know if it is needed or not to invalidate the local data, if the new hash code of the value is the same as the old value, we assume that it is the same value so we don't invalidate the old value. This is required to avoid the following infinite loop that we will face with invalidation mode proposed out of the box by JBoss Cache for example:
+ In case, you have big values or non serializable values and you need a replicated cache to at list invalidate the data when it is needed, you can use the invalidation mode that will work on top of any replicated cache implementations. This is possible thanks to the class <emphasis>InvalidationExoCache</emphasis> which is actually a decorator whose idea is to replicate the hash code of the value in order to know if it is needed or not to invalidate the local data, if the new hash code of the value is the same as the old value, we assume that it is the same value so we don't invalidate the old value. This is required to avoid the following infinite loop that we will face with invalidation mode proposed out of the box by JBoss Cache for example:
</para>
<orderedlist>
<listitem>
@@ -737,7 +737,7 @@
<section id="sect-Reference_Guide-Defining_a_cache-How_to_define_a_distributed_or_a_local_cache">
<title>How to define a distributed or a local cache?</title>
<para>
- Actually, if you use a custom configuration for your cache as described in a previous section, we will use the cache mode definde in your configuration file.
+ Actually, if you use a custom configuration for your cache as described in a previous section, we will use the cache mode define in your configuration file.
</para>
<para>
In case, you decide to use the default configuration template, we use the field <emphasis>distributed</emphasis> of your <envar>ExoCacheConfig</envar> to decide. In other words, if the value of this field is false (the default value), the cache will be a local cache, otherwise it will be the cache mode defined in your default configuration template that should be distributed.
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/container-configuration.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/container-configuration.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/container-configuration.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,27 +4,27 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Container_Configuration">
- <title>Container Configuration</title>
- <section id="sect-Reference_Guide-Container_Configuration-Intro">
- <title>Intro</title>
- <para>
- eXo Portal uses PicoContainer, which implements the Inversion of Control (IoC) design pattern. All eXo containers inherit from a PicoContainer. There are mainly two eXo containers used, each of them can provide one or several services. Each container service is delivered in a JAR file. This JAR file may contain a default configuration. The use of default configurations is recommended and most services provide it.
- </para>
- <para>
- When a Pico Container searches for services and its configurations, each configurable service may be reconfigured to override default values or set additional parameters. If the service is configured in two or more places the configuration override mechanism will be used.
- </para>
- <para>
- Confused? - You might be interested in the <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" /> article, which explains the basics.
- </para>
+ <title>Container Configuration</title>
+ <section id="sect-Reference_Guide-Container_Configuration-Intro">
+ <title>Intro</title>
+ <para>
+ eXo Portal uses PicoContainer, which implements the Inversion of Control (IoC) design pattern. All eXo containers inherit from a PicoContainer. There are mainly two eXo containers used, each of them can provide one or several services. Each container service is delivered in a JAR file. This JAR file may contain a default configuration. The use of default configurations is recommended and most services provide it.
+ </para>
+ <para>
+ When a Pico Container searches for services and its configurations, each configurable service may be reconfigured to override default values or set additional parameters. If the service is configured in two or more places the configuration override mechanism will be used.
+ </para>
+ <para>
+ Confused? - You might be interested in the <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" /> article, which explains the basics.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace">
- <title>Kernel configuration namespace</title>
- <para>
- To be effective, the namespace URI <uri>http://www.exoplaform.org/xml/ns/kernel_1_2.xsd</uri> must be target namespace of the XML configuration file.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace">
+ <title>Kernel configuration namespace</title>
+ <para>
+ To be effective, the namespace URI <uri>http://www.exoplaform.org/xml/ns/kernel_1_2.xsd</uri> must be target namespace of the XML configuration file.
+ </para>
+
<programlisting language="XML" role="XML"><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
@@ -32,11 +32,11 @@
...
</configuration></programlisting>
- <note>
- <para>
- Any values in the configuration files can be created thanks to variables since the eXo kernel resolves them, for example the following configuration will be well interpreted:
- </para>
-
+ <note>
+ <para>
+ Any values in the configuration files can be created thanks to variables since the eXo kernel resolves them, for example the following configuration will be well interpreted:
+ </para>
+
<programlisting language="XML" role="XML"><configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
@@ -47,233 +47,233 @@
<import>simple.xml</import>
</configuration></programlisting>
- <para>
- The variables that are supported, are System properties and variables that are specific to your portal container, see next sections for more details.
- </para>
+ <para>
+ The variables that are supported, are System properties and variables that are specific to your portal container, see next sections for more details.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-Understanding_how_configuration_files_are_loaded">
- <title>Understanding how configuration files are loaded</title>
- <para>
- eXo Portal uses PicoContainer, which implements the Inversion of Control (IoC) design pattern. All eXo containers inherit from a PicoContainer. There are mainly two eXo containers used, each of them can provide one or several services. Each container service is delivered in a JAR file. This JAR file may contain a default configuration. The use of default configurations is recommended and most of services provide it.
- </para>
- <para>
- When a Pico Container searches for services and its configurations, each configurable service may be reconfigured to override default values or set additional parameters. If the service is configured in two or more places, the configuration override mechanism will be used.
- </para>
- <section id="sect-Reference_Guide-Understanding_how_configuration_files_are_loaded-Configuration_Retrieval">
- <title>Configuration Retrieval</title>
- <para>
- The container performs the following steps to make eXo Container configuration retrieval, depending on the container type.
- </para>
- <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_order_for_the_PortalContainer">
- <title>Configuration retrieval order for the <envar>PortalContainer</envar></title>
- <para>
- The container is initialized by looking into different locations. This container is used by portal applications. Configurations are overloaded in the following lookup sequence:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Services default <envar>RootContainer</envar> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-Understanding_how_configuration_files_are_loaded">
+ <title>Understanding how configuration files are loaded</title>
+ <para>
+ eXo Portal uses PicoContainer, which implements the Inversion of Control (IoC) design pattern. All eXo containers inherit from a PicoContainer. There are mainly two eXo containers used, each of them can provide one or several services. Each container service is delivered in a JAR file. This JAR file may contain a default configuration. The use of default configurations is recommended and most of services provide it.
+ </para>
+ <para>
+ When a Pico Container searches for services and its configurations, each configurable service may be reconfigured to override default values or set additional parameters. If the service is configured in two or more places, the configuration override mechanism will be used.
+ </para>
+ <section id="sect-Reference_Guide-Understanding_how_configuration_files_are_loaded-Configuration_Retrieval">
+ <title>Configuration Retrieval</title>
+ <para>
+ The container performs the following steps to make eXo Container configuration retrieval, depending on the container type.
+ </para>
+ <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_order_for_the_PortalContainer">
+ <title>Configuration retrieval order for the <envar>PortalContainer</envar></title>
+ <para>
+ The container is initialized by looking into different locations. This container is used by portal applications. Configurations are overloaded in the following lookup sequence:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Services default <envar>RootContainer</envar> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- External <envar>RootContainer</envar> configuration can be found at <emphasis>$AS_HOME/exo-conf/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ External <envar>RootContainer</envar> configuration can be found at <emphasis>$AS_HOME/exo-conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Services default <envar>PortalContainer</envar> configurations from JAR files <emphasis>/conf/portal/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Services default <envar>PortalContainer</envar> configurations from JAR files <emphasis>/conf/portal/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Web applications configurations from WAR files <emphasis>/WEB-INF/conf/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Web applications configurations from WAR files <emphasis>/WEB-INF/conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- External configuration for services of named portal can be found at <emphasis>$AS_HOME/exo-conf/portal/$PORTAL_NAME/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ External configuration for services of named portal can be found at <emphasis>$AS_HOME/exo-conf/portal/$PORTAL_NAME/configuration.xml</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_for_a_StandaloneContainer">
- <title>Configuration retrieval for a <envar>StandaloneContainer</envar></title>
- <para>
- The container is initialized by looking into different locations. This container is used by non portal applications. Configurations are overloaded in the following lookup sequence:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Services default <envar>RootContainer</envar> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_for_a_StandaloneContainer">
+ <title>Configuration retrieval for a <envar>StandaloneContainer</envar></title>
+ <para>
+ The container is initialized by looking into different locations. This container is used by non portal applications. Configurations are overloaded in the following lookup sequence:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Services default <envar>RootContainer</envar> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- External <envar>RootContainer</envar> configuration can be found at <emphasis>$AS_HOME/exo-conf/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ External <envar>RootContainer</envar> configuration can be found at <emphasis>$AS_HOME/exo-conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Services default <envar>StandaloneContainer</envar> configurations from JAR files <emphasis>/conf/portal/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Services default <envar>StandaloneContainer</envar> configurations from JAR files <emphasis>/conf/portal/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Web applications configurations from WAR files <emphasis>/WEB-INF/conf/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Web applications configurations from WAR files <emphasis>/WEB-INF/conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Then depending on the <envar>StandaloneContainer</envar> configuration URL initialization:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- if configuration URL was initialized to be added to services defaults, as below:
- </para>
-
+ </listitem>
+ <listitem>
+ <para>
+ Then depending on the <envar>StandaloneContainer</envar> configuration URL initialization:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ if configuration URL was initialized to be added to services defaults, as below:
+ </para>
+
<programlisting language="Java" role="Java">// add configuration to the default services configurations from JARs/WARs
StandaloneContainer.addConfigurationURL(containerConf);</programlisting>
- <para>
- Configuration from added URL <emphasis>containerConf</emphasis> will override only services configured in the file
- </para>
+ <para>
+ Configuration from added URL <emphasis>containerConf</emphasis> will override only services configured in the file
+ </para>
- </listitem>
- <listitem>
- <para>
- if configuration URL not initialized at all, it will be found at <emphasis>$AS_HOME/exo-configuration.xml</emphasis>. If <emphasis>$AS_HOME/exo-configuration.xml</emphasis> doesn't exist the container will try find it at <emphasis>$AS_HOME/exo-conf/exo-configuration.xml</emphasis> location and if it's still not found and the <envar>StandaloneContainer</envar> instance obtained with the dedicated configuration <envar>ClassLoader</envar> the container will try to retrieve the resource <emphasis>conf/exo-configuration.xml</emphasis> within the given <envar>ClassLoader</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ if configuration URL not initialized at all, it will be found at <emphasis>$AS_HOME/exo-configuration.xml</emphasis>. If <emphasis>$AS_HOME/exo-configuration.xml</emphasis> doesn't exist the container will try find it at <emphasis>$AS_HOME/exo-conf/exo-configuration.xml</emphasis> location and if it's still not found and the <envar>StandaloneContainer</envar> instance obtained with the dedicated configuration <envar>ClassLoader</envar> the container will try to retrieve the resource <emphasis>conf/exo-configuration.xml</emphasis> within the given <envar>ClassLoader</envar>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-General_notes_about_the_configuration_retrieval">
- <title>General notes about the configuration retrieval</title>
- <note>
- <para>
- <emphasis>$AS_HOME</emphasis> - application server home directory, or <emphasis>user.dir</emphasis> JVM system property value in case of Java Standalone application. The application server home is:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- For <envar>Jonas</envar>, the value of the variable <emphasis>${jonas.base}.</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Retrieval-General_notes_about_the_configuration_retrieval">
+ <title>General notes about the configuration retrieval</title>
+ <note>
+ <para>
+ <emphasis>$AS_HOME</emphasis> - application server home directory, or <emphasis>user.dir</emphasis> JVM system property value in case of Java Standalone application. The application server home is:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ For <envar>Jonas</envar>, the value of the variable <emphasis>${jonas.base}.</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>Jetty</envar>, the value of the variable <emphasis>${jetty.home}.</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>Jetty</envar>, the value of the variable <emphasis>${jetty.home}.</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>Websphere</envar>, the value of the variable <emphasis>${was.install.root}.</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>Websphere</envar>, the value of the variable <emphasis>${was.install.root}.</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>Weblogic</envar>, the value of the variable <emphasis>${wls.home}</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>Weblogic</envar>, the value of the variable <emphasis>${wls.home}</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>Glassfish</envar>, the value of the variable <emphasis>${com.sun.aas.instanceRoot}</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>Glassfish</envar>, the value of the variable <emphasis>${com.sun.aas.instanceRoot}</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>Tomcat</envar>, the value of the variable <emphasis>${catalina.home}</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>Tomcat</envar>, the value of the variable <emphasis>${catalina.home}</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>JBoss AS</envar>, the value of the variable <emphasis>${jboss.server.config.url}</emphasis> if the exo-conf directory can be found there otherwise it will be the value of the variable <emphasis>${jboss.home.dir}</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>JBoss AS</envar>, the value of the variable <emphasis>${jboss.server.config.url}</emphasis> if the exo-conf directory can be found there otherwise it will be the value of the variable <emphasis>${jboss.home.dir}</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </note>
- <note>
- <para>
- <emphasis>$PORTAL_NAME</emphasis> - portal web application name.
- </para>
+ </note>
+ <note>
+ <para>
+ <emphasis>$PORTAL_NAME</emphasis> - portal web application name.
+ </para>
- </note>
- <note>
- <para>
- External configuration location can be overridden with System property <emphasis>exo.conf.dir</emphasis>. If the property exists, its value will be used as path to eXo configuration directory, i.e. to <emphasis>$AS_HOME/exo-conf</emphasis> alternative. E.g. put property in command line java <emphasis>-Dexo.conf.dir=/path/to/exo/conf</emphasis>. In this particular use case, you do not need to use any prefix to import other files. For instance, if your configuration file is <emphasis>$AS_HOME/exo-conf/portal/PORTAL_NAME/configuration.xml</emphasis> and you want to import the configuration file <emphasis>$AS_HOME/exo-conf/portal/PORTAL_NAME/mySubConfDir/myConfig.xml</emphasis>, you can do it by adding <emphasis><import>mySubConfDir/myConfig.xml</import></emphasis> to your configuration file.
- </para>
+ </note>
+ <note>
+ <para>
+ External configuration location can be overridden with System property <emphasis>exo.conf.dir</emphasis>. If the property exists, its value will be used as path to eXo configuration directory, i.e. to <emphasis>$AS_HOME/exo-conf</emphasis> alternative. E.g. put property in command line java <emphasis>-Dexo.conf.dir=/path/to/exo/conf</emphasis>. In this particular use case, you do not need to use any prefix to import other files. For instance, if your configuration file is <emphasis>$AS_HOME/exo-conf/portal/PORTAL_NAME/configuration.xml</emphasis> and you want to import the configuration file <emphasis>$AS_HOME/exo-conf/portal/PORTAL_NAME/mySubConfDir/myConfig.xml</emphasis>, you can do it by adding <emphasis><import>mySubConfDir/myConfig.xml</import></emphasis> to your configuration file.
+ </para>
- </note>
- <note>
- <para>
- The name of the configuration folder that is by default <emphasis>"exo-conf"</emphasis>, can be changed thanks to the System property <emphasis>exo.conf.dir.name</emphasis>.
- </para>
+ </note>
+ <note>
+ <para>
+ The name of the configuration folder that is by default <emphasis>"exo-conf"</emphasis>, can be changed thanks to the System property <emphasis>exo.conf.dir.name</emphasis>.
+ </para>
- </note>
- <note>
- <para>
- The search looks for a configuration file in each JAR/WAR available from the classpath using the current thread context classloader. During the search these configurations are added to a set. If the service was configured previously and the current JAR contains a new configuration of that service the latest (from the current JAR/WAR) will replace the previous one. The last one will be applied to the service during the services start phase.
- </para>
+ </note>
+ <note>
+ <para>
+ The search looks for a configuration file in each JAR/WAR available from the classpath using the current thread context classloader. During the search these configurations are added to a set. If the service was configured previously and the current JAR contains a new configuration of that service the latest (from the current JAR/WAR) will replace the previous one. The last one will be applied to the service during the services start phase.
+ </para>
- </note>
- <warning>
- <para>
- Take care to have no dependencies between configurations from JAR files (<emphasis>/conf/portal/configuration.xml</emphasis> and <emphasis>/conf/configuration.xml</emphasis>) since we have no way to know in advance the loading order of those configurations. In other words, if you want to overload some configuration located in the file <emphasis>/conf/portal/configuration.xml</emphasis> of a given JAR file, you must not do it from the file <emphasis>/conf/portal/configuration.xml</emphasis> of another JAR file but from another configuration file loaded after configurations from JAR files <emphasis>/conf/portal/configuration.xml.</emphasis>
- </para>
+ </note>
+ <warning>
+ <para>
+ Take care to have no dependencies between configurations from JAR files (<emphasis>/conf/portal/configuration.xml</emphasis> and <emphasis>/conf/configuration.xml</emphasis>) since we have no way to know in advance the loading order of those configurations. In other words, if you want to overload some configuration located in the file <emphasis>/conf/portal/configuration.xml</emphasis> of a given JAR file, you must not do it from the file <emphasis>/conf/portal/configuration.xml</emphasis> of another JAR file but from another configuration file loaded after configurations from JAR files <emphasis>/conf/portal/configuration.xml.</emphasis>
+ </para>
- </warning>
- <para>
- After the processing of all configurations available in system, the container will initialize it and start each service in order of the dependency injection (DI).
- </para>
- <para>
- The user/developer should be careful when configuring the same service in different configuration files. It's recommended to configure a service in its own JAR only. Or, in case of a portal configuration, strictly reconfigure the services in portal WAR files or in an external configuration.
- </para>
- <para>
- There are services that can be (or should be) configured more than one time. This depends on business logic of the service. A service may initialize the same resource (shared with other services) or may add a particular object to a set of objects (shared with other services too). In the first case, it's critical who will be the last, i.e. whose configuration will be used. In the second case, it's no matter who is the first and who is the last (if the parameter objects are independent).
- </para>
+ </warning>
+ <para>
+ After the processing of all configurations available in system, the container will initialize it and start each service in order of the dependency injection (DI).
+ </para>
+ <para>
+ The user/developer should be careful when configuring the same service in different configuration files. It's recommended to configure a service in its own JAR only. Or, in case of a portal configuration, strictly reconfigure the services in portal WAR files or in an external configuration.
+ </para>
+ <para>
+ There are services that can be (or should be) configured more than one time. This depends on business logic of the service. A service may initialize the same resource (shared with other services) or may add a particular object to a set of objects (shared with other services too). In the first case, it's critical who will be the last, i.e. whose configuration will be used. In the second case, it's no matter who is the first and who is the last (if the parameter objects are independent).
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_log">
- <title>Configuration retrieval log</title>
- <para>
- In case of problems with service configuration, it's important to know from which JAR/WAR it comes. For that purpose, the JVM system property <emphasis>org.exoplatform.container.configuration.debug</emphasis> can be used.
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Retrieval-Configuration_retrieval_log">
+ <title>Configuration retrieval log</title>
+ <para>
+ In case of problems with service configuration, it's important to know from which JAR/WAR it comes. For that purpose, the JVM system property <emphasis>org.exoplatform.container.configuration.debug</emphasis> can be used.
<programlisting>java -Dorg.exoplatform.container.configuration.debug ...</programlisting>
- </para>
- <para>
- If the property is enabled, the container configuration manager will log the configuration adding process at <emphasis>INFO</emphasis> level.
+ </para>
+ <para>
+ If the property is enabled, the container configuration manager will log the configuration adding process at <emphasis>INFO</emphasis> level.
<programlisting>......
Add configuration jar:file:/D:/Projects/eXo/dev/exo-working/exo-tomcat/lib/exo.kernel.container-trunk.jar!/conf/portal/configuration.xml
Add configuration jar:file:/D:/Projects/eXo/dev/exo-working/exo-tomcat/lib/exo.kernel.component.cache-trunk.jar!/conf/portal/configuration.xml
@@ -283,35 +283,35 @@
import jndi:/localhost/portal/WEB-INF/conf/ecm/jcr-component-plugins-configuration.xml
import jndi:/localhost/portal/WEB-INF/conf/jcr/jcr-configuration.xml
......</programlisting>
- </para>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-Getting_the_effective_configuration_at_Runtime">
- <title>Getting the effective configuration at Runtime</title>
- <para>
- The effective configuration of the StandaloneContainer, RootContainer and/or PortalContainer can be known thanks to the method <emphasis>getConfigurationXML</emphasis>() that is exposed through JMX at the container's level. This method will give you the effective configuration in XML format that has been really interpreted by the kernel. This could be helpful to understand how a given component or plugin has been initialized.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Retrieval-Getting_the_effective_configuration_at_Runtime">
+ <title>Getting the effective configuration at Runtime</title>
+ <para>
+ The effective configuration of the StandaloneContainer, RootContainer and/or PortalContainer can be known thanks to the method <emphasis>getConfigurationXML</emphasis>() that is exposed through JMX at the container's level. This method will give you the effective configuration in XML format that has been really interpreted by the kernel. This could be helpful to understand how a given component or plugin has been initialized.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Understanding_how_configuration_files_are_loaded-Advanced_concepts_for_the_PortalContainers">
- <title>Advanced concepts for the <emphasis>PortalContainers</emphasis></title>
- <para>
- Since eXo JCR 1.12, we added a set of new features that have been designed to extend portal applications such as GateIn.
- </para>
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Add_new_configuration_files_from_a_WAR_file">
- <title>Add new configuration files from a WAR file</title>
- <para>
- A <envar>ServletContextListener</envar> called <envar>org.exoplatform.container.web.PortalContainerConfigOwner</envar> has been added in order to notify the application that a given web application provides some configuration to the portal container, and this configuration file is the file <emphasis>WEB-INF/conf/configuration.xml</emphasis> available in the web application itself.
- </para>
- <para>
- If your war file contains some configuration to add to the <envar>PortalContainer</envar> simply add the following lines in your <emphasis>web.xml</emphasis> file.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Understanding_how_configuration_files_are_loaded-Advanced_concepts_for_the_PortalContainers">
+ <title>Advanced concepts for the <emphasis>PortalContainers</emphasis></title>
+ <para>
+ Since eXo JCR 1.12, we added a set of new features that have been designed to extend portal applications such as GateIn.
+ </para>
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Add_new_configuration_files_from_a_WAR_file">
+ <title>Add new configuration files from a WAR file</title>
+ <para>
+ A <envar>ServletContextListener</envar> called <envar>org.exoplatform.container.web.PortalContainerConfigOwner</envar> has been added in order to notify the application that a given web application provides some configuration to the portal container, and this configuration file is the file <emphasis>WEB-INF/conf/configuration.xml</emphasis> available in the web application itself.
+ </para>
+ <para>
+ If your war file contains some configuration to add to the <envar>PortalContainer</envar> simply add the following lines in your <emphasis>web.xml</emphasis> file.
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
@@ -326,33 +326,33 @@
...
</web-app></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Creating_your_PortalContainers_from_a_WAR_file">
- <title>Creating your <emphasis>PortalContainers</emphasis> from a WAR file</title>
- <para>
- A <envar>ServletContextListener</envar> called <envar>org.exoplatform.container.web.PortalContainerCreator</envar> has been added in order to create the current portal containers that have been registered. We assume that all the web applications have already been loaded before calling <envar>PortalContainerCreator.contextInitialized.</envar>
- </para>
- <para>
- <note>
- <para>
- In GateIn, the <envar>PortalContainerCreator</envar> is already managed by the file <emphasis>starter.war/ear.</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Creating_your_PortalContainers_from_a_WAR_file">
+ <title>Creating your <emphasis>PortalContainers</emphasis> from a WAR file</title>
+ <para>
+ A <envar>ServletContextListener</envar> called <envar>org.exoplatform.container.web.PortalContainerCreator</envar> has been added in order to create the current portal containers that have been registered. We assume that all the web applications have already been loaded before calling <envar>PortalContainerCreator.contextInitialized.</envar>
+ </para>
+ <para>
+ <note>
+ <para>
+ In GateIn, the <envar>PortalContainerCreator</envar> is already managed by the file <emphasis>starter.war/ear.</emphasis>
+ </para>
- </note>
- </para>
+ </note>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Defining_a_PortalContainer_with_its_dependencies_and_its_settings">
- <title>Defining a <emphasis>PortalContainer</emphasis> with its dependencies and its settings</title>
- <para>
- Now we can define precisely a portal container and its dependencies and settings thanks to the <envar>PortalContainerDefinition</envar> that currently contains the name of the portal container, the name of the rest context, the name of the realm, the web application dependencies ordered by loading priority (i.e. the first dependency must be loaded at first and so on..) and the settings.
- </para>
- <para>
- To be able to define a <envar>PortalContainerDefinition</envar>, we need to ensure first of all that a <envar>PortalContainerConfig</envar> has been defined at the <envar>RootContainer</envar> level, see an example below:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Defining_a_PortalContainer_with_its_dependencies_and_its_settings">
+ <title>Defining a <emphasis>PortalContainer</emphasis> with its dependencies and its settings</title>
+ <para>
+ Now we can define precisely a portal container and its dependencies and settings thanks to the <envar>PortalContainerDefinition</envar> that currently contains the name of the portal container, the name of the rest context, the name of the realm, the web application dependencies ordered by loading priority (i.e. the first dependency must be loaded at first and so on..) and the settings.
+ </para>
+ <para>
+ To be able to define a <envar>PortalContainerDefinition</envar>, we need to ensure first of all that a <envar>PortalContainerConfig</envar> has been defined at the <envar>RootContainer</envar> level, see an example below:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<!-- The full qualified name of the PortalContainerConfig -->
<type>org.exoplatform.container.definition.PortalContainerConfig</type>
@@ -433,87 +433,87 @@
</object-param>
</init-params>
</component></programlisting>
- <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_PortalContainerConfig">
- <title>Descriptions of the fields of <envar>PortalContainerConfig</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- default.portal.container (*)
- </entry>
- <entry>
- The name of the default portal container. This field is optional.
- </entry>
+ <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_PortalContainerConfig">
+ <title>Descriptions of the fields of <envar>PortalContainerConfig</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ default.portal.container (*)
+ </entry>
+ <entry>
+ The name of the default portal container. This field is optional.
+ </entry>
- </row>
- <row>
- <entry>
- default.rest.context (*)
- </entry>
- <entry>
- The name of the default rest <envar>ServletContext</envar>. This field is optional.
- </entry>
+ </row>
+ <row>
+ <entry>
+ default.rest.context (*)
+ </entry>
+ <entry>
+ The name of the default rest <envar>ServletContext</envar>. This field is optional.
+ </entry>
- </row>
- <row>
- <entry>
- default.realm.name (*)
- </entry>
- <entry>
- The name of the default realm. This field is optional.
- </entry>
+ </row>
+ <row>
+ <entry>
+ default.realm.name (*)
+ </entry>
+ <entry>
+ The name of the default realm. This field is optional.
+ </entry>
- </row>
- <row>
- <entry>
- ignore.unregistered.webapp (*)
- </entry>
- <entry>
- Indicates whether the unregistered webapps have to be ignored. If a webapp has not been registered as a dependency of any portal container, the application will use the value of this parameter to know what to do:
- <itemizedlist>
- <listitem>
- <para>
- If it is set to <emphasis>false</emphasis>, this webapp will be considered by default as a dependency of all the portal containers.
- </para>
+ </row>
+ <row>
+ <entry>
+ ignore.unregistered.webapp (*)
+ </entry>
+ <entry>
+ Indicates whether the unregistered webapps have to be ignored. If a webapp has not been registered as a dependency of any portal container, the application will use the value of this parameter to know what to do:
+ <itemizedlist>
+ <listitem>
+ <para>
+ If it is set to <emphasis>false</emphasis>, this webapp will be considered by default as a dependency of all the portal containers.
+ </para>
- </listitem>
- <listitem>
- <para>
- If it is set to <emphasis>true</emphasis>, this webapp won't be considered by default as a dependency of any portal container, it will be simply ignored.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If it is set to <emphasis>true</emphasis>, this webapp won't be considered by default as a dependency of any portal container, it will be simply ignored.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- This field is optional and by default this parameter is set to <emphasis>false</emphasis>.
- </entry>
+ </itemizedlist>
+ This field is optional and by default this parameter is set to <emphasis>false</emphasis>.
+ </entry>
- </row>
- <row>
- <entry>
- default.portal.definition
- </entry>
- <entry>
- The definition of the default portal container. This field is optional. The expected type is <envar>org.exoplatform.container.definition.PortalContainerDefinition</envar> that is described below. Allow the parameters defined in this default <envar>PortalContainerDefinition</envar> will be the default values.
- </entry>
+ </row>
+ <row>
+ <entry>
+ default.portal.definition
+ </entry>
+ <entry>
+ The definition of the default portal container. This field is optional. The expected type is <envar>org.exoplatform.container.definition.PortalContainerDefinition</envar> that is described below. Allow the parameters defined in this default <envar>PortalContainerDefinition</envar> will be the default values.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <note>
- <para>
- All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
- </para>
+ </table>
+ <note>
+ <para>
+ All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
+ </para>
- </note>
- <para>
- A new <envar>PortalContainerDefinition</envar> can be defined at the <envar>RootContainer</envar> level thanks to an external plugin, see an example below:
- </para>
-
+ </note>
+ <para>
+ A new <envar>PortalContainerDefinition</envar> can be defined at the <envar>RootContainer</envar> level thanks to an external plugin, see an example below:
+ </para>
+
<programlisting language="XML" role="XML"> <external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -608,393 +608,393 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
- <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_a_PortalContainerDefinition_when_it_is_used_to_define_a_new_portal_container">
- <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to define a new portal container</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- name (*)
- </entry>
- <entry>
- The name of the portal container. This field is mandatory .
- </entry>
+ <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_a_PortalContainerDefinition_when_it_is_used_to_define_a_new_portal_container">
+ <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to define a new portal container</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ name (*)
+ </entry>
+ <entry>
+ The name of the portal container. This field is mandatory .
+ </entry>
- </row>
- <row>
- <entry>
- restContextName (*)
- </entry>
- <entry>
- The name of the context name of the rest web application. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level.
- </entry>
+ </row>
+ <row>
+ <entry>
+ restContextName (*)
+ </entry>
+ <entry>
+ The name of the context name of the rest web application. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level.
+ </entry>
- </row>
- <row>
- <entry>
- realmName (*)
- </entry>
- <entry>
- The name of the realm. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level.
- </entry>
+ </row>
+ <row>
+ <entry>
+ realmName (*)
+ </entry>
+ <entry>
+ The name of the realm. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level.
+ </entry>
- </row>
- <row>
- <entry>
- dependencies
- </entry>
- <entry>
- All the dependencies of the portal container ordered by loading priority. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level. The dependencies are in fact the list of the context names of the web applications from which the portal container depends. This field is optional. The dependency order is really crucial since it will be interpreted the same way by several components of the platform. All those components, will consider the 1st element in the list less important than the second element and so on. It is currently used to:
- <itemizedlist>
- <listitem>
- <para>
- Know the loading order of all the dependencies.
- </para>
+ </row>
+ <row>
+ <entry>
+ dependencies
+ </entry>
+ <entry>
+ All the dependencies of the portal container ordered by loading priority. This field is optional. The default value will be defined at the <envar>PortalContainerConfig</envar> level. The dependencies are in fact the list of the context names of the web applications from which the portal container depends. This field is optional. The dependency order is really crucial since it will be interpreted the same way by several components of the platform. All those components, will consider the 1st element in the list less important than the second element and so on. It is currently used to:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Know the loading order of all the dependencies.
+ </para>
- </listitem>
- <listitem>
- <para>
- If we have several <envar>PortalContainerConfigOwner</envar>
- <itemizedlist>
- <listitem>
- <para>
- The <envar>ServletContext</envar> of all the <envar>PortalContainerConfigOwner</envar> will be unified, if we use the unified <envar>ServletContext</envar> (<emphasis>PortalContainer.getPortalContext()</emphasis>) to get a resource, it will try to get the resource in the <envar>ServletContext</envar> of the most important <envar>PortalContainerConfigOwner</envar> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <envar>PortalContainerConfigOwner</envar> and so on.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If we have several <envar>PortalContainerConfigOwner</envar>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <envar>ServletContext</envar> of all the <envar>PortalContainerConfigOwner</envar> will be unified, if we use the unified <envar>ServletContext</envar> (<emphasis>PortalContainer.getPortalContext()</emphasis>) to get a resource, it will try to get the resource in the <envar>ServletContext</envar> of the most important <envar>PortalContainerConfigOwner</envar> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <envar>PortalContainerConfigOwner</envar> and so on.
+ </para>
- </listitem>
- <listitem>
- <para>
- The <envar>ClassLoader</envar> of all the <envar>PortalContainerConfigOwner</envar> will be unified, if we use the unified <envar>ClassLoader</envar> (<emphasis>PortalContainer.getPortalClassLoader()</emphasis>) to get a resource, it will try to get the resource in the <envar>ClassLoader</envar> of the most important <envar>PortalContainerConfigOwner</envar> (i.e. last in the dependency list) and if it can find it, it will try with the second most important <envar>PortalContainerConfigOwner</envar> and so on.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <envar>ClassLoader</envar> of all the <envar>PortalContainerConfigOwner</envar> will be unified, if we use the unified <envar>ClassLoader</envar> (<emphasis>PortalContainer.getPortalClassLoader()</emphasis>) to get a resource, it will try to get the resource in the <envar>ClassLoader</envar> of the most important <envar>PortalContainerConfigOwner</envar> (i.e. last in the dependency list) and if it can find it, it will try with the second most important <envar>PortalContainerConfigOwner</envar> and so on.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </entry>
+ </itemizedlist>
+ </entry>
- </row>
- <row>
- <entry>
- settings
- </entry>
- <entry>
- A <envar>java.util.Map</envar> of internal parameters that we would like to tie the portal container. Those parameters could have any type of value. This field is optional. If some internal settings are defined at the <envar>PortalContainerConfig</envar> level, the two maps of settings will be merged. If a setting with the same name is defined in both maps, it will keep the value defined at the <envar>PortalContainerDefinition</envar> level.
- </entry>
+ </row>
+ <row>
+ <entry>
+ settings
+ </entry>
+ <entry>
+ A <envar>java.util.Map</envar> of internal parameters that we would like to tie the portal container. Those parameters could have any type of value. This field is optional. If some internal settings are defined at the <envar>PortalContainerConfig</envar> level, the two maps of settings will be merged. If a setting with the same name is defined in both maps, it will keep the value defined at the <envar>PortalContainerDefinition</envar> level.
+ </entry>
- </row>
- <row>
- <entry>
- externalSettingsPath
- </entry>
- <entry>
- The path of the external properties file to load as default settings to the portal container. This field is optional. If some external settings are defined at the <envar>PortalContainerConfig</envar> level, the two maps of settings will be merged. If a setting with the same name is defined in both maps, it will keep the value defined at the <envar>PortalContainerDefinition</envar> level. The external properties files can be either of type "properties" or of type "xml". The path will be interpreted as follows:
- <orderedlist>
- <listitem>
- <para>
- The path doesn't contain any prefix of type "classpath:", "jar:" or "file:", we assume that the file could be externalized so we apply the following rules:
- <orderedlist>
- <listitem>
- <para>
- A file exists at <emphasis>${exo-conf-dir}/portal/${portalContainerName}/${externalSettingsPath}</emphasis>, we will load this file.
- </para>
+ </row>
+ <row>
+ <entry>
+ externalSettingsPath
+ </entry>
+ <entry>
+ The path of the external properties file to load as default settings to the portal container. This field is optional. If some external settings are defined at the <envar>PortalContainerConfig</envar> level, the two maps of settings will be merged. If a setting with the same name is defined in both maps, it will keep the value defined at the <envar>PortalContainerDefinition</envar> level. The external properties files can be either of type "properties" or of type "xml". The path will be interpreted as follows:
+ <orderedlist>
+ <listitem>
+ <para>
+ The path doesn't contain any prefix of type "classpath:", "jar:" or "file:", we assume that the file could be externalized so we apply the following rules:
+ <orderedlist>
+ <listitem>
+ <para>
+ A file exists at <emphasis>${exo-conf-dir}/portal/${portalContainerName}/${externalSettingsPath}</emphasis>, we will load this file.
+ </para>
- </listitem>
- <listitem>
- <para>
- No file exists at the previous path, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ No file exists at the previous path, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </para>
+ </orderedlist>
+ </para>
- </listitem>
- <listitem>
- <para>
- The path contains a prefix, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The path contains a prefix, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </entry>
+ </orderedlist>
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_a_PortalContainerDefinition_when_it_is_used_to_define_the_default_portal_container">
- <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to define the default portal container</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- name (*)
- </entry>
- <entry>
- The name of the portal container. This field is optional. The default portal name will be:
- <orderedlist>
- <listitem>
- <para>
- If this field is not empty, then the default value will be the value of this field.
- </para>
+ </table>
+ <table id="tabl-Reference_Guide-Defining_a_PortalContainer_with_its_dependencies_and_its_settings-Descriptions_of_the_fields_of_a_PortalContainerDefinition_when_it_is_used_to_define_the_default_portal_container">
+ <title>Descriptions of the fields of a <envar>PortalContainerDefinition</envar> when it is used to define the default portal container</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ name (*)
+ </entry>
+ <entry>
+ The name of the portal container. This field is optional. The default portal name will be:
+ <orderedlist>
+ <listitem>
+ <para>
+ If this field is not empty, then the default value will be the value of this field.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field is empty and the value of the parameter <emphasis>default.portal.container</emphasis> is not empty, then the default value will be the value of the parameter.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field is empty and the value of the parameter <emphasis>default.portal.container</emphasis> is not empty, then the default value will be the value of the parameter.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field and the parameter <emphasis>default.portal.container</emphasis> are both empty, the default value will be <emphasis>"portal".</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field and the parameter <emphasis>default.portal.container</emphasis> are both empty, the default value will be <emphasis>"portal".</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </entry>
+ </orderedlist>
+ </entry>
- </row>
- <row>
- <entry>
- restContextName (*)
- </entry>
- <entry>
- The name of the context name of the rest web application. This field is optional. The default value wil be:
- <orderedlist>
- <listitem>
- <para>
- If this field is not empty, then the default value will be the value of this field.
- </para>
+ </row>
+ <row>
+ <entry>
+ restContextName (*)
+ </entry>
+ <entry>
+ The name of the context name of the rest web application. This field is optional. The default value wil be:
+ <orderedlist>
+ <listitem>
+ <para>
+ If this field is not empty, then the default value will be the value of this field.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field is empty and the value of the parameter <emphasis>default.rest.context</emphasis> is not empty, then the default value will be the value of the parameter.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field is empty and the value of the parameter <emphasis>default.rest.context</emphasis> is not empty, then the default value will be the value of the parameter.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field and the parameter <emphasis>default.rest.context</emphasis> are both empty, the default value will be <emphasis>"rest".</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field and the parameter <emphasis>default.rest.context</emphasis> are both empty, the default value will be <emphasis>"rest".</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </entry>
+ </orderedlist>
+ </entry>
- </row>
- <row>
- <entry>
- realmName (*)
- </entry>
- <entry>
- The name of the realm. This field is optional. The default value wil be:
- <orderedlist>
- <listitem>
- <para>
- If this field is not empty, then the default value will be the value of this field.
- </para>
+ </row>
+ <row>
+ <entry>
+ realmName (*)
+ </entry>
+ <entry>
+ The name of the realm. This field is optional. The default value will be:
+ <orderedlist>
+ <listitem>
+ <para>
+ If this field is not empty, then the default value will be the value of this field.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field is empty and the value of the parameter <emphasis>default.realm.name</emphasis> is not empty, then the default value will be the value of the parameter.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field is empty and the value of the parameter <emphasis>default.realm.name</emphasis> is not empty, then the default value will be the value of the parameter.
+ </para>
- </listitem>
- <listitem>
- <para>
- If this field and the parameter <emphasis>default.realm.name</emphasis> are both empty, the default value will be <emphasis>"exo-domain".</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If this field and the parameter <emphasis>default.realm.name</emphasis> are both empty, the default value will be <emphasis>"exo-domain".</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </entry>
+ </orderedlist>
+ </entry>
- </row>
- <row>
- <entry>
- dependencies
- </entry>
- <entry>
- All the dependencies of the portal container ordered by loading priority. This field is optional. If this field has a non empty value, it will be the default list of dependencies.
- </entry>
+ </row>
+ <row>
+ <entry>
+ dependencies
+ </entry>
+ <entry>
+ All the dependencies of the portal container ordered by loading priority. This field is optional. If this field has a non empty value, it will be the default list of dependencies.
+ </entry>
- </row>
- <row>
- <entry>
- settings
- </entry>
- <entry>
- A <envar>java.util.Map</envar> of internal parameters that we would like to tie the default portal container. Those parameters could have any type of value. This field is optional.
- </entry>
+ </row>
+ <row>
+ <entry>
+ settings
+ </entry>
+ <entry>
+ A <envar>java.util.Map</envar> of internal parameters that we would like to tie the default portal container. Those parameters could have any type of value. This field is optional.
+ </entry>
- </row>
- <row>
- <entry>
- externalSettingsPath
- </entry>
- <entry>
- The path of the external properties file to load as default settings to the default portal container. This field is optional. The external properties files can be either of type "properties" or of type "xml". The path will be interpreted as follows:
- <orderedlist>
- <listitem>
- <para>
- The path doesn't contain any prefix of type "classpath:", "jar:" or "file:", we assume that the file could be externalized so we apply the following rules:
- <orderedlist>
- <listitem>
- <para>
- A file exists at <emphasis>${exo-conf-dir}/portal/${externalSettingsPath}</emphasis>, we will load this file.
- </para>
+ </row>
+ <row>
+ <entry>
+ externalSettingsPath
+ </entry>
+ <entry>
+ The path of the external properties file to load as default settings to the default portal container. This field is optional. The external properties files can be either of type "properties" or of type "xml". The path will be interpreted as follows:
+ <orderedlist>
+ <listitem>
+ <para>
+ The path doesn't contain any prefix of type "classpath:", "jar:" or "file:", we assume that the file could be externalized so we apply the following rules:
+ <orderedlist>
+ <listitem>
+ <para>
+ A file exists at <emphasis>${exo-conf-dir}/portal/${externalSettingsPath}</emphasis>, we will load this file.
+ </para>
- </listitem>
- <listitem>
- <para>
- No file exists at the previous path, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ No file exists at the previous path, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </para>
+ </orderedlist>
+ </para>
- </listitem>
- <listitem>
- <para>
- The path contains a prefix, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The path contains a prefix, we then assume that the path cans be interpreted by the <envar>ConfigurationManager</envar>.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- </entry>
+ </orderedlist>
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <note>
- <para>
- All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
- </para>
+ </table>
+ <note>
+ <para>
+ All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
+ </para>
- </note>
- <para>
- Internal and external settings are both optional, but if we give a non empty value for both the application will merge the settings. If the same setting name exists in both settings, we apply the following rules:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The value of the external setting is <emphasis>null</emphasis>, we ignore the value.
- </para>
+ </note>
+ <para>
+ Internal and external settings are both optional, but if we give a non empty value for both the application will merge the settings. If the same setting name exists in both settings, we apply the following rules:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The value of the external setting is <emphasis>null</emphasis>, we ignore the value.
+ </para>
- </listitem>
- <listitem>
- <para>
- The value of the external setting is not <emphasis>null</emphasis> and the value of the internal setting is <emphasis>null</emphasis>, the final value will be the external setting value that is of type <envar>String</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The value of the external setting is not <emphasis>null</emphasis> and the value of the internal setting is <emphasis>null</emphasis>, the final value will be the external setting value that is of type <envar>String</envar>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Both values are not <envar>null</envar>, we will have to convert the external setting value into the target type which is the type of the internal setting value, thanks to the static method <emphasis>valueOf(String)</emphasis>, the following sub-rules are then applied:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The method cannot be found, the final value will be the external setting value that is of type <envar>String</envar>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Both values are not <envar>null</envar>, we will have to convert the external setting value into the target type which is the type of the internal setting value, thanks to the static method <emphasis>valueOf(String)</emphasis>, the following sub-rules are then applied:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The method cannot be found, the final value will be the external setting value that is of type <envar>String</envar>.
+ </para>
- </listitem>
- <listitem>
- <para>
- The method can be found and the external setting value is an empty <envar>String</envar>, we ignore the external setting value.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The method can be found and the external setting value is an empty <envar>String</envar>, we ignore the external setting value.
+ </para>
- </listitem>
- <listitem>
- <para>
- The method can be found and the external setting value is not an empty <envar>String</envar> but the method call fails, we ignore the external setting value.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The method can be found and the external setting value is not an empty <envar>String</envar> but the method call fails, we ignore the external setting value.
+ </para>
- </listitem>
- <listitem>
- <para>
- The method can be found and the external setting value is not an empty <envar>String</envar> and the method call succeeds, the final value will be the external setting value that is of type of the internal setting value.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The method can be found and the external setting value is not an empty <envar>String</envar> and the method call succeeds, the final value will be the external setting value that is of type of the internal setting value.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-PortalContainer_settings">
- <title><envar>PortalContainer</envar> settings</title>
- <para>
- We can inject the value of the portal container settings into the portal container configuration files thanks to the variables which name start with "<emphasis>portal.container.</emphasis>", so to get the value of a setting called "<emphasis>foo</emphasis>", just use the following syntax <emphasis>${portal.container.foo}</emphasis>. You can also use internal variables, such as:
- </para>
- <table id="tabl-Reference_Guide-PortalContainer_settings-Definition_of_the_internal_variables">
- <title>Definition of the internal variables</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- portal.container.name
- </entry>
- <entry>
- Gives the name of the current portal container.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-PortalContainer_settings">
+ <title><envar>PortalContainer</envar> settings</title>
+ <para>
+ We can inject the value of the portal container settings into the portal container configuration files thanks to the variables which name start with "<emphasis>portal.container.</emphasis>", so to get the value of a setting called "<emphasis>foo</emphasis>", just use the following syntax <emphasis>${portal.container.foo}</emphasis>. You can also use internal variables, such as:
+ </para>
+ <table id="tabl-Reference_Guide-PortalContainer_settings-Definition_of_the_internal_variables">
+ <title>Definition of the internal variables</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ portal.container.name
+ </entry>
+ <entry>
+ Gives the name of the current portal container.
+ </entry>
- </row>
- <row>
- <entry>
- portal.container.rest
- </entry>
- <entry>
- Gives the context name of the rest web application of the current portal container.
- </entry>
+ </row>
+ <row>
+ <entry>
+ portal.container.rest
+ </entry>
+ <entry>
+ Gives the context name of the rest web application of the current portal container.
+ </entry>
- </row>
- <row>
- <entry>
- portal.container.realm
- </entry>
- <entry>
- Gives the realm name of the current portal container.
- </entry>
+ </row>
+ <row>
+ <entry>
+ portal.container.realm
+ </entry>
+ <entry>
+ Gives the realm name of the current portal container.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- You can find below an example of how to use the variables:
- </para>
-
+ </table>
+ <para>
+ You can find below an example of how to use the variables:
+ </para>
+
<programlisting language="XML" role="XML"><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
<component>
@@ -1026,36 +1026,36 @@
</init-params>
</component>
</configuration></programlisting>
- <para>
- In the properties file corresponding to the external settings, you can reuse variables previously defined (in the external settings or in the internal settings) to create a new variable. In this case, the prefix "<emphasis>portal.container.</emphasis>" is not needed, see an example below:
+ <para>
+ In the properties file corresponding to the external settings, you can reuse variables previously defined (in the external settings or in the internal settings) to create a new variable. In this case, the prefix "<emphasis>portal.container.</emphasis>" is not needed, see an example below:
<programlisting>my-var1=value 1
my-var2=value 2
complex-value=${my-var1}-${my-var2}</programlisting>
- </para>
- <para>
- In the external and internal settings, you can also use create variables based on value of System paramaters. The System parameters can either be defined at launch time or thanks to the <envar>PropertyConfigurator</envar> (see next section for more details). See an example below:
- </para>
-
+ </para>
+ <para>
+ In the external and internal settings, you can also use create variables based on value of System paramaters. The System parameters can either be defined at launch time or thanks to the <envar>PropertyConfigurator</envar> (see next section for more details). See an example below:
+ </para>
+
<programlisting>temp-dir=${java.io.tmpdir}${file.separator}my-temp</programlisting>
- <para>
- However, for the internal settings, you can use System parameters only to define settings of type <envar>java.lang.String</envar>.
- </para>
- <para>
- It cans be also very usefull to define a generic variable in the settings of the default portal container, the value of this variable will change according to the current portal container. See below an example:
+ <para>
+ However, for the internal settings, you can use System parameters only to define settings of type <envar>java.lang.String</envar>.
+ </para>
+ <para>
+ It cans be also very useful to define a generic variable in the settings of the default portal container, the value of this variable will change according to the current portal container. See below an example:
<programlisting>my-generic-var=value of the portal container "${name}"</programlisting>
- </para>
- <para>
- If this variable is defined at the default portal container level, the value of this variable for a portal container called <emphasis>"foo"</emphasis> will be <emphasis>value of the portal container "foo"</emphasis>.
- </para>
+ </para>
+ <para>
+ If this variable is defined at the default portal container level, the value of this variable for a portal container called <emphasis>"foo"</emphasis> will be <emphasis>value of the portal container "foo"</emphasis>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer">
- <title>Adding dynamically settings and/or dependencies to a <envar>PortalContainer</envar></title>
- <para>
- It is possible to use <envar>component-plugin</envar> elements in order to dynamically change a PortalContainerDefinition. In the example below, we add the dependency <envar>foo</envar> to the default portal container and to the portal containers called <envar>foo1</envar> and <envar>foo2</envar>:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer">
+ <title>Adding dynamically settings and/or dependencies to a <envar>PortalContainer</envar></title>
+ <para>
+ It is possible to use <envar>component-plugin</envar> elements in order to dynamically change a PortalContainerDefinition. In the example below, we add the dependency <envar>foo</envar> to the default portal container and to the portal containers called <envar>foo1</envar> and <envar>foo2</envar>:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1092,127 +1092,127 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
- <table id="tabl-Reference_Guide-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer-Descriptions_of_the_fields_of_a_PortalContainerDefinitionChangePlugin">
- <title>Descriptions of the fields of a <envar>PortalContainerDefinitionChangePlugin</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- apply.all (*)
- </entry>
- <entry>
- Indicates whether the changes have to be applied to all the portal containers or not. The default value of this field is <envar>false</envar>. This field is a <envar>ValueParam</envar> and is not mandatory.
- </entry>
+ <table id="tabl-Reference_Guide-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer-Descriptions_of_the_fields_of_a_PortalContainerDefinitionChangePlugin">
+ <title>Descriptions of the fields of a <envar>PortalContainerDefinitionChangePlugin</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ apply.all (*)
+ </entry>
+ <entry>
+ Indicates whether the changes have to be applied to all the portal containers or not. The default value of this field is <envar>false</envar>. This field is a <envar>ValueParam</envar> and is not mandatory.
+ </entry>
- </row>
- <row>
- <entry>
- apply.default (*)
- </entry>
- <entry>
- Indicates whether the changes have to be applied to the default portal container or not. The default value of this field is <envar>false</envar>. This field is a <envar>ValueParam</envar> and is not mandatory.
- </entry>
+ </row>
+ <row>
+ <entry>
+ apply.default (*)
+ </entry>
+ <entry>
+ Indicates whether the changes have to be applied to the default portal container or not. The default value of this field is <envar>false</envar>. This field is a <envar>ValueParam</envar> and is not mandatory.
+ </entry>
- </row>
- <row>
- <entry>
- apply.specific (*)
- </entry>
- <entry>
- A set of specific portal container names to which we want to apply the changes. This field is a <envar>ValuesParam</envar> and is not mandatory.
- </entry>
+ </row>
+ <row>
+ <entry>
+ apply.specific (*)
+ </entry>
+ <entry>
+ A set of specific portal container names to which we want to apply the changes. This field is a <envar>ValuesParam</envar> and is not mandatory.
+ </entry>
- </row>
- <row>
- <entry>
- <envar>Rest of the expected parameters </envar>
- </entry>
- <entry>
- The rest of the expected paramaters are <envar>ObjectParam</envar> of type <envar>PortalContainerDefinitionChange</envar>. Those parameters are in fact the list of changes that we want to apply to one or several portal containers. If the list of changes is empty, the component plugin will be ignored. The supported implementations of PortalContainerDefinitionChange are described later in this section.
- </entry>
+ </row>
+ <row>
+ <entry>
+ <envar>Rest of the expected parameters </envar>
+ </entry>
+ <entry>
+ The rest of the expected parameters are <envar>ObjectParam</envar> of type <envar>PortalContainerDefinitionChange</envar>. Those parameters are in fact the list of changes that we want to apply to one or several portal containers. If the list of changes is empty, the component plugin will be ignored. The supported implementations of PortalContainerDefinitionChange are described later in this section.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <note>
- <para>
- All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
- </para>
+ </table>
+ <note>
+ <para>
+ All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
+ </para>
- </note>
- <para>
- To identify the portal containers to which the changes have to be applied, we use the follwing algorithm:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The parameter <envar>apply.all</envar> has been set to <envar>true</envar>. The corresponding changes will be applied to all the portal containers. The other parameters will be ignored.
- </para>
+ </note>
+ <para>
+ To identify the portal containers to which the changes have to be applied, we use the following algorithm:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The parameter <envar>apply.all</envar> has been set to <envar>true</envar>. The corresponding changes will be applied to all the portal containers. The other parameters will be ignored.
+ </para>
- </listitem>
- <listitem>
- <para>
- The parameter <envar>apply.default</envar> has been set to <envar>true</envar> and the parameter <envar>apply.specific</envar> is <envar>null</envar>. The corresponding changes will be applied to the default portal container only.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The parameter <envar>apply.default</envar> has been set to <envar>true</envar> and the parameter <envar>apply.specific</envar> is <envar>null</envar>. The corresponding changes will be applied to the default portal container only.
+ </para>
- </listitem>
- <listitem>
- <para>
- The parameter <envar>apply.default</envar> has been set to <envar>true</envar> and the parameter <envar>apply.specific</envar> is not <envar>null</envar>. The corresponding changes will be applied to the default portal container and the given list of specific portal containers.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The parameter <envar>apply.default</envar> has been set to <envar>true</envar> and the parameter <envar>apply.specific</envar> is not <envar>null</envar>. The corresponding changes will be applied to the default portal container and the given list of specific portal containers.
+ </para>
- </listitem>
- <listitem>
- <para>
- The parameter <envar>apply.default</envar> has been set to <envar>false</envar> or has not been set and the parameter <envar>apply.specific</envar> is <envar>null</envar>. The corresponding changes will be applied to the default portal container only.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The parameter <envar>apply.default</envar> has been set to <envar>false</envar> or has not been set and the parameter <envar>apply.specific</envar> is <envar>null</envar>. The corresponding changes will be applied to the default portal container only.
+ </para>
- </listitem>
- <listitem>
- <para>
- The parameter <envar>apply.default</envar> has been set to <envar>false</envar> or has not been set and the parameter <envar>apply.specific</envar> is not <envar>null</envar>. The corresponding changes will be applied to the given list of specific portal containers.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The parameter <envar>apply.default</envar> has been set to <envar>false</envar> or has not been set and the parameter <envar>apply.specific</envar> is not <envar>null</envar>. The corresponding changes will be applied to the given list of specific portal containers.
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- <section id="sect-Reference_Guide-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer-The_existing_implementations_of_PortalContainerDefinitionChange">
- <title>The existing implementations of <envar>PortalContainerDefinitionChange</envar></title>
- <para>
- The modifications that can be applied to a <envar>PortalContainerDefinition</envar> must be a class of type <envar>PortalContainerDefinitionChange</envar>. The product proposes out of the box some implementations that we describe in the next sub sections.
- </para>
- <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependencies">
- <title><envar>AddDependencies</envar></title>
- <para>
- This modification adds a list of dependencies at the end of the list of dependencies defined into the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies</emphasis>.
- </para>
- <table id="tabl-Reference_Guide-AddDependencies-Descriptions_of_the_fields_of_an_AddDependencies">
- <title>Descriptions of the fields of an <envar>AddDependencies</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- dependencies
- </entry>
- <entry>
- A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
- </entry>
+ </orderedlist>
+ <section id="sect-Reference_Guide-Adding_dynamically_settings_andor_dependencies_to_a_PortalContainer-The_existing_implementations_of_PortalContainerDefinitionChange">
+ <title>The existing implementations of <envar>PortalContainerDefinitionChange</envar></title>
+ <para>
+ The modifications that can be applied to a <envar>PortalContainerDefinition</envar> must be a class of type <envar>PortalContainerDefinitionChange</envar>. The product proposes out of the box some implementations that we describe in the next sub sections.
+ </para>
+ <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependencies">
+ <title><envar>AddDependencies</envar></title>
+ <para>
+ This modification adds a list of dependencies at the end of the list of dependencies defined into the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies</emphasis>.
+ </para>
+ <table id="tabl-Reference_Guide-AddDependencies-Descriptions_of_the_fields_of_an_AddDependencies">
+ <title>Descriptions of the fields of an <envar>AddDependencies</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ dependencies
+ </entry>
+ <entry>
+ A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- See an example below, that will add <envar>foo</envar> at the end of the dependency list of the default portal container:
- </para>
-
+ </table>
+ <para>
+ See an example below, that will add <envar>foo</envar> at the end of the dependency list of the default portal container:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1245,45 +1245,45 @@
</component-plugin>
</external-component-plugins></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependenciesBefore">
- <title><envar>AddDependenciesBefore</envar></title>
- <para>
- This modification adds a list of dependencies before a given target dependency defined into the list of dependencies of the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesBefore</emphasis>.
- </para>
- <table id="tabl-Reference_Guide-AddDependenciesBefore-Descriptions_of_the_fields_of_an_AddDependenciesBefore">
- <title>Descriptions of the fields of an <envar>AddDependenciesBefore</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- dependencies
- </entry>
- <entry>
- A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependenciesBefore">
+ <title><envar>AddDependenciesBefore</envar></title>
+ <para>
+ This modification adds a list of dependencies before a given target dependency defined into the list of dependencies of the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesBefore</emphasis>.
+ </para>
+ <table id="tabl-Reference_Guide-AddDependenciesBefore-Descriptions_of_the_fields_of_an_AddDependenciesBefore">
+ <title>Descriptions of the fields of an <envar>AddDependenciesBefore</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ dependencies
+ </entry>
+ <entry>
+ A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
+ </entry>
- </row>
- <row>
- <entry>
- target
- </entry>
- <entry>
- The name of the dependency before which we would like to add the new dependencies. If this field is <envar>null</envar> or the target dependency cannot be found in the list of dependencies defined into the <envar>PortalContainerDefinition</envar>, the new dependencies will be added in first position to the list.
- </entry>
+ </row>
+ <row>
+ <entry>
+ target
+ </entry>
+ <entry>
+ The name of the dependency before which we would like to add the new dependencies. If this field is <envar>null</envar> or the target dependency cannot be found in the list of dependencies defined into the <envar>PortalContainerDefinition</envar>, the new dependencies will be added in first position to the list.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- See an example below, that will add <envar>foo</envar> before <envar>foo2</envar> in the dependency list of the default portal container:
- </para>
-
+ </table>
+ <para>
+ See an example below, that will add <envar>foo</envar> before <envar>foo2</envar> in the dependency list of the default portal container:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1320,45 +1320,45 @@
</component-plugin>
</external-component-plugins></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependenciesAfter">
- <title><envar>AddDependenciesAfter</envar></title>
- <para>
- This modification adds a list of dependencies before a given target dependency defined into the list of dependencies of the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesAfter</emphasis>.
- </para>
- <table id="tabl-Reference_Guide-AddDependenciesAfter-Descriptions_of_the_fields_of_an_AddDependenciesAfter">
- <title>Descriptions of the fields of an <envar>AddDependenciesAfter</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- dependencies
- </entry>
- <entry>
- A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddDependenciesAfter">
+ <title><envar>AddDependenciesAfter</envar></title>
+ <para>
+ This modification adds a list of dependencies before a given target dependency defined into the list of dependencies of the <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependenciesAfter</emphasis>.
+ </para>
+ <table id="tabl-Reference_Guide-AddDependenciesAfter-Descriptions_of_the_fields_of_an_AddDependenciesAfter">
+ <title>Descriptions of the fields of an <envar>AddDependenciesAfter</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ dependencies
+ </entry>
+ <entry>
+ A list of <emphasis>String</emphasis> corresponding to the list of name of the dependencies to add. If the value of this field is empty, the change will be ignored.
+ </entry>
- </row>
- <row>
- <entry>
- target
- </entry>
- <entry>
- The name of the dependency after which we would like to add the new dependencies. If this field is <envar>null</envar> or the target dependency cannot be found in the list of dependencies defined into the <envar>PortalContainerDefinition</envar>, the new dependencies will be added in last position to the list.
- </entry>
+ </row>
+ <row>
+ <entry>
+ target
+ </entry>
+ <entry>
+ The name of the dependency after which we would like to add the new dependencies. If this field is <envar>null</envar> or the target dependency cannot be found in the list of dependencies defined into the <envar>PortalContainerDefinition</envar>, the new dependencies will be added in last position to the list.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- See an example below, that will add <envar>foo</envar> after <envar>foo2</envar> in the dependency list of the default portal container:
- </para>
-
+ </table>
+ <para>
+ See an example below, that will add <envar>foo</envar> after <envar>foo2</envar> in the dependency list of the default portal container:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1395,36 +1395,36 @@
</component-plugin>
</external-component-plugins></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddSettings">
- <title><envar>AddSettings</envar></title>
- <para>
- This modification adds new settings to a <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddSettings</emphasis>.
- </para>
- <table id="tabl-Reference_Guide-AddSettings-Descriptions_of_the_fields_of_an_AddSettings">
- <title>Descriptions of the fields of an <envar>AddSettings</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- settings
- </entry>
- <entry>
- A map of <emphasis><String, Object></emphasis> corresponding to the settings to add. If the value of this field is empty, the change will be ignored.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-The_existing_implementations_of_PortalContainerDefinitionChange-AddSettings">
+ <title><envar>AddSettings</envar></title>
+ <para>
+ This modification adds new settings to a <envar>PortalContainerDefinition</envar>. The full qualified name is <emphasis>org.exoplatform.container.definition.PortalContainerDefinitionChange$AddSettings</emphasis>.
+ </para>
+ <table id="tabl-Reference_Guide-AddSettings-Descriptions_of_the_fields_of_an_AddSettings">
+ <title>Descriptions of the fields of an <envar>AddSettings</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ settings
+ </entry>
+ <entry>
+ A map of <emphasis><String, Object></emphasis> corresponding to the settings to add. If the value of this field is empty, the change will be ignored.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- See an example below, that will add the settings <envar>string</envar> and <envar>stringX</envar> to the settings of the default portal container:
- </para>
-
+ </table>
+ <para>
+ See an example below, that will add the settings <envar>string</envar> and <envar>stringX</envar> to the settings of the default portal container:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1470,20 +1470,20 @@
</component-plugin>
</external-component-plugins></programlisting>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Disable_dynamically_a_portal_container">
- <title>Disable dynamically a portal container</title>
- <para>
- It is possible to use <envar>component-plugin</envar> elements in order to dynamically disable one or several portal containers. In the example below, we disable the portal container named <envar>foo</envar>:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Advanced_concepts_for_the_PortalContainers-Disable_dynamically_a_portal_container">
+ <title>Disable dynamically a portal container</title>
+ <para>
+ It is possible to use <envar>component-plugin</envar> elements in order to dynamically disable one or several portal containers. In the example below, we disable the portal container named <envar>foo</envar>:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig -->
<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
@@ -1503,35 +1503,35 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
- <table id="tabl-Reference_Guide-Disable_dynamically_a_portal_container-Descriptions_of_the_fields_of_a_PortalContainerDefinitionDisablePlugin">
- <title>Descriptions of the fields of a <envar>PortalContainerDefinitionDisablePlugin</envar></title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- names (*)
- </entry>
- <entry>
- The list of the name of the portal containers to disable.
- </entry>
+ <table id="tabl-Reference_Guide-Disable_dynamically_a_portal_container-Descriptions_of_the_fields_of_a_PortalContainerDefinitionDisablePlugin">
+ <title>Descriptions of the fields of a <envar>PortalContainerDefinitionDisablePlugin</envar></title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ names (*)
+ </entry>
+ <entry>
+ The list of the name of the portal containers to disable.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <note>
- <para>
- All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
- </para>
+ </table>
+ <note>
+ <para>
+ All the value of the parameters marked with a (*) can be defined thanks to System properties like any values in configuration files but also thanks to variables loaded by the <emphasis>PropertyConfigurator</emphasis>. For example in GateIn by default, it would be all the variables defined in the file <emphasis>configuration.properties</emphasis>.
+ </para>
- </note>
- <para>
- To prevent any accesses to a web application corresponding to <envar>PortalContainer</envar> that has been disabled, you need to make sure that the following Http Filter (or a sub class of it) has been added to your web.xml in first position as below:
- </para>
-
+ </note>
+ <para>
+ To prevent any accesses to a web application corresponding to <envar>PortalContainer</envar> that has been disabled, you need to make sure that the following Http Filter (or a sub class of it) has been added to your web.xml in first position as below:
+ </para>
+
<programlisting language="XML" role="XML"><filter>
<filter-name>PortalContainerFilter</filter-name>
<filter-class>org.exoplatform.container.web.PortalContainerFilter</filter-class>
@@ -1541,35 +1541,35 @@
<filter-name>PortalContainerFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping></programlisting>
- <note>
- <para>
- It is only possible to disable a portal container when at least one PortalContainerDefinition has been registered.
- </para>
+ <note>
+ <para>
+ It is only possible to disable a portal container when at least one PortalContainerDefinition has been registered.
+ </para>
- </note>
+ </note>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-System_property_configuration">
- <title>System property configuration</title>
- <para>
- A new property configurator service has been developed for taking care of configuring system properties from the inline kernel configuration or from specified property files.
- </para>
- <para>
- The services is scoped at the root container level because it is used by all the services in the different portal containers in the application runtime.
- </para>
- <section id="sect-Reference_Guide-System_property_configuration-Properties_init_param">
- <title>Properties init param</title>
- <para>
- The properties init param takes a property declared to configure various properties.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-System_property_configuration">
+ <title>System property configuration</title>
+ <para>
+ A new property configurator service has been developed for taking care of configuring system properties from the inline kernel configuration or from specified property files.
+ </para>
+ <para>
+ The services is scoped at the root container level because it is used by all the services in the different portal containers in the application runtime.
+ </para>
+ <section id="sect-Reference_Guide-System_property_configuration-Properties_init_param">
+ <title>Properties init param</title>
+ <para>
+ The properties init param takes a property declared to configure various properties.
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>PropertyManagerConfigurator</key>
<type>org.exoplatform.container.PropertyConfigurator</type>
@@ -1581,14 +1581,14 @@
</init-params>
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-System_property_configuration-Properties_URL_init_param">
- <title>Properties URL init param</title>
- <para>
- The properties URL init param allow to load an external file by specifying its URL. Both property and XML format are supported, see the javadoc of the <emphasis><envar>java.util.Properties</envar></emphasis> class for more information. When a property file is loaded the various property declarations are loaded in the order in which the properties are declared sequentially in the file.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-System_property_configuration-Properties_URL_init_param">
+ <title>Properties URL init param</title>
+ <para>
+ The properties URL init param allow to load an external file by specifying its URL. Both property and XML format are supported, see the javadoc of the <emphasis><envar>java.util.Properties</envar></emphasis> class for more information. When a property file is loaded the various property declarations are loaded in the order in which the properties are declared sequentially in the file.
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>PropertyManagerConfigurator</key>
<type>org.exoplatform.container.PropertyConfigurator</type>
@@ -1599,104 +1599,104 @@
</value-param>
</init-params>
</component></programlisting>
- <para>
- In the properties file corresponding to the external properties, you can reuse variables before defining to create a new variable. In this case, the prefix "<emphasis>portal.container.</emphasis>" is not needed, see an example below:
+ <para>
+ In the properties file corresponding to the external properties, you can reuse variables before defining to create a new variable. In this case, the prefix "<emphasis>portal.container.</emphasis>" is not needed, see an example below:
<programlisting>my-var1=value 1
my-var2=value 2
complex-value=${my-var1}-${my-var2}</programlisting>
- </para>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-System_property_configuration-System_Property_configuration_of_the_properties_URL">
- <title>System Property configuration of the properties URL</title>
- <para>
- It is possible to replace the properties URL init param by a system property that overwrites it. The name of that property is <emphasis>exo.properties.url</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-System_property_configuration-System_Property_configuration_of_the_properties_URL">
+ <title>System Property configuration of the properties URL</title>
+ <para>
+ It is possible to replace the properties URL init param by a system property that overwrites it. The name of that property is <emphasis>exo.properties.url</emphasis>.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-Variable_Syntaxes">
- <title>Variable Syntaxes</title>
- <para>
- All the variables that we described in the previous sections can be defined thanks to 2 possible syntaxes which are <emphasis>${variable-name}</emphasis> or <emphasis>${variable-name:default-value}</emphasis>. The first syntax doesn't define any default value so if the variable has not be set the value will be <emphasis>${variable-name}</emphasis> to indicate that it could not be resolved. The second syntax allows you to define the default value after the semi colon so if the variable has not be set the value will be the given default value.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-Variable_Syntaxes">
+ <title>Variable Syntaxes</title>
+ <para>
+ All the variables that we described in the previous sections can be defined thanks to 2 possible syntaxes which are <emphasis>${variable-name}</emphasis> or <emphasis>${variable-name:default-value}</emphasis>. The first syntax doesn't define any default value so if the variable has not be set the value will be <emphasis>${variable-name}</emphasis> to indicate that it could not be resolved. The second syntax allows you to define the default value after the semi colon so if the variable has not be set the value will be the given default value.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-Runtime_configuration_profiles">
- <title>Runtime configuration profiles</title>
- <para>
- The kernel configuration is able to handle configuration profiles at runtime (as opposed to packaging time).
- </para>
- <section id="sect-Reference_Guide-Runtime_configuration_profiles-Profiles_activation">
- <title>Profiles activation</title>
- <para>
- An active profile list is obtained during the boot of the root container and is composed of the system property <emphasis>exo.profiles</emphasis> sliced according the "," delimiter and also a server specific profile value (tomcat for tomcat, jboss for jboss, etc...).
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-Runtime_configuration_profiles">
+ <title>Runtime configuration profiles</title>
+ <para>
+ The kernel configuration is able to handle configuration profiles at runtime (as opposed to packaging time).
+ </para>
+ <section id="sect-Reference_Guide-Runtime_configuration_profiles-Profiles_activation">
+ <title>Profiles activation</title>
+ <para>
+ An active profile list is obtained during the boot of the root container and is composed of the system property <emphasis>exo.profiles</emphasis> sliced according the "," delimiter and also a server specific profile value (tomcat for tomcat, jboss for jboss, etc...).
+ </para>
+
<programlisting># runs GateIn on Tomcat with the profiles tomcat and foo
sh gatein.sh -Dexo.profiles=foo
# runs GateIn on JBoss with the profiles jboss, foo and bar
sh run.sh -Dexo.profiles=foo,bar</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Runtime_configuration_profiles-Profiles_configuration">
- <title>Profiles configuration</title>
- <para>
- Profiles are configured in the configuration files of the eXo kernel.
- </para>
- <section id="sect-Reference_Guide-Profiles_configuration-Profiles_definition">
- <title>Profiles definition</title>
- <para>
- Profile activation occurs at XML to configuration object unmarshalling time. It is based on an "profile" attribute that is present on some of the XML element of the configuration files. To enable this, the kernel configuration schema has been upgraded to kernel_1_1.xsd. The configuration is based on the following rules:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Any kernel element with the no <emphasis>profiles</emphasis> attribute will create a configuration object
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Runtime_configuration_profiles-Profiles_configuration">
+ <title>Profiles configuration</title>
+ <para>
+ Profiles are configured in the configuration files of the eXo kernel.
+ </para>
+ <section id="sect-Reference_Guide-Profiles_configuration-Profiles_definition">
+ <title>Profiles definition</title>
+ <para>
+ Profile activation occurs at XML to configuration object unmarshalling time. It is based on an "profile" attribute that is present on some of the XML element of the configuration files. To enable this, the kernel configuration schema has been upgraded to kernel_1_1.xsd. The configuration is based on the following rules:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Any kernel element with the no <emphasis>profiles</emphasis> attribute will create a configuration object
+ </para>
- </listitem>
- <listitem>
- <para>
- Any kernel element having a <emphasis>profiles</emphasis> attribute containing at least one of the active profiles will create a configuration object
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Any kernel element having a <emphasis>profiles</emphasis> attribute containing at least one of the active profiles will create a configuration object
+ </para>
- </listitem>
- <listitem>
- <para>
- Any kernel element having a <emphasis>profiles</emphasis> attribute matching none of the active profile will not create a configuration object
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Any kernel element having a <emphasis>profiles</emphasis> attribute matching none of the active profile will not create a configuration object
+ </para>
- </listitem>
- <listitem>
- <para>
- Resolution of duplicates (such as two components with same type) is left up to the kernel
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Resolution of duplicates (such as two components with same type) is left up to the kernel
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_configuration-Profiles_capable_configuration_elements">
- <title>Profiles capable configuration elements</title>
- <para>
- A configuration element is <emphasis>profiles</emphasis> capable when it carries a profiles element.
- </para>
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Component_element">
- <title>Component element</title>
- <para>
- The component element declares a component when activated. It will shadow any element with the same key declared before in the same configuration file:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_configuration-Profiles_capable_configuration_elements">
+ <title>Profiles capable configuration elements</title>
+ <para>
+ A configuration element is <emphasis>profiles</emphasis> capable when it carries a profiles element.
+ </para>
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Component_element">
+ <title>Component element</title>
+ <para>
+ The component element declares a component when activated. It will shadow any element with the same key declared before in the same configuration file:
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>Component</key>
<type>Component</type>
@@ -1707,14 +1707,14 @@
<type>FooComponent</type>
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Component_plugin_element">
- <title>Component plugin element</title>
- <para>
- The component-plugin element is used to dynamically extend the configuration of a given component. Thanks to the profiles the component-plugins could be enabled or disabled:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Component_plugin_element">
+ <title>Component plugin element</title>
+ <para>
+ The component-plugin element is used to dynamically extend the configuration of a given component. Thanks to the profiles the component-plugins could be enabled or disabled:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<target-component>Component</target-component>
<component-plugin profiles="foo">
@@ -1730,26 +1730,26 @@
</component-plugin>
</external-component-plugins></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Import_element">
- <title>Import element</title>
- <para>
- The import element imports a referenced configuration file when activated:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Import_element">
+ <title>Import element</title>
+ <para>
+ The import element imports a referenced configuration file when activated:
+ </para>
+
<programlisting language="XML" role="XML"><import>empty</import>
<import profiles="foo">foo</import>
<import profiles="bar">bar</import></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Init_param_element">
- <title>Init param element</title>
- <para>
- The init param element configures the parameter argument of the construction of a component service:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Init_param_element">
+ <title>Init param element</title>
+ <para>
+ The init param element configures the parameter argument of the construction of a component service:
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>Component</key>
<type>ComponentImpl</type>
@@ -1769,14 +1769,14 @@
</init-params>
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Value_collection_element">
- <title>Value collection element</title>
- <para>
- The value collection element configures one of the value of collection data:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Value_collection_element">
+ <title>Value collection element</title>
+ <para>
+ The value collection element configures one of the value of collection data:
+ </para>
+
<programlisting language="XML" role="XML"><object type="org.exoplatform.container.configuration.ConfigParam">
<field name="role">
<collection type="java.util.ArrayList">
@@ -1787,14 +1787,14 @@
</field>
</object></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Field_configuration_element">
- <title>Field configuration element</title>
- <para>
- The field configuration element configures the field of an object:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Profiles_capable_configuration_elements-Field_configuration_element">
+ <title>Field configuration element</title>
+ <para>
+ The field configuration element configures the field of an object:
+ </para>
+
<programlisting language="XML" role="XML"><object-param>
<name>test.configuration</name>
<object type="org.exoplatform.container.configuration.ConfigParam">
@@ -1816,25 +1816,25 @@
</object>
</object-param></programlisting>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Container_Configuration-Component_request_life_cycle">
- <title>Component request life cycle</title>
- <section id="sect-Reference_Guide-Component_request_life_cycle-Component_request_life_cycle_contract">
- <title>Component request life cycle contract</title>
- <para>
- The component request life cycle is an interface that defines a contract for a component for being involved into a request:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Container_Configuration-Component_request_life_cycle">
+ <title>Component request life cycle</title>
+ <section id="sect-Reference_Guide-Component_request_life_cycle-Component_request_life_cycle_contract">
+ <title>Component request life cycle contract</title>
+ <para>
+ The component request life cycle is an interface that defines a contract for a component for being involved into a request:
+ </para>
+
<programlisting language="Java" role="Java">public interface ComponentRequestLifecycle
{
/**
@@ -1849,23 +1849,23 @@
*/
void endRequest(ExoContainer container);
}</programlisting>
- <para>
- The container passed is the container to which the component is related. This contract is often used to setup a thread local based context that will be demarcated by a request.
- </para>
- <para>
- For instance in the GateIn portal context, a component request life cycle is triggered for user requests. Another example is the initial data import in GateIn that demarcates using callbacks made to that interface.
- </para>
+ <para>
+ The container passed is the container to which the component is related. This contract is often used to setup a thread local based context that will be demarcated by a request.
+ </para>
+ <para>
+ For instance in the GateIn portal context, a component request life cycle is triggered for user requests. Another example is the initial data import in GateIn that demarcates using callbacks made to that interface.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Component_request_life_cycle-Request_life_cycle">
- <title>Request life cycle</title>
- <para>
- The <envar>RequestLifeCycle</envar> class has several statics methods that are used to schedule the component request life cycle of components. Its main responsability is to perform scheduling while respecting the constraint to execute the request life cycle of a component only once even if it can be scheduled several times.
- </para>
- <section id="sect-Reference_Guide-Request_life_cycle-Scheduling_a_component_request_life_cycle">
- <title>Scheduling a component request life cycle</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Component_request_life_cycle-Request_life_cycle">
+ <title>Request life cycle</title>
+ <para>
+ The <envar>RequestLifeCycle</envar> class has several statics methods that are used to schedule the component request life cycle of components. Its main responsibility is to perform scheduling while respecting the constraint to execute the request life cycle of a component only once even if it can be scheduled several times.
+ </para>
+ <section id="sect-Reference_Guide-Request_life_cycle-Scheduling_a_component_request_life_cycle">
+ <title>Scheduling a component request life cycle</title>
+
<programlisting language="Java" role="Java">RequestLifeCycle.begin(component);
try
{
@@ -1876,14 +1876,14 @@
RequestLifeCycle.end();
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Request_life_cycle-Scheduling_a_container_request_life_cycle">
- <title>Scheduling a container request life cycle</title>
- <para>
- Scheduling a container triggers the component request life cyle of all the components that implement the interface <envar>ComponentRequestLifeCycle</envar>. If one of the component has already been scheduled before and then that component will not be scheduled again. When the local value is true, then the looked components will be those of the container, when it is false then the scheduler will also look at the components in the ancestor containers.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Request_life_cycle-Scheduling_a_container_request_life_cycle">
+ <title>Scheduling a container request life cycle</title>
+ <para>
+ Scheduling a container triggers the component request life cycle of all the components that implement the interface <envar>ComponentRequestLifeCycle</envar>. If one of the component has already been scheduled before and then that component will not be scheduled again. When the local value is true, then the looked components will be those of the container, when it is false then the scheduler will also look at the components in the ancestor containers.
+ </para>
+
<programlisting language="Java" role="Java">RequestLifeCycle.begin(container, local);
try
{
@@ -1894,34 +1894,34 @@
RequestLifeCycle.end();
}</programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Component_request_life_cycle-When_request_life_cycle_is_triggered">
- <title>When request life cycle is triggered</title>
- <section id="sect-Reference_Guide-When_request_life_cycle_is_triggered-Portal_request_life_cycle">
- <title>Portal request life cycle</title>
- <para>
- Each portal request triggers the life cycle of the associated portal container.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Component_request_life_cycle-When_request_life_cycle_is_triggered">
+ <title>When request life cycle is triggered</title>
+ <section id="sect-Reference_Guide-When_request_life_cycle_is_triggered-Portal_request_life_cycle">
+ <title>Portal request life cycle</title>
+ <para>
+ Each portal request triggers the life cycle of the associated portal container.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-When_request_life_cycle_is_triggered-JMX_request_Life_Cycle">
- <title>JMX request Life Cycle</title>
- <para>
- When a JMX bean is invoked, the request life cycle of the container to which it belongs it scheduled. Indeed JMX is an entry point of the system that may need component to have a request life cycle triggered.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-When_request_life_cycle_is_triggered-JMX_request_Life_Cycle">
+ <title>JMX request Life Cycle</title>
+ <para>
+ When a JMX bean is invoked, the request life cycle of the container to which it belongs it scheduled. Indeed JMX is an entry point of the system that may need component to have a request life cycle triggered.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/data-source-provider.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/data-source-provider.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/data-source-provider.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -94,7 +94,7 @@
<emphasis>check-tx-active</emphasis>
</entry>
<entry>
- This parameter indicates that the data source needs to check if a transaction is active to decide if the provided connection needs to be managed or not. If it is set to <emphasis>false</emphasis>, the data source will provide only managed connections if the data source itself is managed. By default, this parameter is set to <emphasis>true</emphasis>. If this parameter is set to <emphasis>true</emphasis>, it will need the <emphasis>TransactionService</emphasis> to work propertly, so please ensure that the <emphasis>TransactionService</emphasis> is defined in your configuration.
+ This parameter indicates that the data source needs to check if a transaction is active to decide if the provided connection needs to be managed or not. If it is set to <emphasis>false</emphasis>, the data source will provide only managed connections if the data source itself is managed. By default, this parameter is set to <emphasis>true</emphasis>. If this parameter is set to <emphasis>true</emphasis>, it will need the <emphasis>TransactionService</emphasis> to work properly, so please ensure that the <emphasis>TransactionService</emphasis> is defined in your configuration.
</entry>
</row>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/initialcontext-binder-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/initialcontext-binder-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/initialcontext-binder-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,64 +4,64 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Initial_Context_Binder">
- <title>Initial Context Binder</title>
- <para>
- Initial Context Binder is responsible for binding references at runtime, persisting in file and automatically rebinding. Java temp directory is used to persist references in bind-references.xml file by default. In case when need to definde special file it can be done by add parameter to <xref linkend="sect-Reference_Guide-JNDI_naming" /> configuration.
- </para>
- <section id="sect-Reference_Guide-Initial_Context_Binder-API">
- <title>API</title>
- <para>
- Service provide methods for binding reference:
- </para>
-
+ <title>Initial Context Binder</title>
+ <para>
+ Initial Context Binder is responsible for binding references at runtime, persisting in file and automatically rebinding. Java temp directory is used to persist references in bind-references.xml file by default. In case when need to define special file it can be done by add parameter to <xref linkend="sect-Reference_Guide-JNDI_naming" /> configuration.
+ </para>
+ <section id="sect-Reference_Guide-Initial_Context_Binder-API">
+ <title>API</title>
+ <para>
+ Service provide methods for binding reference:
+ </para>
+
<programlisting language="Java" role="Java">public void bind(String bindName, String className, String factory, String factoryLocation, Map<String, String> refAddr) throws NamingException, FileNotFoundException, XMLStreamExcept</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- bindName - name of binding
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ bindName - name of binding
+ </para>
- </listitem>
- <listitem>
- <para>
- className - the fully-qualified name of the class of the object to which this Reference refers
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ className - the fully-qualified name of the class of the object to which this Reference refers
+ </para>
- </listitem>
- <listitem>
- <para>
- factory - the name of the factory class for creating an instance of the object to which this Reference refers
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ factory - the name of the factory class for creating an instance of the object to which this Reference refers
+ </para>
- </listitem>
- <listitem>
- <para>
- factoryLocation - the location of the factory class
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ factoryLocation - the location of the factory class
+ </para>
- </listitem>
- <listitem>
- <para>
- refAddr - object's properties map
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ refAddr - object's properties map
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="Java" role="Java">public void bind(String bindName, Reference ref) throws NamingException, FileNotFoundException, XMLStreamExcept</programlisting>
- <para>
- Returns reference associated with defined name:
- </para>
-
+ <para>
+ Returns reference associated with defined name:
+ </para>
+
<programlisting language="Java" role="Java">public Reference getReference(String bindName)</programlisting>
- <para>
- Unbind the Reference with defined name:
- </para>
-
+ <para>
+ Unbind the Reference with defined name:
+ </para>
+
<programlisting language="Java" role="Java">public void unbind(String bindName) throws NamingException, FileNotFoundException, XMLStreamException</programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/inversion-of-control.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/inversion-of-control.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/inversion-of-control.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,112 +4,112 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Inversion_Of_Control">
- <title>Inversion Of Control</title>
- <section id="sect-Reference_Guide-Inversion_Of_Control-Overview">
- <title>Overview</title>
- <para>
- The services are not responsible for the instantiation of the components on which they depend.
- </para>
- <para>
- This architecture provides a loosely coupled design where the implementation of dependant services can be transparently exchanged.
- </para>
- <para>
- This pattern has several names :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Hollywood principle : "don't call me, I will call you"
- </para>
+ <title>Inversion Of Control</title>
+ <section id="sect-Reference_Guide-Inversion_Of_Control-Overview">
+ <title>Overview</title>
+ <para>
+ The services are not responsible for the instantiation of the components on which they depend.
+ </para>
+ <para>
+ This architecture provides a loosely coupled design where the implementation of dependent services can be transparently exchanged.
+ </para>
+ <para>
+ This pattern has several names :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Hollywood principle : "don't call me, I will call you"
+ </para>
- </listitem>
- <listitem>
- <para>
- Inversion of Control
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Inversion of Control
+ </para>
- </listitem>
- <listitem>
- <para>
- Dependency injection
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Dependency injection
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Inversion_Of_Control-How">
- <title>How</title>
- <para>
- Don't let the object create itself the instances of the object that it references. This job is delegated to the container (assembler in the picture).
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eXoJCR/ioc.gif" width="444" />
- </imageobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Inversion_Of_Control-How">
+ <title>How</title>
+ <para>
+ Don't let the object create itself the instances of the object that it references. This job is delegated to the container (assembler in the picture).
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eXoJCR/ioc.gif" width="444" />
+ </imageobject>
- </mediaobject>
+ </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Inversion_Of_Control-Injection">
- <title>Injection</title>
- <para>
- There are two ways to inject a dependency :
- </para>
- <para>
- Using a constructor:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Inversion_Of_Control-Injection">
+ <title>Injection</title>
+ <para>
+ There are two ways to inject a dependency :
+ </para>
+ <para>
+ Using a constructor:
+ </para>
+
<programlisting language="Java" role="Java">public ServiceA(ServiceB serviceB)</programlisting>
- <para>
- Using setter methods:
- </para>
-
+ <para>
+ Using setter methods:
+ </para>
+
<programlisting language="Java" role="Java">public void setServiceB(ServiceB serviceB)</programlisting>
- <para>
- When a client service can not be stored in the container then the service locator pattern is used:
- </para>
-
+ <para>
+ When a client service can not be stored in the container then the service locator pattern is used:
+ </para>
+
<programlisting language="Java" role="Java">public ServiceA(){
this.serviceB =Container.getSInstance().getService(ServiceB.class);
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Inversion_Of_Control-Side_effects">
- <title>Side effects</title>
- <itemizedlist>
- <listitem>
- <para>
- Ease Unit test (use of Mock objects)
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Inversion_Of_Control-Side_effects">
+ <title>Side effects</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Ease Unit test (use of Mock objects)
+ </para>
- </listitem>
- <listitem>
- <para>
- Ease Maintainability
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Ease Maintainability
+ </para>
- </listitem>
- <listitem>
- <para>
- Ease Refactoring
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Ease Refactoring
+ </para>
- </listitem>
- <listitem>
- <para>
- Component reuse ( POJOs != EJBs)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Component reuse ( POJOs != EJBs)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/jndi-naming.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/jndi-naming.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/jndi-naming.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,125 +4,125 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JNDI_naming">
- <title>JNDI naming</title>
- <section id="sect-Reference_Guide-JNDI_naming-Prerequisites">
- <title>Prerequisites</title>
- <para>
- We need to configure JNDI environment properties and Reference binding with the eXo container standard mechanism.
- </para>
- <para>
- The Naming service covers:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- Configuring the current Naming Context Factory implemented as an ExoContainer Component <envar>org.exoplatform.services.naming.InitialContextInitializer</envar>.
- </para>
+ <title>JNDI naming</title>
+ <section id="sect-Reference_Guide-JNDI_naming-Prerequisites">
+ <title>Prerequisites</title>
+ <para>
+ We need to configure JNDI environment properties and Reference binding with the eXo container standard mechanism.
+ </para>
+ <para>
+ The Naming service covers:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Configuring the current Naming Context Factory implemented as an ExoContainer Component <envar>org.exoplatform.services.naming.InitialContextInitializer</envar>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Binding Objects (References) to the current Context using <envar>org.exoplatform.services.naming.BindReferencePlugin</envar> component plugin.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Binding Objects (References) to the current Context using <envar>org.exoplatform.services.naming.BindReferencePlugin</envar> component plugin.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JNDI_naming-How_it_works">
- <title>How it works</title>
- <para>
- Make sure you understand the <ulink url="http://java.sun.com/products/jndi/1.2/javadoc/index.html">Java Naming and Directory InterfaceTM (JNDI)</ulink> concepts before using this service.
- </para>
- <section id="sect-Reference_Guide-How_it_works-JNDI_System_property_initialization">
- <title>JNDI System property initialization</title>
- <para>
- After the start time the Context Initializer (org.exoplatform.services.naming.InitialContextInitializer) traverses all initial parameters (that concern the Naming Context) configured in <envar>default-properties</envar> and <envar>mandatory-properties</envar> (see Configuration examples) and:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- For <envar>default-properties</envar>: Check if this property is already set as a System property (<envar>System.getProperty(name)</envar>) and set this property if it's not found. Using those properties is recommended with a third party Naming service provider.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JNDI_naming-How_it_works">
+ <title>How it works</title>
+ <para>
+ Make sure you understand the <ulink url="http://java.sun.com/products/jndi/1.2/javadoc/index.html">Java Naming and Directory InterfaceTM (JNDI)</ulink> concepts before using this service.
+ </para>
+ <section id="sect-Reference_Guide-How_it_works-JNDI_System_property_initialization">
+ <title>JNDI System property initialization</title>
+ <para>
+ After the start time the Context Initializer (org.exoplatform.services.naming.InitialContextInitializer) traverses all initial parameters (that concern the Naming Context) configured in <envar>default-properties</envar> and <envar>mandatory-properties</envar> (see Configuration examples) and:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ For <envar>default-properties</envar>: Check if this property is already set as a System property (<envar>System.getProperty(name)</envar>) and set this property if it's not found. Using those properties is recommended with a third party Naming service provider.
+ </para>
- </listitem>
- <listitem>
- <para>
- For <envar>mandatory-properties</envar>: Set the property without checking.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For <envar>mandatory-properties</envar>: Set the property without checking.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Standard JNDI properties:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <envar>java.naming.factory.initial</envar>
- </para>
+ </itemizedlist>
+ <para>
+ Standard JNDI properties:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <envar>java.naming.factory.initial</envar>
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>java.naming.provider.url</envar>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>java.naming.provider.url</envar>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- and others (see JNDI docs)
- </para>
+ </itemizedlist>
+ <para>
+ and others (see JNDI docs)
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-How_it_works-JNDI_reference_binding">
- <title>JNDI reference binding</title>
- <para>
- Another responsibility of Context Initializer <envar>org.exoplatform.services.naming.InitialContextInitializer</envar> is binding of preconfigured references to the naming context. For this purpose, it uses a standard eXo component plugin mechanism and in particular the <envar>org.exoplatform.services.naming.BindReferencePlugin</envar> component plugin. The configuration of this plugin includes three mandatory value parameters:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <envar>bind-name</envar>: the name of binding reference.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_it_works-JNDI_reference_binding">
+ <title>JNDI reference binding</title>
+ <para>
+ Another responsibility of Context Initializer <envar>org.exoplatform.services.naming.InitialContextInitializer</envar> is binding of preconfigured references to the naming context. For this purpose, it uses a standard eXo component plugin mechanism and in particular the <envar>org.exoplatform.services.naming.BindReferencePlugin</envar> component plugin. The configuration of this plugin includes three mandatory value parameters:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <envar>bind-name</envar>: the name of binding reference.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>class-name</envar>: the type of binding reference.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>class-name</envar>: the type of binding reference.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>factory</envar>: the object factory type.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>factory</envar>: the object factory type.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- And also <envar>ref-addresses</envar> property parameter with a set of references' properties. (see Configuration examples) Context Initializer uses those parameters to bind the neccessary reference automatically.
- </para>
+ </itemizedlist>
+ <para>
+ And also <envar>ref-addresses</envar> property parameter with a set of references' properties. (see Configuration examples) Context Initializer uses those parameters to bind the necessary reference automatically.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JNDI_naming-Configuration_examples">
- <title>Configuration examples</title>
- <para>
- The <envar>InitialContextInitializer</envar> configuration example:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JNDI_naming-Configuration_examples">
+ <title>Configuration examples</title>
+ <para>
+ The <envar>InitialContextInitializer</envar> configuration example:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
@@ -146,19 +146,19 @@
</properties-param>
</init-params>
</component></programlisting>
- <para>
- where
- </para>
- <para>
- <emphasis role="bold">binding-store-path</emphasis> is file path which stores binded datasources in runtime
- </para>
- <para>
- <emphasis role="bold">overload-context-factory</emphasis> allows to overload the default initial context factory by a context factory that is ExoContainer aware and that is able to delegate to the original initial context factory if it detects that it is not in the eXo scope. By default the feature is disabled since it is only required on AS that don't share the objects by default like tomcat but unlike JBoss AS
- </para>
- <para>
- The <envar>BindReferencePlugin</envar> component plugin configuration example (for JDBC datasource):
- </para>
-
+ <para>
+ where
+ </para>
+ <para>
+ <emphasis role="bold">binding-store-path</emphasis> is file path which stores binded datasources in runtime
+ </para>
+ <para>
+ <emphasis role="bold">overload-context-factory</emphasis> allows to overload the default initial context factory by a context factory that is ExoContainer aware and that is able to delegate to the original initial context factory if it detects that it is not in the eXo scope. By default the feature is disabled since it is only required on AS that don't share the objects by default like tomcat but unlike JBoss AS
+ </para>
+ <para>
+ The <envar>BindReferencePlugin</envar> component plugin configuration example (for JDBC datasource):
+ </para>
+
<programlisting language="XML" role="XML"> <component-plugins>
<component-plugin>
<name>bind.datasource</name>
@@ -188,39 +188,39 @@
</init-params>
</component-plugin></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JNDI_naming-Recommendations_for_Application_Developers">
- <title>Recommendations for Application Developers</title>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <envar>SimpleContextFactory</envar> is created for testing purposes only, do not use it for production.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JNDI_naming-Recommendations_for_Application_Developers">
+ <title>Recommendations for Application Developers</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <envar>SimpleContextFactory</envar> is created for testing purposes only, do not use it for production.
+ </para>
- </listitem>
- <listitem>
- <para>
- In J2EE environment use Naming Factory objects provided with the Application Server.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ In J2EE environment use Naming Factory objects provided with the Application Server.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JNDI_naming-InitialContextInitializer_API">
- <title>InitialContextInitializer API</title>
- <para>
- <envar>InitialContextInitalizer</envar> also provides feature of references binding in runtime. References have bind in runtime will be persisted and automatically rebinded on a next system start.
- </para>
- <para>
- Service provides methods for binding reference.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JNDI_naming-InitialContextInitializer_API">
+ <title>InitialContextInitializer API</title>
+ <para>
+ <envar>InitialContextInitalizer</envar> also provides feature of references binding in runtime. References have bind in runtime will be persisted and automatically rebinded on a next system start.
+ </para>
+ <para>
+ Service provides methods for binding reference.
+ </para>
+
<programlisting language="Java" role="Java">
public void bind(String bindName,
String className,
@@ -228,43 +228,43 @@
String factoryLocation,
Map<String, String> refAddr)
throws NamingException, FileNotFoundException, XMLStreamException;</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- <envar>bindName</envar>: name of binding.
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <envar>bindName</envar>: name of binding.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>className</envar>: the fully-qualified name of the class of the object to which this Reference refers.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>className</envar>: the fully-qualified name of the class of the object to which this Reference refers.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>factory</envar>: the name of the factory class for creating an instance of the object to which this Reference refers.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>factory</envar>: the name of the factory class for creating an instance of the object to which this Reference refers.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>factoryLocation</envar>: the location of the factory class.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>factoryLocation</envar>: the location of the factory class.
+ </para>
- </listitem>
- <listitem>
- <para>
- <envar>refAddr</envar>: object's properties map.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <envar>refAddr</envar>: object's properties map.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Example of usage:
- </para>
-
+ </itemizedlist>
+ <para>
+ Example of usage:
+ </para>
+
<programlisting language="Java" role="Java">
// obtain InitialContextInitializer instance from ExoContainer (e.g. PortalContainer)
InitialContextInitializer initContext = (InitialContextInitializer)container.getComponentInstanceOfType(InitialContextInitializer.class);
@@ -280,7 +280,7 @@
// try to get just bound DataSource
DataSource ds = (DataSource)new InitialContext().lookup("jdbcexo");</programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/job-scheduler-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/job-scheduler-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/job-scheduler-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,163 +4,163 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Job_Schedule">
- <!-- This document was created with Syntext Serna Free. --> <title>Job Schedule</title>
- <section id="sect-Reference_Guide-Job_Schedule-What_is_Job_Scheduler">
- <title>What is Job Scheduler?</title>
- <para>
- <emphasis role="bold">Job scheduler</emphasis> defines a job to execute a given number of times during a given period. It is a service that is in charge of unattended background executions, commonly known for historical reasons as batch processing. It is used to create and run jobs automatically and continuously, to schedule event-driven jobs and reports.
- </para>
+ <!-- This document was created with Syntext Serna Free. --> <title>Job Schedule</title>
+ <section id="sect-Reference_Guide-Job_Schedule-What_is_Job_Scheduler">
+ <title>What is Job Scheduler?</title>
+ <para>
+ <emphasis role="bold">Job scheduler</emphasis> defines a job to execute a given number of times during a given period. It is a service that is in charge of unattended background executions, commonly known for historical reasons as batch processing. It is used to create and run jobs automatically and continuously, to schedule event-driven jobs and reports.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Job_Schedule-Where_is_Job_Scheduler_Service_used_in_eXo_Products">
- <title>Where is Job Scheduler Service used in eXo Products?</title>
- <para>
- Job Scheduler Service is widely used in many eXo products such as Social, DMS, WCM, eXo Knowledge and eXo Collaboration.
- </para>
- <para>
- In eXo products, Job Schedulers are used to do some tasks as below:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Automatically send notification, such as task/event reminder in the Calendar application of eXo Collaboration.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Job_Schedule-Where_is_Job_Scheduler_Service_used_in_eXo_Products">
+ <title>Where is Job Scheduler Service used in eXo Products?</title>
+ <para>
+ Job Scheduler Service is widely used in many eXo products such as Social, DMS, WCM, eXo Knowledge and eXo Collaboration.
+ </para>
+ <para>
+ In eXo products, Job Schedulers are used to do some tasks as below:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Automatically send notification, such as task/event reminder in the Calendar application of eXo Collaboration.
+ </para>
- </listitem>
- <listitem>
- <para>
- Automatically save chat messages from Openfire Server to History in the Chat application of eXo Collaboration.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Automatically save chat messages from Openfire Server to History in the Chat application of eXo Collaboration.
+ </para>
- </listitem>
- <listitem>
- <para>
- Inactivate topics in the Forum application of eXo Knowledge.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Inactivate topics in the Forum application of eXo Knowledge.
+ </para>
- </listitem>
- <listitem>
- <para>
- Calculate the number of active and online users in the Forum application of eXo Knowledge.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Calculate the number of active and online users in the Forum application of eXo Knowledge.
+ </para>
- </listitem>
- <listitem>
- <para>
- Automatically collect RSS items from various RSS resources to post to the activity stream of users and spaces in eXo Social.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Automatically collect RSS items from various RSS resources to post to the activity stream of users and spaces in eXo Social.
+ </para>
- </listitem>
- <listitem>
- <para>
- Automatically send Newsletters to users in WCM.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Automatically send Newsletters to users in WCM.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Also, it is used in Schedule lifecycle in DMS.
- </para>
- <para>
- By using Job Scheduler Service in eXo kernel, many kinds of job can be configured to run, such as, addPeriodJob, addCronJob, addGlobalJobListener, addJobListener and many more. Just write a job (a class implements Job interface of quartz library and configures plug-in for JobSchedulerService and you're done.
- </para>
+ </itemizedlist>
+ <para>
+ Also, it is used in Schedule lifecycle in DMS.
+ </para>
+ <para>
+ By using Job Scheduler Service in eXo kernel, many kinds of job can be configured to run, such as, addPeriodJob, addCronJob, addGlobalJobListener, addJobListener and many more. Just write a job (a class implements Job interface of quartz library and configures plug-in for JobSchedulerService and you're done.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Job_Schedule-How_does_Job_Scheduler_work">
- <title>How does Job Scheduler work?</title>
- <para>
- Jobs are scheduled to run when a given Trigger occurs. Triggers can be created with nearly any combination of the following directives:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- at a certain time of day (to the millisecond)
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Job_Schedule-How_does_Job_Scheduler_work">
+ <title>How does Job Scheduler work?</title>
+ <para>
+ Jobs are scheduled to run when a given Trigger occurs. Triggers can be created with nearly any combination of the following directives:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ at a certain time of day (to the millisecond)
+ </para>
- </listitem>
- <listitem>
- <para>
- on certain days of the week
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ on certain days of the week
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- on certain days of the month
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ on certain days of the month
+ </para>
- </listitem>
- <listitem>
- <para>
- on certain days of the year
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ on certain days of the year
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- not on certain days listed within a registered Calendar (such as business holidays)
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ not on certain days listed within a registered Calendar (such as business holidays)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- repeated a specific number of times
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ repeated a specific number of times
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- repeated until a specific time/date
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ repeated until a specific time/date
+ </para>
- </listitem>
- <listitem>
- <para>
- repeated indefinitely
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ repeated indefinitely
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- repeated with a delay interval
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ repeated with a delay interval
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Jobs are given names by their creator and can also be organized into named groups. Triggers may also be given names and placed into groups, in order to easily organize them within the scheduler. Jobs can be added to the scheduler once, but registered with multiple Triggers. Within a J2EE environment, Jobs can perform their work as part of a distributed (XA) transaction.
- </para>
- <para>
- (Source: quartz-scheduler.org)
- </para>
- <section id="sect-Reference_Guide-How_does_Job_Scheduler_work-How_can_Job_Scheduler_Service_be_used_in_Kernel">
- <title>How can Job Scheduler Service be used in Kernel?</title>
- <para>
- Kernel leverages <ulink url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler service and wraps <classname>org.quartz.Scheduler</classname> in <classname>org.exoplatform.services.scheduler.impl.QuartzSheduler</classname> for easier service wiring and configuration like any other services. To work with Quartz in Kernel, you will mostly work with <classname>org.exoplatform.services.scheduler.JobSchedulerService</classname> (implemented by <classname>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</classname>.
- </para>
- <para>
- To use <classname>JobSchedulerService</classname>, you can configure it as a component in the configuration.xml. Because <classname>JobSchedulerService</classname> requires <classname>QuartzSheduler</classname> and <classname>QueueTasks</classname>, you also have to configure these two components.
- </para>
-
+ </itemizedlist>
+ <para>
+ Jobs are given names by their creator and can also be organized into named groups. Triggers may also be given names and placed into groups, in order to easily organize them within the scheduler. Jobs can be added to the scheduler once, but registered with multiple Triggers. Within a J2EE environment, Jobs can perform their work as part of a distributed (XA) transaction.
+ </para>
+ <para>
+ (Source: quartz-scheduler.org)
+ </para>
+ <section id="sect-Reference_Guide-How_does_Job_Scheduler_work-How_can_Job_Scheduler_Service_be_used_in_Kernel">
+ <title>How can Job Scheduler Service be used in Kernel?</title>
+ <para>
+ Kernel leverages <ulink url="http://www.quartz-scheduler.org">Quartz</ulink> for its scheduler service and wraps <classname>org.quartz.Scheduler</classname> in <classname>org.exoplatform.services.scheduler.impl.QuartzSheduler</classname> for easier service wiring and configuration like any other services. To work with Quartz in Kernel, you will mostly work with <classname>org.exoplatform.services.scheduler.JobSchedulerService</classname> (implemented by <classname>org.exoplatform.services.scheduler.impl.JobSchedulerServiceImpl</classname>.
+ </para>
+ <para>
+ To use <classname>JobSchedulerService</classname>, you can configure it as a component in the configuration.xml. Because <classname>JobSchedulerService</classname> requires <classname>QuartzSheduler</classname> and <classname>QueueTasks</classname>, you also have to configure these two components.
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -182,62 +182,62 @@
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-How_does_Job_Scheduler_work-Samples">
- <title>Samples</title>
- <note>
- <para>
- You can download the project code from <ulink url="https://github.com/hoatle/job-scheduler-service-tutorial">here</ulink>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_does_Job_Scheduler_work-Samples">
+ <title>Samples</title>
+ <note>
+ <para>
+ You can download the project code from <ulink url="https://github.com/hoatle/job-scheduler-service-tutorial">here</ulink>
+ </para>
- </note>
- <para>
- Work with <classname>JobSchedulerService</classname> by creating a sample project and use GateIn-3.1.0-GA for testing.
- </para>
- <para>
- Firstly, create a project by using maven archetype plugin:
- </para>
-
+ </note>
+ <para>
+ Work with <classname>JobSchedulerService</classname> by creating a sample project and use GateIn-3.1.0-GA for testing.
+ </para>
+ <para>
+ Firstly, create a project by using maven archetype plugin:
+ </para>
+
<programlisting>mvn archetype:generate
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- For project type: select <emphasis role="bold">maven-archetype-quickstart </emphasis>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ For project type: select <emphasis role="bold">maven-archetype-quickstart </emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For groupId: select <emphasis role="bold">org.exoplatform.samples</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For groupId: select <emphasis role="bold">org.exoplatform.samples</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For artifactId: select <emphasis role="bold">exo.samples.scheduler</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For artifactId: select <emphasis role="bold">exo.samples.scheduler</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For version: select<emphasis role="bold"> 1.0.0-SNAPSHOT</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For version: select<emphasis role="bold"> 1.0.0-SNAPSHOT</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- For package: select <emphasis role="bold">org.exoplatform.samples.scheduler</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ For package: select <emphasis role="bold">org.exoplatform.samples.scheduler</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Edit the pom.xml as follows:
- </para>
-
+ </itemizedlist>
+ <para>
+ Edit the pom.xml as follows:
+ </para>
+
<programlisting language="XML" role="XML"><project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -257,23 +257,23 @@
<name>eXo Samples For Scheduler</name>
<description>eXo Samples Code For Scheduler</description>
</project></programlisting>
- <para>
- Generate an eclipse project by using maven eclipse plugin and then import into eclipse:
- </para>
-
+ <para>
+ Generate an eclipse project by using maven eclipse plugin and then import into eclipse:
+ </para>
+
<programlisting>mvn eclipse:eclipse</programlisting>
- <para>
- eXo Kernel makes it easier to work with job scheduler service. All you need is just to define your "job" class to be performed by implementing <emphasis role="italic">org.quartz.Job</emphasis> interface and add configuration for it.
- </para>
- <section id="sect-Reference_Guide-Samples-Define_a_job">
- <title>Define a job</title>
- <para>
- To define a job, do as follows:
- </para>
- <para>
- Define your job to be performed. For example, the job <emphasis role="italic">DumbJob</emphasis> is defined as follows:
- </para>
-
+ <para>
+ eXo Kernel makes it easier to work with job scheduler service. All you need is just to define your "job" class to be performed by implementing <emphasis role="italic">org.quartz.Job</emphasis> interface and add configuration for it.
+ </para>
+ <section id="sect-Reference_Guide-Samples-Define_a_job">
+ <title>Define a job</title>
+ <para>
+ To define a job, do as follows:
+ </para>
+ <para>
+ Define your job to be performed. For example, the job <emphasis role="italic">DumbJob</emphasis> is defined as follows:
+ </para>
+
<programlisting language="Java" role="Java">package org.exoplatform.samples.scheduler.jobs;
import org.exoplatform.services.log.ExoLogger;
@@ -302,23 +302,23 @@
LOG.info("DumbJob is executing...");
}
}</programlisting>
- <para>
- All jobs are required to implement the method <emphasis role="italic">execute</emphasis> from <emphasis role="italic">org.quartz.Job</emphasis> interface. This method will be called whenever a job is performed. With <emphasis role="italic">DumbJob</emphasis>, you just use logging to see that it will work. By looking at the terminal, you will see the the log message: "DumbJob is executing..."
- </para>
+ <para>
+ All jobs are required to implement the method <emphasis role="italic">execute</emphasis> from <emphasis role="italic">org.quartz.Job</emphasis> interface. This method will be called whenever a job is performed. With <emphasis role="italic">DumbJob</emphasis>, you just use logging to see that it will work. By looking at the terminal, you will see the log message: "DumbJob is executing..."
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Samples-Job_configuration">
- <title>Job configuration</title>
- <para>
- After defining the "job", the only next step is to configure it by using <emphasis role="italic">external-component-plugin</emphasis> configuration for <emphasis role="italic">org.exoplatform.services.scheduler.JobSchedulerService</emphasis>. You can use these methods below for setting component plugin:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Samples-Job_configuration">
+ <title>Job configuration</title>
+ <para>
+ After defining the "job", the only next step is to configure it by using <emphasis role="italic">external-component-plugin</emphasis> configuration for <emphasis role="italic">org.exoplatform.services.scheduler.JobSchedulerService</emphasis>. You can use these methods below for setting component plugin:
+ </para>
+
<programlisting language="Java" role="Java">public void addPeriodJob(ComponentPlugin plugin) throws Exception;</programlisting>
- <para>
- The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.PeriodJob</emphasis>. This type of job is used to perform actions that are executed in a period of time. You have to define when this job is performed, when it ends, when it performs the first action, how many times it is executed and the period of time to perform the action. See the configuration sample below to understand more clearly:
- </para>
-
+ <para>
+ The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.PeriodJob</emphasis>. This type of job is used to perform actions that are executed in a period of time. You have to define when this job is performed, when it ends, when it performs the first action, how many times it is executed and the period of time to perform the action. See the configuration sample below to understand more clearly:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
<component-plugin>
@@ -341,12 +341,12 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
-
+
<programlisting language="Java" role="Java">public void addCronJob(ComponentPlugin plugin) throws Exception;</programlisting>
- <para>
- The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.CronJob</emphasis>. This type of job is used to perform actions at specified time with Unix 'cron-like' definitions. The plugin uses "expression" field for specifying the 'cron-like' definitions to execute the job. This is considered as the most powerful and flexible job to define when it will execute. For example, at 12pm every day => "0 0 12 * * ?"; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday => "0 15 10 ? * MON-FRI". To see more about Cron expression, please refer to this article: <ulink url="http://en.wikipedia.org/wiki/CRON_expression">CRON expression</ulink>. See the configuration sample below to understand more clearly:
- </para>
-
+ <para>
+ The component plugin for this method must be the type of <emphasis role="italic">org.exoplatform.services.scheduler.CronJob</emphasis>. This type of job is used to perform actions at specified time with Unix 'cron-like' definitions. The plugin uses "expression" field for specifying the 'cron-like' definitions to execute the job. This is considered as the most powerful and flexible job to define when it will execute. For example, at 12pm every day => "0 0 12 * * ?"; or at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday => "0 15 10 ? * MON-FRI". To see more about Cron expression, please refer to this article: <ulink url="http://en.wikipedia.org/wiki/CRON_expression">CRON expression</ulink>. See the configuration sample below to understand more clearly:
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<target-component>org.exoplatform.services.scheduler.JobSchedulerService</target-component>
<component-plugin>
@@ -367,29 +367,29 @@
</init-params>
</component-plugin>
</external-component-plugins></programlisting>
-
+
<programlisting language="Java" role="Java">public void addGlobalJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
-
+
<programlisting language="Java" role="Java">public void addJobListener(ComponentPlugin plugin) throws Exception;</programlisting>
- <para>
- The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.JobListener.</emphasis> This job listener is used so that it will be informed when a <emphasis role="italic">org.quartz.JobDetail</emphasis> executes.
- </para>
-
+ <para>
+ The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.JobListener.</emphasis> This job listener is used so that it will be informed when a <emphasis role="italic">org.quartz.JobDetail</emphasis> executes.
+ </para>
+
<programlisting language="Java" role="Java">public void addGlobalTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
-
+
<programlisting language="Java" role="Java">public void addTriggerListener(ComponentPlugin plugin) throws Exception;</programlisting>
- <para>
- The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.TriggerListener</emphasis>. This trigger listener is used so that it will be informed when a <emphasis role="italic">org.quartz.Trigger</emphasis> fires.
- </para>
+ <para>
+ The component plugin for two methods above must be the type of <emphasis role="italic">org.quartz.TriggerListener</emphasis>. This trigger listener is used so that it will be informed when a <emphasis role="italic">org.quartz.Trigger</emphasis> fires.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Samples-Run_the_project">
- <title>Run the project</title>
- <para>
- Create <emphasis role="italic">conf.portal</emphasis> package in your sample project. Add the configuration.xml file with the content as follows:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Samples-Run_the_project">
+ <title>Run the project</title>
+ <para>
+ Create <emphasis role="italic">conf.portal</emphasis> package in your sample project. Add the configuration.xml file with the content as follows:
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -430,55 +430,55 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <para>
- <emphasis role="italic">mvn clean install </emphasis>the project. Copy .jar file to<emphasis role="italic"> lib</emphasis> in tomcat bundled with GateIn-3.1.0-GA. Run <emphasis role="italic">bin/gatein.sh</emphasis> to see the <emphasis role="italic">DumbJob</emphasis> to be executed on the terminal when portal containers are initialized. Please look at the terminal to see the log message of <emphasis role="italic">DumbJob</emphasis>.
- </para>
- <para>
- From now on, you can easily create any job to be executed in GateIn's portal by defining your job and configuring it.
- </para>
+ <para>
+ <emphasis role="italic">mvn clean install </emphasis>the project. Copy .jar file to<emphasis role="italic"> lib</emphasis> in tomcat bundled with GateIn-3.1.0-GA. Run <emphasis role="italic">bin/gatein.sh</emphasis> to see the <emphasis role="italic">DumbJob</emphasis> to be executed on the terminal when portal containers are initialized. Please look at the terminal to see the log message of <emphasis role="italic">DumbJob</emphasis>.
+ </para>
+ <para>
+ From now on, you can easily create any job to be executed in GateIn's portal by defining your job and configuring it.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Job_Schedule-Reference">
- <title>Reference</title>
- <para>
- To further understand about Job Scheduler, you can refer the following links:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <ulink url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Job_Schedule-Reference">
+ <title>Reference</title>
+ <para>
+ To further understand about Job Scheduler, you can refer the following links:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.quartz-scheduler.org/">http://www.quartz-scheduler.org/</ulink>
+ </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://en.wikipedia.org/wiki/Job_scheduler">http://en.wikipedia.org/wiki/Job_scheduler</ulink>
+ </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...">http://www.theserverside.com/news/1364726/Job-Scheduling-in-J2EE-Applicat...</ulink>
+ </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc720070%28WS.10%29.aspx</ulink>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/listener-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/listener-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/listener-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,28 +4,28 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-ListenerService">
- <title>ListenerService</title>
- <section id="sect-Reference_Guide-ListenerService-Asynchronous_Event_Broadcast">
- <title>Asynchronous Event Broadcast</title>
- <para>
- Basicaly, ListenerService used to store Listeners and broadcast events to them.
- </para>
- <para>
- ListenerService event broadcasting works in next way - it takes a destination listeners and executes event on those listeners.
- </para>
- <para>
- But, some events may take a lot of time, so idea to make event processing asynchronous is usefull.
- </para>
- <blockquote>
- <para>
- What do I need to make my listener asynchronous?
- </para>
+ <title>ListenerService</title>
+ <section id="sect-Reference_Guide-ListenerService-Asynchronous_Event_Broadcast">
+ <title>Asynchronous Event Broadcast</title>
+ <para>
+ Basicaly, ListenerService used to store Listeners and broadcast events to them.
+ </para>
+ <para>
+ ListenerService event broadcasting works in next way - it takes a destination listeners and executes event on those listeners.
+ </para>
+ <para>
+ But, some events may take a lot of time, so idea to make event processing asynchronous is useful.
+ </para>
+ <blockquote>
+ <para>
+ What do I need to make my listener asynchronous?
+ </para>
- </blockquote>
- <para>
- - It's very simple, just mark your Listener implementation as <classname>@Asynchronous</classname>.
- </para>
-
+ </blockquote>
+ <para>
+ - It's very simple, just mark your Listener implementation as <classname>@Asynchronous</classname>.
+ </para>
+
<programlisting language="Java" role="Java">@Asynchronous
class AsynchListenerWithException<S,D> extends Listener<S,D>
{
@@ -35,13 +35,13 @@
// some expensive operation
}
}</programlisting>
- <para>
- Now, our AsynchListener will be executed in separate thread by <classname>ExecutorService</classname>.
- </para>
- <para>
- By default, <classname>ExecutoreService</classname> configured with thread pool size 1, you can change it in configuration:
- </para>
-
+ <para>
+ Now, our AsynchListener will be executed in separate thread by <classname>ExecutorService</classname>.
+ </para>
+ <para>
+ By default, <classname>ExecutoreService</classname> configured with thread pool size 1, you can change it in configuration:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>org.exoplatform.services.listener.ListenerService</key>
<type>org.exoplatform.services.listener.ListenerService</type>
@@ -55,7 +55,7 @@
</component></programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/logging.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/logging.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/logging.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,82 +4,82 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Logs_configuration">
- <title>Logs configuration</title>
- <section id="sect-Reference_Guide-Logs_configuration-Introdution">
- <title>Introdution</title>
- <para>
- In order to accommodate to the different target runtime where it can be deployed, eXo is capable of leveraging several logging systems. eXo lets you choose the underlying logging engine to use and even configure that engine (as a quick alternative to doing it directly in your runtime environment).
- </para>
- <para>
- The currently supported logging engines are :
- <itemizedlist>
- <listitem>
- <para>
- Apache Log4J
- </para>
+ <title>Logs configuration</title>
+ <section id="sect-Reference_Guide-Logs_configuration-Introduction">
+ <title>Introduction</title>
+ <para>
+ In order to accommodate to the different target runtime where it can be deployed, eXo is capable of leveraging several logging systems. eXo lets you choose the underlying logging engine to use and even configure that engine (as a quick alternative to doing it directly in your runtime environment).
+ </para>
+ <para>
+ The currently supported logging engines are :
+ <itemizedlist>
+ <listitem>
+ <para>
+ Apache Log4J
+ </para>
- </listitem>
- <listitem>
- <para>
- JDK's logging
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ JDK's logging
+ </para>
- </listitem>
- <listitem>
- <para>
- Apache Commons logging (which is itself a pluggable logging abstraction)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Apache Commons logging (which is itself a pluggable logging abstraction)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Logs_configuration-Logs_configuration_initializer">
- <title>Logs configuration initializer</title>
- <para>
- eXo lets you choose whatever logging engine you want as this is generally influences by the AS runtime or internal policy.
- </para>
- <para>
- This is done through an eXo component called <classname>LogConfigurationInitializer</classname>.
- </para>
- <para>
- <classname>org.exoplatform.services.log.LogConfigurationInitializer</classname> that reads init parameters and configures logging system according to them. The parameters:
- <itemizedlist>
- <listitem>
- <para>
- <firstterm>configurator</firstterm> - an implementation of the <classname>LogConfigurator</classname> interface with one method configure() that accepts a list of properties (3rd init parameter) to configure the underlying log system using the concrete mechanism. Again, there are three configurators for the most known log systems (commons, log4j, jdk).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Logs_configuration-Logs_configuration_initializer">
+ <title>Logs configuration initializer</title>
+ <para>
+ eXo lets you choose whatever logging engine you want as this is generally influences by the AS runtime or internal policy.
+ </para>
+ <para>
+ This is done through an eXo component called <classname>LogConfigurationInitializer</classname>.
+ </para>
+ <para>
+ <classname>org.exoplatform.services.log.LogConfigurationInitializer</classname> that reads init parameters and configures logging system according to them. The parameters:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <firstterm>configurator</firstterm> - an implementation of the <classname>LogConfigurator</classname> interface with one method configure() that accepts a list of properties (3rd init parameter) to configure the underlying log system using the concrete mechanism. Again, there are three configurators for the most known log systems (commons, log4j, jdk).
+ </para>
- </listitem>
- <listitem>
- <para>
- <firstterm>properties</firstterm> - properties to configure the concrete log system (system properties for commons, log4j.properties or logging.properties for commons, log4j and jdk respectively) Look at the configuration examples below.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <firstterm>properties</firstterm> - properties to configure the concrete log system (system properties for commons, log4j.properties or logging.properties for commons, log4j and jdk respectively) Look at the configuration examples below.
+ </para>
- </listitem>
- <listitem>
- <para>
- <firstterm>logger</firstterm> - an implementation of commons-logging Log interface. It is possible to use commons wrappers but to support buffering required by the log portlet three kinds of loggers were added: <classname>BufferedSimpleLog</classname>, <classname>BufferedLog4JLogger</classname> and <classname>BufferedJdk14Logger</classname> (they contain BufferedLog and extend SimpleLog, Log4JLogger and Jdk14Logger commons-logging wrappers respectively).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <firstterm>logger</firstterm> - an implementation of commons-logging Log interface. It is possible to use commons wrappers but to support buffering required by the log portlet three kinds of loggers were added: <classname>BufferedSimpleLog</classname>, <classname>BufferedLog4JLogger</classname> and <classname>BufferedJdk14Logger</classname> (they contain BufferedLog and extend SimpleLog, Log4JLogger and Jdk14Logger commons-logging wrappers respectively).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Logs_configuration-Configuration_examples">
- <title>Configuration examples</title>
- <section id="sect-Reference_Guide-Configuration_examples-Log4J">
- <title>Log4J</title>
- <para>
- <ulink url="http://logging.apache.org/log4j/">Log4J</ulink> is a very popular and flexible logging system. It is a good option for JBoss.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Logs_configuration-Configuration_examples">
+ <title>Configuration examples</title>
+ <section id="sect-Reference_Guide-Configuration_examples-Log4J">
+ <title>Log4J</title>
+ <para>
+ <ulink url="http://logging.apache.org/log4j/">Log4J</ulink> is a very popular and flexible logging system. It is a good option for JBoss.
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
@@ -105,81 +105,81 @@
</properties-param >
</init-params>
</component></programlisting>
- <section id="sect-Reference_Guide-Log4J-Assigning_logger_level_for_classes_or_components">
- <title>Assigning logger level for classes or components</title>
- <para>
- You can set logger level for class or group of classes by setting next property:
- </para>
-
+ <section id="sect-Reference_Guide-Log4J-Assigning_logger_level_for_classes_or_components">
+ <title>Assigning logger level for classes or components</title>
+ <para>
+ You can set logger level for class or group of classes by setting next property:
+ </para>
+
<programlisting language="XML" role="XML"><property name="log4j.category.{component or class name}" value="DEBUG"/></programlisting>
- <para>
- For example:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- We want to log all debug messages for class <classname>org.exoplatform.services.jcr.impl.core.SessionDataManager</classname>, that lies in <package>exo.jcr.component.core</package> component
- </para>
+ <para>
+ For example:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ We want to log all debug messages for class <classname>org.exoplatform.services.jcr.impl.core.SessionDataManager</classname>, that lies in <package>exo.jcr.component.core</package> component
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"><property name="log4j.category.exo.jcr.component.core.SessionDataManager" value="DEBUG"/></programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Or we want to log all debug messages for all classes in <package>exo.jcr.component.core</package> component
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Or we want to log all debug messages for all classes in <package>exo.jcr.component.core</package> component
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"><property name="log4j.category.exo.jcr.component.core" value="DEBUG"/></programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Or we want to log all messages for all kernel components
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Or we want to log all messages for all kernel components
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"><property name="log4j.category.exo.kernel" value="DEBUG"/></programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Configuration_examples-JDK_Logging">
- <title>JDK Logging</title>
- <para>
- JDK logging (aka JUL) is the builtin logging framework introduced in JDK 1.4. It is a good option for Tomcat AS.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Edit the variable <varname>LOG_OPTS</varname> in your <filename>eXo.sh</filename> or <filename>eXo.bat</filename> :
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_examples-JDK_Logging">
+ <title>JDK Logging</title>
+ <para>
+ JDK logging (aka JUL) is the built in logging framework introduced in JDK 1.4. It is a good option for Tomcat AS.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Edit the variable <varname>LOG_OPTS</varname> in your <filename>eXo.sh</filename> or <filename>eXo.bat</filename> :
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting>LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger"</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- Edit your <filename>logs-configuration.xml:</filename>
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Edit your <filename>logs-configuration.xml:</filename>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"><component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
@@ -201,14 +201,14 @@
</init-params>
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_examples-Commons_Logging_SimpleLogss">
- <title>Commons Logging SimpleLogss</title>
- <para>
- SimpleLog is a minimal logging system distributed with Commons Logging. To be used when nothing else is available or when you seek simplicity.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_examples-Commons_Logging_SimpleLogss">
+ <title>Commons Logging SimpleLogss</title>
+ <para>
+ SimpleLog is a minimal logging system distributed with Commons Logging. To be used when nothing else is available or when you seek simplicity.
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<type>org.exoplatform.services.log.LogConfigurationInitializer</type>
<init-params>
@@ -229,58 +229,58 @@
</init-params>
</component></programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Logs_configuration-Tips_and_Troubleshooting">
- <title>Tips and Troubleshooting</title>
- <section id="sect-Reference_Guide-Tips_and_Troubleshooting-JBoss_tips">
- <title>JBoss tips</title>
- <para>
- If you use log4j configuration, you can change the log configuration directly at runtime in: <filename>JBOSS_HOME/server/default/conf/jboss-log4j.xml</filename>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- To enable debug logs:
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Logs_configuration-Tips_and_Troubleshooting">
+ <title>Tips and Troubleshooting</title>
+ <section id="sect-Reference_Guide-Tips_and_Troubleshooting-JBoss_tips">
+ <title>JBoss tips</title>
+ <para>
+ If you use log4j configuration, you can change the log configuration directly at runtime in: <filename>JBOSS_HOME/server/default/conf/jboss-log4j.xml</filename>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ To enable debug logs:
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"> <param name="Threshold" value="DEBUG"/></programlisting>
- <itemizedlist>
- <listitem>
- <para>
- To exclude messages from unnecessary classes (server's internal) modify the threshold of these classes to "FATAL".
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ To exclude messages from unnecessary classes (server's internal) modify the threshold of these classes to "FATAL".
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <note>
- <title>Note</title>
- <para>
- If you see only ERROR level logs while starting ear on jboss (4.2.2), you have to remove log4j*.jar from your ear and application.xml.
- </para>
+ </itemizedlist>
+ <note>
+ <title>Note</title>
+ <para>
+ If you see only ERROR level logs while starting ear on jboss (4.2.2), you have to remove log4j*.jar from your ear and application.xml.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Tips_and_Troubleshooting-Other_tips">
- <title>Other tips</title>
- <para>
- If you see only ERROR level logs while starting ear on jboss (4.2.2), you have to remove log4j*.jar from your ear and application.xml.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Tips_and_Troubleshooting-Other_tips">
+ <title>Other tips</title>
+ <para>
+ If you see only ERROR level logs while starting ear on jboss (4.2.2), you have to remove log4j*.jar from your ear and application.xml.
+ </para>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/manageability.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/manageability.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/manageability.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,126 +4,126 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Manageability">
- <title>Manageability</title>
- <section id="sect-Reference_Guide-Manageability-Introduction">
- <title>Introduction</title>
- <para>
- The kernel has a framework for exposing a management view of the various sub systems of the platform. The management view is a lose term for defining how we can access relevant information about the system and how we can apply management operations. JMX is the de facto standard for exposing a management view in the Java Platform but we take in consideration other kind of views such as REST web services. Therefore, the framework is not tied to JMX, yet it provides a JMX part to define more precisely details related to the JMX management view. The legacy framework is still in use but is deprecated in favor of the new framework as it is less tested and less efficient. It will be removed by sanitization in the future.
- </para>
+ <title>Manageability</title>
+ <section id="sect-Reference_Guide-Manageability-Introduction">
+ <title>Introduction</title>
+ <para>
+ The kernel has a framework for exposing a management view of the various sub systems of the platform. The management view is a lose term for defining how we can access relevant information about the system and how we can apply management operations. JMX is the de facto standard for exposing a management view in the Java Platform but we take in consideration other kind of views such as REST web services. Therefore, the framework is not tied to JMX, yet it provides a JMX part to define more precisely details related to the JMX management view. The legacy framework is still in use but is deprecated in favor of the new framework as it is less tested and less efficient. It will be removed by sanitization in the future.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Manageability-Managed_framework_API">
- <title>Managed framework API</title>
- <para>
- The managed frameworks defines an API for exposing a management view of objects. The API is targeted for internal use and is not a public API. The framework leverages Java 5 annotations to describe the management view from an object.
- </para>
- <section id="sect-Reference_Guide-Managed_framework_API-Annotations">
- <title>Annotations</title>
- <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.Managed_annotation">
- <title>@org.exoplatform.management.annotations.Managed annotation</title>
- <para>
- The @Managed annotates elements that wants to expose a management view to a management layer.
- </para>
- <para>
- <emphasis role="bold">@Managed for objects</emphasis>
- </para>
- <para>
- The framework will export a management view for the objects annotated.
- </para>
- <para>
- <emphasis role="bold">@Managed for getter/setter</emphasis>
- </para>
- <para>
- Defines a managed property. An annotated getter defines a read property, an annotated setter defines a write property and if matching getter/setter are annotated it defines a read/write property.
- </para>
- <para>
- <emphasis role="bold">@Managed on method</emphasis>
- </para>
- <para>
- Defines a managed operation.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Manageability-Managed_framework_API">
+ <title>Managed framework API</title>
+ <para>
+ The managed frameworks defines an API for exposing a management view of objects. The API is targeted for internal use and is not a public API. The framework leverages Java 5 annotations to describe the management view from an object.
+ </para>
+ <section id="sect-Reference_Guide-Managed_framework_API-Annotations">
+ <title>Annotations</title>
+ <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.Managed_annotation">
+ <title>@org.exoplatform.management.annotations.Managed annotation</title>
+ <para>
+ The @Managed annotates elements that wants to expose a management view to a management layer.
+ </para>
+ <para>
+ <emphasis role="bold">@Managed for objects</emphasis>
+ </para>
+ <para>
+ The framework will export a management view for the objects annotated.
+ </para>
+ <para>
+ <emphasis role="bold">@Managed for getter/setter</emphasis>
+ </para>
+ <para>
+ Defines a managed property. An annotated getter defines a read property, an annotated setter defines a write property and if matching getter/setter are annotated it defines a read/write property.
+ </para>
+ <para>
+ <emphasis role="bold">@Managed on method</emphasis>
+ </para>
+ <para>
+ Defines a managed operation.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedDescription">
- <title>@org.exoplatform.management.annotations.ManagedDescription</title>
- <para>
- The @ManagedDescription annotation provides a description of a managed element. It is valid to annotated object or methods. It takes as sole argument a string that is the description value.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedDescription">
+ <title>@org.exoplatform.management.annotations.ManagedDescription</title>
+ <para>
+ The @ManagedDescription annotation provides a description of a managed element. It is valid to annotated object or methods. It takes as sole argument a string that is the description value.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedName">
- <title>@org.exoplatform.management.annotations.ManagedName</title>
- <para>
- The @ManagedName annotation provides an alternative name for managed properties. It is used to accomodate legacy methods of an object that can be renamed for compatibility reasons. It takes as sole argument a string that is the name value.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedName">
+ <title>@org.exoplatform.management.annotations.ManagedName</title>
+ <para>
+ The @ManagedName annotation provides an alternative name for managed properties. It is used to accomodate legacy methods of an object that can be renamed for compatibility reasons. It takes as sole argument a string that is the name value.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedBy">
- <title>@org.exoplatform.management.annotations.ManagedBy</title>
- <para>
- The @ManagedBy annotation defines a delegate class for exposing a management view. The sole argument of the annotation are class litterals. The delegate class must provide a constructor with the managed object as argument.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Annotations-org.exoplatform.management.annotations.ManagedBy">
+ <title>@org.exoplatform.management.annotations.ManagedBy</title>
+ <para>
+ The @ManagedBy annotation defines a delegate class for exposing a management view. The sole argument of the annotation are class literals. The delegate class must provide a constructor with the managed object as argument.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Manageability-JMX_Management_View">
- <title>JMX Management View</title>
- <section id="sect-Reference_Guide-JMX_Management_View-JMX_Annotations">
- <title>JMX Annotations</title>
- <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.Property_annotation">
- <title>@org.exoplatform.management.jmx.annotations.Property annotation</title>
- <para>
- The @Property annotation is used to within other annotations such as @NameTemplate or @NamingContext. It should be seen as a structural way for a list of properties. A property is made of a key and a value. The value can either be a string litteral or it can be surrounded by curly brace to be a dynamic property. A dynamic property is resolved against the instance of the object at runtime.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Manageability-JMX_Management_View">
+ <title>JMX Management View</title>
+ <section id="sect-Reference_Guide-JMX_Management_View-JMX_Annotations">
+ <title>JMX Annotations</title>
+ <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.Property_annotation">
+ <title>@org.exoplatform.management.jmx.annotations.Property annotation</title>
+ <para>
+ The @Property annotation is used to within other annotations such as @NameTemplate or @NamingContext. It should be seen as a structural way for a list of properties. A property is made of a key and a value. The value can either be a string literal or it can be surrounded by curly brace to be a dynamic property. A dynamic property is resolved against the instance of the object at runtime.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.NameTemplate_annotation">
- <title>@org.exoplatform.management.jmx.annotations.NameTemplate annotation</title>
- <para>
- The @NameTemplate defines a template that is used at registration time of a managed object to create the JMX object name. The template is formed of properties.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.NameTemplate_annotation">
+ <title>@org.exoplatform.management.jmx.annotations.NameTemplate annotation</title>
+ <para>
+ The @NameTemplate defines a template that is used at registration time of a managed object to create the JMX object name. The template is formed of properties.
+ </para>
+
<programlisting language="Java" role="Java">@NameTemplate({
@Property(key="container", value="workspace"),
@Property(key="name", value="{Name}")})</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.NamingContext_annotation">
- <title>@org.exoplatform.management.jmx.annotations.NamingContext annotation</title>
- <para>
- The @NamingContext annotations defines a set of properties which are used within a management context. It allows to propagate properties down to managed objects which are defined by an object implementing the ManagementAware interface. The goal is to scope different instances of the same class that would have the same object name otherwise.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JMX_Annotations-org.exoplatform.management.jmx.annotations.NamingContext_annotation">
+ <title>@org.exoplatform.management.jmx.annotations.NamingContext annotation</title>
+ <para>
+ The @NamingContext annotations defines a set of properties which are used within a management context. It allows to propagate properties down to managed objects which are defined by an object implementing the ManagementAware interface. The goal is to scope different instances of the same class that would have the same object name otherwise.
+ </para>
+
<programlisting language="Java" role="Java">@NamingContext(@Property(key="workspace", value="{Name}"))</programlisting>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Manageability-Example">
- <title>Example</title>
- <section id="sect-Reference_Guide-Example-CacheService_example">
- <title>CacheService example</title>
- <para>
- The cache service delegates most of the work to the CacheServiceManaged class by using the @ManagedBy annotation. At runtime when a new cache is created, it calls the CacheServiceManaged class in order to let the CacheServiceManaged object register the cache.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Manageability-Example">
+ <title>Example</title>
+ <section id="sect-Reference_Guide-Example-CacheService_example">
+ <title>CacheService example</title>
+ <para>
+ The cache service delegates most of the work to the CacheServiceManaged class by using the @ManagedBy annotation. At runtime when a new cache is created, it calls the CacheServiceManaged class in order to let the CacheServiceManaged object register the cache.
+ </para>
+
<programlisting language="Java" role="Java">@ManagedBy(CacheServiceManaged.class)
public class CacheServiceImpl implements CacheService {
@@ -137,10 +137,10 @@
...
}
}</programlisting>
- <para>
- The ExoCache interface is annotated to define its management view. The @NameTemplate is used to produce object name values when ExoCache instance are registered.
- </para>
-
+ <para>
+ The ExoCache interface is annotated to define its management view. The @NameTemplate is used to produce object name values when ExoCache instance are registered.
+ </para>
+
<programlisting language="Java" role="Java">@Managed
@NameTemplate({@Property(key="service", value="cache"), @Property(key="name", value="{Name}")})
@ManagedDescription("Exo Cache")
@@ -162,10 +162,10 @@
...
}</programlisting>
- <para>
- The CacheServiceManaged is the glue code between the CacheService and the management view. The main reason is that only exo services are registered automatically against the management view. Any other managed bean must be registered manually for now. Therefore, it needs to know about the management layer via the management context. The management context allows an object implementing the ManagementAware interface to receive a context to perform further registration of managed objects.
- </para>
-
+ <para>
+ The CacheServiceManaged is the glue code between the CacheService and the management view. The main reason is that only exo services are registered automatically against the management view. Any other managed bean must be registered manually for now. Therefore, it needs to know about the management layer via the management context. The management context allows an object implementing the ManagementAware interface to receive a context to perform further registration of managed objects.
+ </para>
+
<programlisting language="Java" role="Java">@Managed
public class CacheServiceManaged implements ManagementAware {
@@ -193,10 +193,10 @@
}
}</programlisting>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -8,7 +8,7 @@
<section id="sect-Reference_Guide-RPC_Service-Description">
<title>Description</title>
<para>
- The <emphasis>RPCService</emphasis> is only needed in a cluser environment, it is used to communicate with the other cluster nodes. It allows to execute a command on all the cluster nodes or on the coordinator i.e. the oldest node in the cluster. The <emphasis>RPCService</emphasis> has been designed to rely on JGroups capabilites and should not be used for heavy load. It can be used for example to notify other nodes that something happened or to collect some information from the other nodes.
+ The <emphasis>RPCService</emphasis> is only needed in a cluster environment, it is used to communicate with the other cluster nodes. It allows to execute a command on all the cluster nodes or on the coordinator i.e. the oldest node in the cluster. The <emphasis>RPCService</emphasis> has been designed to rely on JGroups capabilities and should not be used for heavy load. It can be used for example to notify other nodes that something happened or to collect some information from the other nodes.
</para>
<para>
The <emphasis>RPCService</emphasis> relies on 3 main interfaces which are:
@@ -16,7 +16,7 @@
<itemizedlist>
<listitem>
<para>
- The <emphasis>org.exoplatform.services.rpc.RPCService</emphasis> that defines the service itslef
+ The <emphasis>org.exoplatform.services.rpc.RPCService</emphasis> that defines the service itself
</para>
</listitem>
@@ -175,7 +175,7 @@
<emphasis>allow-failover</emphasis>
</entry>
<entry>
- This is parameter indicates whether a command on the coordinator needs to be relaunched or not if the coordintator seems to have left the cluster. This parameter only affects the behavior of the methods <emphasis>executeCommandOnCoordinator</emphasis>. This parameter is optional and its default value is true.
+ This is parameter indicates whether a command on the coordinator needs to be relaunched or not if the coordinator seems to have left the cluster. This parameter only affects the behavior of the methods <emphasis>executeCommandOnCoordinator</emphasis>. This parameter is optional and its default value is true.
</entry>
</row>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -508,10 +508,6 @@
<para>
Do you feel an expert now? Not yet. Get a deeper look and read this <xref linkend="sect-Reference_Guide-Services_Wiring" /> article. You read so much about configuration, that you should wonder what the <xref linkend="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace" /> looks like.
</para>
- <para>
- If you wish to see a examples of service configurations you should study the <xref linkend="sect-Reference_Guide-eXo_Core" /> Where you find descriptions of some eXo's core services. Finally you might wish to read more about <ulink url="http://www.picocontainer.org/">PicoContainer</ulink>.
- </para>
-
</section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -406,7 +406,7 @@
<section id="sect-Reference_Guide-Parameters-Collection">
<title>Collection</title>
<para>
- You also can use java collections to configure your service. In order to see an example, let's open the database-organization-configuration.xml file. This file defines a default user organization (users, groups, memberships/roles) of your portal. They use component-plugins which are explained later. You wil see that object-param is used again.
+ You also can use java collections to configure your service. In order to see an example, let's open the database-organization-configuration.xml file. This file defines a default user organization (users, groups, memberships/roles) of your portal. They use component-plugins which are explained later. You will see that object-param is used again.
</para>
<para>
There are two collections: The first collection is an <emphasis role="bold">ArrayList</emphasis>. This ArrayList contains only one value, but there could be more. The only value is an object which defines the field of the NewUserConfig$JoinGroup bean.
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -9,7 +9,7 @@
<xi:include href="eXoJCR/kernel.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<!--<xi:include href="eXoJCR/core.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
<!--<xi:include href="eXoJCR/ws.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
+ <xi:include href="eXoJCR/jcr-with-gatein.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="eXoJCR/faq.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/jcr-with-gatein.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/LDAP.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/LDAP.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/LDAP.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,358 +4,358 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-LDAP_Integration">
- <title>LDAP Integration</title>
- <note>
- <title>Notational Device</title>
- <para>
- For ease of readability the following section uses the notational device <replaceable>ID_HOME</replaceable> to represent the file path <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/</filename>, as this directory is the root of all JBoss Enterprise Portal Platform's identity-related configuration.
- </para>
+ <title>LDAP Integration</title>
+ <note>
+ <title>Notational Device</title>
+ <para>
+ For ease of readability the following section uses the notational device <replaceable>ID_HOME</replaceable> to represent the file path <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/</filename>, as this directory is the root of all JBoss Enterprise Portal Platform's identity-related configuration.
+ </para>
- </note>
- <para>
- <emphasis role="bold">LDAP</emphasis> (Lightweight Directory Access Protocol) is a set of open protocols used to access centrally stored information over a network. It is based on the X.500 standard for directory sharing, but is less complex and resource-intensive.
- </para>
- <para>
- Using a client/server architecture, LDAP provides a reliable means to create a central information directory accessible from the network. When a client attempts to modify information within this directory, the server verifies the user has permission to make the change, and then adds or updates the entry as requested. To ensure the communication is secure, the Secure Sockets Layer (<emphasis>SSL</emphasis>) or Transport Layer Security (<emphasis>TLS</emphasis>) cryptographic protocols can be used to prevent an attacker from intercepting the transmission.
- </para>
- <!-- Source Metadata
+ </note>
+ <para>
+ <emphasis role="bold">LDAP</emphasis> (Lightweight Directory Access Protocol) is a set of open protocols used to access centrally stored information over a network. It is based on the X.500 standard for directory sharing, but is less complex and resource-intensive.
+ </para>
+ <para>
+ Using a client/server architecture, LDAP provides a reliable means to create a central information directory accessible from the network. When a client attempts to modify information within this directory, the server verifies the user has permission to make the change, and then adds or updates the entry as requested. To ensure the communication is secure, the Secure Sockets Layer (<emphasis>SSL</emphasis>) or Transport Layer Security (<emphasis>TLS</emphasis>) cryptographic protocols can be used to prevent an attacker from intercepting the transmission.
+ </para>
+ <!-- Source Metadata
URL: http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_L...
Author [email]: Red Hat ECS Platform Team
License: Copyright © 2010, 2011 Red Hat, Inc.
--> <para>
- LDAP provides the protocols required to manage the data stored in a Directory Server. A Directory Server contains information about resources available (user accounts and printers for example) and their location on the network.
- </para>
- <para>
- The following table is a list of Directory Servers that are supported and certified in JBoss Enterprise Portal Platform.
- </para>
- <table id="tabl-Reference_Guide-LDAP_Integration-Supported_and_Certified_directory_servers">
- <title>Supported and Certified directory servers</title>
- <tgroup cols="2">
- <colspec colname="LDAP" colnum="1" colwidth="1*"></colspec>
- <thead>
- <row>
- <entry>
- <emphasis>Directory Server</emphasis>
- </entry>
- <entry>
- <emphasis>Version</emphasis>
- </entry>
+ LDAP provides the protocols required to manage the data stored in a Directory Server. A Directory Server contains information about resources available (user accounts and printers for example) and their location on the network.
+ </para>
+ <para>
+ The following table is a list of Directory Servers that are supported and certified in JBoss Enterprise Portal Platform.
+ </para>
+ <table id="tabl-Reference_Guide-LDAP_Integration-Supported_and_Certified_directory_servers">
+ <title>Supported and Certified directory servers</title>
+ <tgroup cols="2">
+ <colspec colname="LDAP" colnum="1" colwidth="1*"></colspec>
+ <thead>
+ <row>
+ <entry>
+ <emphasis>Directory Server</emphasis>
+ </entry>
+ <entry>
+ <emphasis>Version</emphasis>
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- OpenDS
- </entry>
- <entry>
- 1.2
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ OpenDS
+ </entry>
+ <entry>
+ 1.2
+ </entry>
- </row>
- <row>
- <entry>
- OpenDS
- </entry>
- <entry>
- 2.0
- </entry>
+ </row>
+ <row>
+ <entry>
+ OpenDS
+ </entry>
+ <entry>
+ 2.0
+ </entry>
- </row>
- <row>
- <entry>
- OpenLDAP
- </entry>
- <entry>
- 2.4
- </entry>
+ </row>
+ <row>
+ <entry>
+ OpenLDAP
+ </entry>
+ <entry>
+ 2.4
+ </entry>
- </row>
- <row>
- <entry>
- Red Hat Directory Server (RHDS)
- </entry>
- <entry>
- 7.1
- </entry>
+ </row>
+ <row>
+ <entry>
+ Red Hat Directory Server (RHDS)
+ </entry>
+ <entry>
+ 7.1
+ </entry>
- </row>
- <row>
- <entry>
- Microsoft Active Directory (MSAD)
- </entry>
- <entry>
- Windows Server 2008
- </entry>
+ </row>
+ <row>
+ <entry>
+ Microsoft Active Directory (MSAD)
+ </entry>
+ <entry>
+ Windows Server 2008
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <!-- Source Metadata
+ </table>
+ <!-- Source Metadata
URL: http://www.jboss.com/products/platforms/portals/testedconfigurations/
Author [w/email]: Red Hat Inc
License:
--> <note>
- <title>Examples</title>
- <para>
- JBoss Enterprise Portal Platform includes several example LDAP configuration <filename>.xml</filename> files and <filename>.ldif</filename> (LDAP Data Interchange Format) data files.
- </para>
- <para>
- These examples are in the <filename><replaceable>ID_HOME</replaceable>/picketlink-idm/examples</filename> directory and can be deployed in a testing environment to assist in configuring LDAP.
- </para>
+ <title>Examples</title>
+ <para>
+ JBoss Enterprise Portal Platform includes several example LDAP configuration <filename>.xml</filename> files and <filename>.ldif</filename> (LDAP Data Interchange Format) data files.
+ </para>
+ <para>
+ These examples are in the <filename><replaceable>ID_HOME</replaceable>/picketlink-idm/examples</filename> directory and can be deployed in a testing environment to assist in configuring LDAP.
+ </para>
- </note>
- <procedure id="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up">
- <title>LDAP Set Up</title>
- <step>
- <substeps>
- <step>
- <para>
- Install your <application>LDAP</application> server by following the installation instructions provided for the product you are using.
- </para>
- <para>
- If you are installing the <application>Red Hat Directory Server</application> (RHDS), you should refer to the Installation Guide at <ulink type="http" url="http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/index.html" />.
- </para>
- <para>
- If you are using a third party directory server (<application>OpenDS</application>, <application>OpenLDAP</application> or <application>Miscrosoft Active Directory</application> (MSAD)), refer the appropriate documentation for that product.
- </para>
- <para>
- The following values provide an example of working configuration settings for the different Directory Servers:
- </para>
- <table>
- <title></title>
- <tgroup cols="8">
- <colspec colname="1"></colspec>
- <colspec colname="2"></colspec>
- <colspec colname="3"></colspec>
- <colspec colname="4"></colspec>
- <colspec colname="5"></colspec>
- <colspec colname="6"></colspec>
- <colspec colname="7"></colspec>
- <colspec colname="8"></colspec>
- <spanspec nameend="8" namest="2" spanname="vspan"></spanspec> <thead>
- <row>
- <entry>
- Directory Server
- </entry>
- <entry spanname="vspan">
- Value
- </entry>
+ </note>
+ <procedure id="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up">
+ <title>LDAP Set Up</title>
+ <step>
+ <substeps>
+ <step>
+ <para>
+ Install your <application>LDAP</application> server by following the installation instructions provided for the product you are using.
+ </para>
+ <para>
+ If you are installing the <application>Red Hat Directory Server</application> (RHDS), you should refer to the Installation Guide at <ulink type="http" url="http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/index.html" />.
+ </para>
+ <para>
+ If you are using a third party directory server (<application>OpenDS</application>, <application>OpenLDAP</application> or <application>Miscrosoft Active Directory</application> (MSAD)), refer the appropriate documentation for that product.
+ </para>
+ <para>
+ The following values provide an example of working configuration settings for the different Directory Servers:
+ </para>
+ <table>
+ <title></title>
+ <tgroup cols="8">
+ <colspec colname="1"></colspec>
+ <colspec colname="2"></colspec>
+ <colspec colname="3"></colspec>
+ <colspec colname="4"></colspec>
+ <colspec colname="5"></colspec>
+ <colspec colname="6"></colspec>
+ <colspec colname="7"></colspec>
+ <colspec colname="8"></colspec>
+ <spanspec nameend="8" namest="2" spanname="vspan"></spanspec> <thead>
+ <row>
+ <entry>
+ Directory Server
+ </entry>
+ <entry spanname="vspan">
+ Value
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
- </entry>
- <entry>
- <emphasis role="bold">root user Distinguished Name (DN)</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">Password</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">Port</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">Admin Port</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">Base DN</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">Database Population</emphasis>
- </entry>
- <entry>
- <emphasis role="bold">SSO/TLS</emphasis>
- </entry>
+ </entry>
+ <entry>
+ <emphasis role="bold">root user Distinguished Name (DN)</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">Password</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">Port</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">Admin Port</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">Base DN</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">Database Population</emphasis>
+ </entry>
+ <entry>
+ <emphasis role="bold">SSO/TLS</emphasis>
+ </entry>
- </row>
- <row>
- <entry>
- <emphasis role="bold">RHDS and OpenDS</emphasis>
- </entry>
- <entry>
- cn=Directory Manager
- </entry>
- <entry>
- password
- </entry>
- <entry>
- 1389
- </entry>
- <entry>
- 4444
- </entry>
- <entry>
- dc=example,dc=com
- </entry>
- <entry>
- "Only create the base entry"
- </entry>
- <entry>
- no SSO, no TLS
- </entry>
+ </row>
+ <row>
+ <entry>
+ <emphasis role="bold">RHDS and OpenDS</emphasis>
+ </entry>
+ <entry>
+ cn=Directory Manager
+ </entry>
+ <entry>
+ password
+ </entry>
+ <entry>
+ 1389
+ </entry>
+ <entry>
+ 4444
+ </entry>
+ <entry>
+ dc=example,dc=com
+ </entry>
+ <entry>
+ "Only create the base entry"
+ </entry>
+ <entry>
+ no SSO, no TLS
+ </entry>
- </row>
- <row>
- <entry>
- <emphasis role="bold">MSAD</emphasis>
- </entry>
- <entry>
- CN=Users
- </entry>
- <entry>
+ </row>
+ <row>
+ <entry>
+ <emphasis role="bold">MSAD</emphasis>
+ </entry>
+ <entry>
+ CN=Users
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
+ </entry>
- </row>
- <row>
- <entry>
- <emphasis role="bold">OpenLDAP</emphasis>
- </entry>
- <entry>
- cn=Manager,dc=example,dc=com
- </entry>
- <entry>
- secret
- </entry>
- <entry>
- 1389
- </entry>
- <entry>
+ </row>
+ <row>
+ <entry>
+ <emphasis role="bold">OpenLDAP</emphasis>
+ </entry>
+ <entry>
+ cn=Manager,dc=example,dc=com
+ </entry>
+ <entry>
+ secret
+ </entry>
+ <entry>
+ 1389
+ </entry>
+ <entry>
- </entry>
- <entry>
- dc=example,dc=com
- </entry>
- <entry>
+ </entry>
+ <entry>
+ dc=example,dc=com
+ </entry>
+ <entry>
- </entry>
- <entry>
+ </entry>
+ <entry>
- </entry>
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- These, and other appropriate settings, should be adjusted to suit your circumstances.
- </para>
+ </table>
+ <para>
+ These, and other appropriate settings, should be adjusted to suit your circumstances.
+ </para>
- </step>
- <step>
- <para>
- <emphasis role="bold">Optional</emphasis>: Import an <filename>ldif</filename> file and populate the Directory Server.
- </para>
+ </step>
+ <step>
+ <para>
+ <emphasis role="bold">Optional</emphasis>: Import an <filename>ldif</filename> file and populate the Directory Server.
+ </para>
- </step>
- <step>
- <para>
- Start the Directory Server.
- </para>
+ </step>
+ <step>
+ <para>
+ Start the Directory Server.
+ </para>
- </step>
+ </step>
- </substeps>
+ </substeps>
- </step>
+ </step>
- </procedure>
-
- <section id="sect-Reference_Guide-LDAP_Integration-LDAP_in_Read_only_Mode">
- <title>LDAP in Read-only Mode</title>
- <para>
- This section will show you how to add LDAP in read-only mode. This means that user data entries (both pre-existing, and newly added through the JBoss Enterprise Portal Platform User Interface) will be consumed though the Directory Server and LDAP services, but written to the underlying database. The only exception is that passwords updated via the UI will also be propagated into the appropriate LDAP entry.
- </para>
- <procedure id="proc-Reference_Guide-LDAP_in_Read_only_Mode-Set_up_LDAP_read_only_Mode">
- <title>Set up LDAP read-only Mode</title>
- <step>
- <para>
- Open the <filename><replaceable>ID_HOME</replaceable>/idm-configuration.xml</filename> file.
- </para>
- <para>
- JBoss Enterprise Portal Platform uses the PicketLink IDM framework as the underlying identity storage system, hence all the configurations use dedicated Picketlink settings.
- </para>
+ </procedure>
+
+ <section id="sect-Reference_Guide-LDAP_Integration-LDAP_in_Read_only_Mode">
+ <title>LDAP in Read-only Mode</title>
+ <para>
+ This section will show you how to add LDAP in read-only mode. This means that user data entries (both pre-existing, and newly added through the JBoss Enterprise Portal Platform User Interface) will be consumed though the Directory Server and LDAP services, but written to the underlying database. The only exception is that passwords updated via the UI will also be propagated into the appropriate LDAP entry.
+ </para>
+ <procedure id="proc-Reference_Guide-LDAP_in_Read_only_Mode-Set_up_LDAP_read_only_Mode">
+ <title>Set up LDAP read-only Mode</title>
+ <step>
+ <para>
+ Open the <filename><replaceable>ID_HOME</replaceable>/idm-configuration.xml</filename> file.
+ </para>
+ <para>
+ JBoss Enterprise Portal Platform uses the PicketLink IDM framework as the underlying identity storage system, hence all the configurations use dedicated Picketlink settings.
+ </para>
- </step>
- <step>
- <para>
- Comment out the default Picketlink <literal>config</literal> value:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Comment out the default Picketlink <literal>config</literal> value:
+ </para>
+
<programlisting language="XML" role="XML"><value>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Uncomment the appropriate sample configuration values as described below, depending on which Directory Server you are implementing:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Red_Hat_Directory_Server_or_OpenDS" />
- </para>
+ </step>
+ <step>
+ <para>
+ Uncomment the appropriate sample configuration values as described below, depending on which Directory Server you are implementing:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Red_Hat_Directory_Server_or_OpenDS" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Microsoft_Active_Directory" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Microsoft_Active_Directory" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-OpenLDAP" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-OpenLDAP" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Red_Hat_Directory_Server_or_OpenDS">
- <title>Red Hat Directory Server or OpenDS</title>
- <step>
- <para>
- Uncomment the line under "<emphasis>Read Only "ACME" LDAP Example</emphasis>":
- </para>
-
+ </itemizedlist>
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Red_Hat_Directory_Server_or_OpenDS">
+ <title>Red Hat Directory Server or OpenDS</title>
+ <step>
+ <para>
+ Uncomment the line under "<emphasis>Read Only "ACME" LDAP Example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--Read Only "ACME" LDAP Example-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for ACME LDAP example</emphasis>":
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for ACME LDAP example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!-- Uncomment for ACME LDAP example -->
<entry>
<key><string>/acme/roles/*</string></key>
@@ -366,80 +366,80 @@
<value><string>acme_ou_type</string></value>
</entry>
</programlisting>
- <para>
- Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
- </para>
+ <para>
+ Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
+ </para>
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Microsoft_Active_Directory">
- <title>Microsoft Active Directory</title>
- <step>
- <para>
- Uncomment the line under "<emphasis>MSAD Read Only "ACME" LDAP Example</emphasis>":
- </para>
-
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-Microsoft_Active_Directory">
+ <title>Microsoft Active Directory</title>
+ <step>
+ <para>
+ Uncomment the line under "<emphasis>MSAD Read Only "ACME" LDAP Example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--MSAD Read Only "ACME" LDAP Example-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for MSAD ReadOnly LDAP example</emphasis>":
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for MSAD ReadOnly LDAP example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!-- Uncomment for MSAD ReadOnly LDAP example -->
<entry>
<key><string>/acme/roles/*</string></key>
<value><string>msad_roles_type</string></value>
</entry>
</programlisting>
- <para>
- Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
- </para>
+ <para>
+ Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
+ </para>
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-OpenLDAP">
- <title>OpenLDAP</title>
- <step>
- <para>
- If you have not done so already, install your LDAP server. Refer to <xref linkend="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up" /> for some assistance.
- </para>
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_read_only_Mode-OpenLDAP">
+ <title>OpenLDAP</title>
+ <step>
+ <para>
+ If you have not done so already, install your LDAP server. Refer to <xref linkend="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up" /> for some assistance.
+ </para>
- </step>
- <step>
- <para>
- Uncomment the line under "<emphasis>OpenLDAP ReadOnly "ACME" LDAP Example</emphasis>":
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the line under "<emphasis>OpenLDAP ReadOnly "ACME" LDAP Example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--OpenLDAP ReadOnly "ACME" LDAP Example-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-openldap-acme-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for ACME LDAP example</emphasis>":
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for ACME LDAP example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!-- Uncomment for ACME LDAP example -->
<entry>
<key><string>/acme/roles/*</string></key>
@@ -450,228 +450,228 @@
<value><string>acme_ou_type</string></value>
</entry>
</programlisting>
- <para>
- Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
- </para>
+ <para>
+ Refer to <xref linkend="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
+ </para>
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4" />.
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
- <step id="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4">
- <para>
- To use a different LDAP server or directory data, edit the DS-specific <filename>.xml</filename> file you uncommented in <emphasis role="bold">Substep 3a</emphasis> above and change the values to suit your requirements.
- </para>
- <para>
- Refer to the list in <xref linkend="exam-Reference_Guide-Examples-LDAP_configuration" /> for some examples or refer to the product-specific documentation for more information.
- </para>
+ </step>
+ <step id="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_in_Read-only_Mode-Set_up_LDAP_read-only_Mode-Step-4">
+ <para>
+ To use a different LDAP server or directory data, edit the DS-specific <filename>.xml</filename> file you uncommented in <emphasis role="bold">Substep 3a</emphasis> above and change the values to suit your requirements.
+ </para>
+ <para>
+ Refer to the list in <xref linkend="exam-Reference_Guide-Examples-LDAP_configuration" /> for some examples or refer to the product-specific documentation for more information.
+ </para>
- </step>
- <step>
- <para>
- Start the server.
- </para>
+ </step>
+ <step>
+ <para>
+ Start the server.
+ </para>
- </step>
- <step>
- <para>
- Navigate to the portal homepage (<ulink type="http" url="http://localhost:8080/portal" />) and log in as an administrator.
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to the portal homepage (<ulink type="http" url="http://localhost:8080/portal" />) and log in as an administrator.
+ </para>
- </step>
- <step>
- <para>
- Navigate to <menuchoice> <guimenu>Group</guimenu> <guimenuitem>Organization</guimenuitem> <guimenuitem>Users and groups management</guimenuitem> </menuchoice>.
- </para>
- <substeps>
- <step>
- <para>
- Create a new group called <emphasis>acme</emphasis> under the root node.
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to <menuchoice> <guimenu>Group</guimenu> <guimenuitem>Organization</guimenuitem> <guimenuitem>Users and groups management</guimenuitem> </menuchoice>.
+ </para>
+ <substeps>
+ <step>
+ <para>
+ Create a new group called <emphasis>acme</emphasis> under the root node.
+ </para>
- </step>
- <step>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">For RHDS, OpenDS and OpenLDAP</emphasis>:
- </para>
- <para>
- Create two sub-groups called <emphasis>roles</emphasis> and <emphasis>organization_units</emphasis>.
- </para>
+ </step>
+ <step>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">For RHDS, OpenDS and OpenLDAP</emphasis>:
+ </para>
+ <para>
+ Create two sub-groups called <emphasis>roles</emphasis> and <emphasis>organization_units</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">For MSAD:</emphasis>
- </para>
- <para>
- Create a subgroup called <emphasis>roles</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">For MSAD:</emphasis>
+ </para>
+ <para>
+ Create a subgroup called <emphasis>roles</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </step>
+ </step>
- </substeps>
+ </substeps>
- </step>
+ </step>
- </procedure>
-
- <para>
- Users defined in LDAP should be visible in "<emphasis>Users and groups management</emphasis>" and groups from LDAP should be present as children of <emphasis>/acme/roles</emphasis> and <emphasis>/acme/organization_units</emphasis>.
- </para>
- <para>
- More information about configuration can be found in <xref linkend="sect-Reference_Guide-PicketLink_IDM_integration" /> and in the PicketLink project <ulink type="http" url="http://anonsvn.jboss.org/repos/picketlink/idm/downloads/docs/1.0.0.GA/Ref...">Reference Guide</ulink>.
- </para>
+ </procedure>
+
+ <para>
+ Users defined in LDAP should be visible in "<emphasis>Users and groups management</emphasis>" and groups from LDAP should be present as children of <emphasis>/acme/roles</emphasis> and <emphasis>/acme/organization_units</emphasis>.
+ </para>
+ <para>
+ More information about configuration can be found in <xref linkend="sect-Reference_Guide-PicketLink_IDM_integration" /> and in the PicketLink project <ulink type="http" url="http://anonsvn.jboss.org/repos/picketlink/idm/downloads/docs/1.0.0.GA/Ref...">Reference Guide</ulink>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store">
- <title>LDAP as Default Store</title>
- <para>
- Follow the procedure below to set LDAP up as the default identity store for JBoss Enterprise Portal Platform. All default accounts and some of groups that comes with JBoss Enterprise Portal Platform will be created in the LDAP store.
- </para>
- <para>
- The LDAP server will be configured to store part of the JBoss Enterprise Portal Platform group tree. This means that groups under specified part of the tree will be stored in directory server while all others will be stored in database.
- </para>
- <procedure id="proc-Reference_Guide-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store">
- <title>Set up LDAP as Default Indentity Store</title>
- <step>
- <para>
- If you have not done so already, install your LDAP server. Refer to <xref linkend="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up" /> for some assistance.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store">
+ <title>LDAP as Default Store</title>
+ <para>
+ Follow the procedure below to set LDAP up as the default identity store for JBoss Enterprise Portal Platform. All default accounts and some of groups that comes with JBoss Enterprise Portal Platform will be created in the LDAP store.
+ </para>
+ <para>
+ The LDAP server will be configured to store part of the JBoss Enterprise Portal Platform group tree. This means that groups under specified part of the tree will be stored in directory server while all others will be stored in database.
+ </para>
+ <procedure id="proc-Reference_Guide-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Identity_Store">
+ <title>Set up LDAP as Default Identity Store</title>
+ <step>
+ <para>
+ If you have not done so already, install your LDAP server. Refer to <xref linkend="proc-Reference_Guide-LDAP_Integration-LDAP_Set_Up" /> for some assistance.
+ </para>
- </step>
- <step>
- <para>
- Open the <filename><replaceable>ID_HOME</replaceable>/idm-configuration.xml</filename> file.
- </para>
- <para>
- JBoss Enterprise Portal Platform uses the PicketLink IDM framework as the underlying identity storage system, hence all the configurations use dedicated Picketlink settings.
- </para>
+ </step>
+ <step>
+ <para>
+ Open the <filename><replaceable>ID_HOME</replaceable>/idm-configuration.xml</filename> file.
+ </para>
+ <para>
+ JBoss Enterprise Portal Platform uses the PicketLink IDM framework as the underlying identity storage system, hence all the configurations use dedicated Picketlink settings.
+ </para>
- </step>
- <step>
- <para>
- Comment out the default Picketlink <literal>config</literal> value: <parameter>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</parameter>
- </para>
+ </step>
+ <step>
+ <para>
+ Comment out the default Picketlink <literal>config</literal> value: <parameter>war:/conf/organization/picketlink-idm/picketlink-idm-config.xml</parameter>
+ </para>
- </step>
- <step>
- <para>
- Uncomment the appropriate LDAP configuration entry depending on your LDAP server:
- </para>
- <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_RHDS_and_OpenDS">
- <title>For RHDS and OpenDS</title>
- <step>
- <para>
- Expose the entry under "<emphasis>Sample LDAP config</emphasis>":
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the appropriate LDAP configuration entry depending on your LDAP server:
+ </para>
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_RHDS_and_OpenDS">
+ <title>For RHDS and OpenDS</title>
+ <step>
+ <para>
+ Expose the entry under "<emphasis>Sample LDAP config</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--Sample LDAP config-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
+ </para>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_MSAD">
- <title>For MSAD</title>
- <step>
- <para>
- Expose the entry under "<emphasis>MSAD LDAP Example</emphasis>":
- </para>
-
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_MSAD">
+ <title>For MSAD</title>
+ <step>
+ <para>
+ Expose the entry under "<emphasis>MSAD LDAP Example</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--MSAD LDAP Example-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-msad-config.xml</value>
</programlisting>
- <procedure id="proc-Reference_Guide-For_MSAD-To_use_SSL_encryption_with_MSAD">
- <title>To use SSL encryption with MSAD:</title>
- <step>
- <para>
- Open the <filename><replaceable>ID_HOME</replaceable>/picketlink-idm/examples/picketlink-idm-msad-config.xml</filename>.
- </para>
+ <procedure id="proc-Reference_Guide-For_MSAD-To_use_SSL_encryption_with_MSAD">
+ <title>To use SSL encryption with MSAD:</title>
+ <step>
+ <para>
+ Open the <filename><replaceable>ID_HOME</replaceable>/picketlink-idm/examples/picketlink-idm-msad-config.xml</filename>.
+ </para>
- </step>
- <step>
- <para>
- Ensure the following entries are uncommented and that the path to the <filename>truststore</filename> file and password are correct:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Ensure the following entries are uncommented and that the path to the <filename>truststore</filename> file and password are correct:
+ </para>
+
<programlisting><option>
<name>customSystemProperties</name>
<value>javax.net.ssl.trustStore=<replaceable>/path/to/truststore</replaceable></value>
<value>javax.net.ssl.trustStorePassword=<replaceable>password</replaceable></value>
</option>
</programlisting>
- <para>
- You can import a custom certificate by replacing the <replaceable>certificate</replaceable> and <replaceable>truststore</replaceable> details in the following command:
- </para>
-
+ <para>
+ You can import a custom certificate by replacing the <replaceable>certificate</replaceable> and <replaceable>truststore</replaceable> details in the following command:
+ </para>
+
<programlisting><command>keytool -import -file <filename><replaceable>certificate</replaceable></filename> -keystore <filename><replaceable>truststore</replaceable></filename></command></programlisting>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
+ </para>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_OpenLDAP">
- <title>For OpenLDAP</title>
- <step>
- <para>
- Expose the entry under "<emphasis>OpenLDAP LDAP config</emphasis>":
- </para>
-
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-Set_up_LDAP_as_Default_Indentity_Store-For_OpenLDAP">
+ <title>For OpenLDAP</title>
+ <step>
+ <para>
+ Expose the entry under "<emphasis>OpenLDAP LDAP config</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><!--OpenLDAP LDAP config-->
<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-openldap-config.xml</value>
</programlisting>
- </step>
- <step>
- <para>
- Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
- </para>
+ </step>
+ <step>
+ <para>
+ Continue to <xref linkend="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5" />
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
- <step id="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5">
- <para>
- Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for sample LDAP configuration</emphasis>":
- </para>
-
+ </step>
+ <step id="step-Reference_Guide-step-Reference_Guide-LDAP_Integration-LDAP_as_Default_Store-Set_up_LDAP_as_Default_Indentity_Store-Step-5">
+ <para>
+ Uncomment the <parameter>groupTypeMappings</parameter> under "<emphasis>Uncomment for sample LDAP configuration</emphasis>":
+ </para>
+
<programlisting language="XML" role="XML"><entry>
<key><string>/platform/*</string></key>
<value><string>platform_type</string></value>
@@ -681,281 +681,281 @@
<value><string>organization_type</string></value>
</entry>
</programlisting>
- <para>
- Refer to <xref linkend="exam-Reference_Guide-Examples-Default_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
- </para>
+ <para>
+ Refer to <xref linkend="exam-Reference_Guide-Examples-Default_groupTypeMappings" /> for more information about how these <parameter>groupTypeMappings</parameter> operate.
+ </para>
- </step>
- <step>
- <para>
- To use a different LDAP server or directory data, edit the DS-specific <filename>.xml</filename> file you uncommented in <emphasis role="bold">Step 4</emphasis> above and change the values to suit your requirements.
- </para>
- <para>
- Refer to the list in <xref linkend="exam-Reference_Guide-Examples-LDAP_configuration" /> for some examples or refer to the product-specific documentation for more information.
- </para>
+ </step>
+ <step>
+ <para>
+ To use a different LDAP server or directory data, edit the DS-specific <filename>.xml</filename> file you uncommented in <emphasis role="bold">Step 4</emphasis> above and change the values to suit your requirements.
+ </para>
+ <para>
+ Refer to the list in <xref linkend="exam-Reference_Guide-Examples-LDAP_configuration" /> for some examples or refer to the product-specific documentation for more information.
+ </para>
- </step>
- <step>
- <para>
- Start the server.
- </para>
+ </step>
+ <step>
+ <para>
+ Start the server.
+ </para>
- </step>
- <step>
- <para>
- Navigate to the portal homepage (<ulink type="http" url="http://localhost:8080/portal" />) and log in as an administrator.
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to the portal homepage (<ulink type="http" url="http://localhost:8080/portal" />) and log in as an administrator.
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </section>
-
- <section id="sect-Reference_Guide-LDAP_Integration-Examples">
- <title>Examples</title>
- <example id="exam-Reference_Guide-Examples-LDAP_configuration">
- <title>LDAP configuration</title>
- <para>
- The following settings are stored in the Picketlink configuration file that is nominated in the <filename>idm-configuration.xml</filename> file of your deployment (under the <parameter>config</parameter> parameter of the <parameter>PicketLinkIDMService</parameter> component):
- </para>
- <para>
- This file could be:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The default <filename>picketlink-idm-config.xml</filename>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-LDAP_Integration-Examples">
+ <title>Examples</title>
+ <example id="exam-Reference_Guide-Examples-LDAP_configuration">
+ <title>LDAP configuration</title>
+ <para>
+ The following settings are stored in the Picketlink configuration file that is nominated in the <filename>idm-configuration.xml</filename> file of your deployment (under the <parameter>config</parameter> parameter of the <parameter>PicketLinkIDMService</parameter> component):
+ </para>
+ <para>
+ This file could be:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The default <filename>picketlink-idm-config.xml</filename>.
+ </para>
- </listitem>
- <listitem>
- <para>
- One of the three example configuration files discussed in <xref linkend="proc-Reference_Guide-LDAP_in_Read_only_Mode-Set_up_LDAP_read_only_Mode" />:
- </para>
- <simplelist>
- <member><filename>picketlink-idm-ldap-acme-config.xml</filename></member>
- <member><filename>picketlink-idm-msad-readonly-config.xml</filename></member>
- <member><filename>picketlink-idm-openldap-acme-config.xml</filename></member>
+ </listitem>
+ <listitem>
+ <para>
+ One of the three example configuration files discussed in <xref linkend="proc-Reference_Guide-LDAP_in_Read_only_Mode-Set_up_LDAP_read_only_Mode" />:
+ </para>
+ <simplelist>
+ <member><filename>picketlink-idm-ldap-acme-config.xml</filename></member>
+ <member><filename>picketlink-idm-msad-readonly-config.xml</filename></member>
+ <member><filename>picketlink-idm-openldap-acme-config.xml</filename></member>
- </simplelist>
+ </simplelist>
- </listitem>
- <listitem>
- <para>
- A custom file created by modifying one of the above files.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ A custom file created by modifying one of the above files.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <variablelist id="vari-Reference_Guide-LDAP_configuration-Configuration_options">
- <title>Configuration options</title>
- <varlistentry>
- <term>ctxDNs</term>
- <listitem>
- <para>
- This is the DN that will be used as context for <emphasis>IdentityObject</emphasis> searches. More than one value can be specified.
- </para>
- <para>
- Some examples are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- ou=People,o=acme,dc=example,dc=com
- </para>
+ </itemizedlist>
+ <variablelist id="vari-Reference_Guide-LDAP_configuration-Configuration_options">
+ <title>Configuration options</title>
+ <varlistentry>
+ <term>ctxDNs</term>
+ <listitem>
+ <para>
+ This is the DN that will be used as context for <emphasis>IdentityObject</emphasis> searches. More than one value can be specified.
+ </para>
+ <para>
+ Some examples are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ ou=People,o=acme,dc=example,dc=com
+ </para>
- </listitem>
- <listitem>
- <para>
- ou=Roles,o=acme,dc=example,dc=com
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ ou=Roles,o=acme,dc=example,dc=com
+ </para>
- </listitem>
- <listitem>
- <para>
- ou=OrganizationUnits,o=acme,dc=example,dc=com
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ ou=OrganizationUnits,o=acme,dc=example,dc=com
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">MSAD</emphasis>: CN=Users,DC=test,DC=domain (in two places).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">MSAD</emphasis>: CN=Users,DC=test,DC=domain (in two places).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </varlistentry>
- <varlistentry>
- <term>providerURL</term>
- <listitem>
- <para>
- The LDAP server connection URL. Formatted as "ldap://localhost:<replaceable><PORT></replaceable>". The default setting is: <emphasis>ldap://localhost:1389</emphasis>.
- </para>
- <para>
- <emphasis role="bold">MSAD</emphasis>: Should use SSL connection (ldaps://xxx:636) for password update or creation to work.
- </para>
+ </varlistentry>
+ <varlistentry>
+ <term>providerURL</term>
+ <listitem>
+ <para>
+ The LDAP server connection URL. Formatted as "ldap://localhost:<replaceable><PORT></replaceable>". The default setting is: <emphasis>ldap://localhost:1389</emphasis>.
+ </para>
+ <para>
+ <emphasis role="bold">MSAD</emphasis>: Should use SSL connection (ldaps://xxx:636) for password update or creation to work.
+ </para>
- </listitem>
+ </listitem>
- </varlistentry>
- <varlistentry>
- <term>adminDN</term>
- <listitem>
- <para>
- The LDAP entry used to connect to the server.
- </para>
- <para>
- Some possible values are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">RHDS or OpenDS</emphasis>: cn=Directory Manager
- </para>
+ </varlistentry>
+ <varlistentry>
+ <term>adminDN</term>
+ <listitem>
+ <para>
+ The LDAP entry used to connect to the server.
+ </para>
+ <para>
+ Some possible values are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">RHDS or OpenDS</emphasis>: cn=Directory Manager
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">OpenLDAP</emphasis>: cn=Manager,dc=my-domain,dc=com
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">OpenLDAP</emphasis>: cn=Manager,dc=my-domain,dc=com
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">MSAD</emphasis>: TEST\Administrator
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">MSAD</emphasis>: TEST\Administrator
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </varlistentry>
- <varlistentry>
- <term>adminPassword</term>
- <listitem>
- <para>
- The password associated with the <emphasis role="bold">adminDN</emphasis>.
- </para>
+ </varlistentry>
+ <varlistentry>
+ <term>adminPassword</term>
+ <listitem>
+ <para>
+ The password associated with the <emphasis role="bold">adminDN</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </varlistentry>
- <varlistentry>
- <term>customSystemProperties</term>
- <listitem>
- <para>
- This option defines the values needed to use SSL encryption with LDAP.
- </para>
+ </varlistentry>
+ <varlistentry>
+ <term>customSystemProperties</term>
+ <listitem>
+ <para>
+ This option defines the values needed to use SSL encryption with LDAP.
+ </para>
- </listitem>
+ </listitem>
- </varlistentry>
+ </varlistentry>
- </variablelist>
+ </variablelist>
- </example>
- <!-- Source Metadata
+ </example>
+ <!-- Source Metadata
URL: http://anonsvn.jboss.org/repos/picketlink/idm/downloads/docs/1.0.0.GA/Ref...
Author [w/email]: Bolesław Dawidowicz (bdawidow(a)redhat.com), Jeff Yu
License: ??
--> <example id="exam-Reference_Guide-Examples-Read_Only_groupTypeMappings">
- <title>Read Only groupTypeMappings</title>
- <para>
- The <parameter>groupTypeMappings</parameter> exposed in the <filename>idm-configuration.xml</filename> file correspond to <parameter>identity-object-type</parameter> values defined in the DS-specific configuration file (referenced in <emphasis>Sub-step 3a</emphasis> of the DS-specific procedure above).
- </para>
- <para>
- For RHDS, OpenDS and OpenLDAP the <filename>picketlink-idm-ldap-acme-config.xml</filename> and <filename>picketlink-idm-openldap-acme-config.xml</filename> files contain the following values:
- </para>
- <programlistingco>
- <areaspec>
- <areaset coords="" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-opends">
- <area coords="10 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-users-opends" />
- <area coords="14 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-groups-opends" />
+ <title>Read Only groupTypeMappings</title>
+ <para>
+ The <parameter>groupTypeMappings</parameter> exposed in the <filename>idm-configuration.xml</filename> file correspond to <parameter>identity-object-type</parameter> values defined in the DS-specific configuration file (referenced in <emphasis>Sub-step 3a</emphasis> of the DS-specific procedure above).
+ </para>
+ <para>
+ For RHDS, OpenDS and OpenLDAP the <filename>picketlink-idm-ldap-acme-config.xml</filename> and <filename>picketlink-idm-openldap-acme-config.xml</filename> files contain the following values:
+ </para>
+ <programlistingco>
+ <areaspec>
+ <areaset coords="" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-opends">
+ <area coords="10 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-users-opends" />
+ <area coords="14 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-groups-opends" />
- </areaset>
- <area coords="17 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-read-only-opends" />
+ </areaset>
+ <area coords="17 40" id="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-read-only-opends" />
- </areaspec>
-
+ </areaspec>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_LDAP/readonly-opends.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <calloutlist>
- <!-- #1 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-opends">
- <para>
- The PicketLink IDM configuration file dictates that users and those two group types be stored in LDAP.
- </para>
+ <calloutlist>
+ <!-- #1 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-opends">
+ <para>
+ The PicketLink IDM configuration file dictates that users and those two group types be stored in LDAP.
+ </para>
- </callout>
- <!-- #2 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-read-only-opends">
- <para>
- An additional option defines that nothing else (except password updates) should be written there.
- </para>
+ </callout>
+ <!-- #2 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Read_Only_groupTypeMappings-config-read-only-opends">
+ <para>
+ An additional option defines that nothing else (except password updates) should be written there.
+ </para>
- </callout>
+ </callout>
- </calloutlist>
+ </calloutlist>
- </programlistingco>
-
- <para>
- All groups under <emphasis role="bold">/acme/roles</emphasis> will be stored in PicketLink IDM with the <emphasis role="bold">acme_roles_type</emphasis> group type name and groups under <emphasis role="bold">/acme/organization_units</emphasis> will be stored in PicketLink IDM with <emphasis role="bold">acme_ou_type group</emphasis> type name.
- </para>
- <para>
- For MSAD, the <parameter>identity-object-types</parameter> values in <filename>picketlink-idm-msad-readonly-config.xml</filename> change to:
- </para>
-
+ </programlistingco>
+
+ <para>
+ All groups under <emphasis role="bold">/acme/roles</emphasis> will be stored in PicketLink IDM with the <emphasis role="bold">acme_roles_type</emphasis> group type name and groups under <emphasis role="bold">/acme/organization_units</emphasis> will be stored in PicketLink IDM with <emphasis role="bold">acme_ou_type group</emphasis> type name.
+ </para>
+ <para>
+ For MSAD, the <parameter>identity-object-types</parameter> values in <filename>picketlink-idm-msad-readonly-config.xml</filename> change to:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_LDAP/readonly-msad.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The difference is that this configuration maps only one group type and points to the same container in LDAP for both users and mapped groups.
- </para>
+ <para>
+ The difference is that this configuration maps only one group type and points to the same container in LDAP for both users and mapped groups.
+ </para>
- </example>
- <example id="exam-Reference_Guide-Examples-Default_groupTypeMappings">
- <title>Default groupTypeMappings</title>
- <para>
- The <parameter>groupTypeMappings</parameter> exposed in the <filename>idm-configuration.xml</filename> file correspond to <parameter>identity-object-type</parameter> values defined in the DS-specific configuration file (referenced in <emphasis>Sub-step 3a</emphasis> of the DS-specific procedure above).
- </para>
- <para>
- All of the supported LDAP configurations use the following values when implemented as the default identity store:
- </para>
- <programlistingco>
- <areaspec>
- <areaset coords="" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config">
- <area coords="10 40" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config-1" />
- <area coords="14 40" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config-2" />
+ </example>
+ <example id="exam-Reference_Guide-Examples-Default_groupTypeMappings">
+ <title>Default groupTypeMappings</title>
+ <para>
+ The <parameter>groupTypeMappings</parameter> exposed in the <filename>idm-configuration.xml</filename> file correspond to <parameter>identity-object-type</parameter> values defined in the DS-specific configuration file (referenced in <emphasis>Sub-step 3a</emphasis> of the DS-specific procedure above).
+ </para>
+ <para>
+ All of the supported LDAP configurations use the following values when implemented as the default identity store:
+ </para>
+ <programlistingco>
+ <areaspec>
+ <areaset coords="" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config">
+ <area coords="10 40" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config-1" />
+ <area coords="14 40" id="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config-2" />
- </areaset>
+ </areaset>
- </areaspec>
-
+ </areaspec>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_LDAP/default-ldap.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <calloutlist>
- <!-- #1 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config">
- <para>
- The <parameter>groupTypeMappings</parameter> define that all groups under <parameter>/platform</parameter> should be stored in PicketLink IDM with the <parameter>platform_type</parameter> group type name and groups under <parameter>/organization</parameter> should be stored in PicketLink IDM with <parameter>organization_type</parameter> group type name.
- </para>
- <para>
- The PicketLink IDM configuration file repository maps users and those two group types as stored in LDAP.
- </para>
+ <calloutlist>
+ <!-- #1 --> <callout arearefs="area-Reference_Guide-LDAP_Integration-Examples-Default_groupTypeMappings-config">
+ <para>
+ The <parameter>groupTypeMappings</parameter> define that all groups under <parameter>/platform</parameter> should be stored in PicketLink IDM with the <parameter>platform_type</parameter> group type name and groups under <parameter>/organization</parameter> should be stored in PicketLink IDM with <parameter>organization_type</parameter> group type name.
+ </para>
+ <para>
+ The PicketLink IDM configuration file repository maps users and those two group types as stored in LDAP.
+ </para>
- </callout>
+ </callout>
- </calloutlist>
+ </calloutlist>
- </programlistingco>
-
+ </programlistingco>
+
- </example>
+ </example>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-09-27 04:42:42 UTC (rev 7510)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-09-27 06:12:04 UTC (rev 7511)
@@ -4,73 +4,73 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-SSO_Single_Sign_On">
- <title>SSO - Single Sign On</title>
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-Overview">
- <title>Overview</title>
- <para>
- JBoss Enterprise Portal Platform provides an implementation of Single Sign On (<literal>SSO</literal>) as an integration and aggregation platform.
- </para>
- <para>
- When logging into the portal users can access many systems through portlets using a single identity. In many cases, however, the portal infrastructure must be integrated with other SSO enabled systems.
- </para>
- <para>
- There are many different Identity Management solutions available. In most cases each SSO framework provides a unique way to plug into a Java EE application.
- </para>
- <para>
- This section will cover the implementation of four different SSO plug-ins with JBoss Enterprise Portal Platform:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-CAS_Central_Authentication_Service" />
- </para>
+ <title>SSO - Single Sign On</title>
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-Overview">
+ <title>Overview</title>
+ <para>
+ JBoss Enterprise Portal Platform provides an implementation of Single Sign On (<literal>SSO</literal>) as an integration and aggregation platform.
+ </para>
+ <para>
+ When logging into the portal users can access many systems through portlets using a single identity. In many cases, however, the portal infrastructure must be integrated with other SSO enabled systems.
+ </para>
+ <para>
+ There are many different Identity Management solutions available. In most cases each SSO framework provides a unique way to plug into a Java EE application.
+ </para>
+ <para>
+ This section will cover the implementation of four different SSO plug-ins with JBoss Enterprise Portal Platform:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-CAS_Central_Authentication_Service" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-JOSSO_Java_Open_Single_Sign_On_Project" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-JOSSO_Java_Open_Single_Sign_On_Project" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <note>
- <title>Prerequisites</title>
- <para>
- In this tutorial, the SSO server is being installed in a Tomcat environment. Tomcat can be obtained from <ulink type="http" url="http://tomcat.apache.org">http://tomcat.apache.org</ulink>.
- </para>
+ </itemizedlist>
+ <note>
+ <title>Prerequisites</title>
+ <para>
+ In this tutorial, the SSO server is being installed in a Tomcat environment. Tomcat can be obtained from <ulink type="http" url="http://tomcat.apache.org">http://tomcat.apache.org</ulink>.
+ </para>
- </note>
- <para>
- All the packages required for SSO setup can be found in a zip file located in the <filename>jboss-epp-<replaceable>VERSION</replaceable>/gatein-sso</filename> directory of the JBoss Enterprise Portal Platform binary package.
- </para>
- <para>
- In the following scenarios this directory will be referred to as <replaceable>PORTAL_SSO</replaceable>.
- </para>
- <warning>
- <para>
- Users are advised to not run any portal extensions that could override the data when manipulating the <filename>gatein.ear</filename> file directly.
- </para>
+ </note>
+ <para>
+ All the packages required for SSO setup can be found in a zip file located in the <filename>jboss-epp-<replaceable>VERSION</replaceable>/gatein-sso</filename> directory of the JBoss Enterprise Portal Platform binary package.
+ </para>
+ <para>
+ In the following scenarios this directory will be referred to as <replaceable>PORTAL_SSO</replaceable>.
+ </para>
+ <warning>
+ <para>
+ Users are advised to not run any portal extensions that could override the data when manipulating the <filename>gatein.ear</filename> file directly.
+ </para>
- </warning>
+ </warning>
- </section>
-
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-Enabling_SSO_using_JBoss_SSO_Valve">
- <title>Enabling SSO using JBoss SSO Valve</title>
- <!-- Source Metadata
+ </section>
+
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-Enabling_SSO_using_JBoss_SSO_Valve">
+ <title>Enabling SSO using JBoss SSO Valve</title>
+ <!-- Source Metadata
URL: https://issues.jboss.org/browse/JBQA-4530
Author [w/email]: Marek Posolda (mposolda(a)redhat.com)
@@ -80,118 +80,118 @@
URL: https://issues.jboss.org/browse/JBEPP-615
Author [w/email]: Marek Posolda (mposolda(a)redhat.com)
--> <para>
- The JBoss SSO valve is useful to authenticate a user on one JBoss Enterprise Portal Platform node in a cluster and have that authentication automatically carry across to other nodes in the cluster.
- </para>
- <para>
- This authentication can also be used in any other web applications which may require authentication, <emphasis role="bold">provided that these applications use same roles as the main portal instance</emphasis>. Attempting to use an SSO authentication in an application that uses different roles may create authorization errors (<emphasis role="bold">403</emphasis> errors, for example).
- </para>
- <para>
- More info about the JBoss SSO valve can be found at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/Ad..." />.
- </para>
- <para>
- To successfully implement SSO integration, do the following:
- </para>
- <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-SSO_Integration">
- <title>SSO Integration</title>
- <step>
- <para>
- Open the <filename>/<replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jbossweb.sar/server.xml</filename> file and uncomment one of the two <parameter>Valve</parameter> entries:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- For a <emphasis>non-clustered</emphasis> implementation, uncomment:
- </para>
-
+ The JBoss SSO valve is useful to authenticate a user on one JBoss Enterprise Portal Platform node in a cluster and have that authentication automatically carry across to other nodes in the cluster.
+ </para>
+ <para>
+ This authentication can also be used in any other web applications which may require authentication, <emphasis role="bold">provided that these applications use same roles as the main portal instance</emphasis>. Attempting to use an SSO authentication in an application that uses different roles may create authorization errors (<emphasis role="bold">403</emphasis> errors, for example).
+ </para>
+ <para>
+ More info about the JBoss SSO valve can be found at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/Ad..." />.
+ </para>
+ <para>
+ To successfully implement SSO integration, do the following:
+ </para>
+ <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-SSO_Integration">
+ <title>SSO Integration</title>
+ <step>
+ <para>
+ Open the <filename>/<replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jbossweb.sar/server.xml</filename> file and uncomment one of the two <parameter>Valve</parameter> entries:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ For a <emphasis>non-clustered</emphasis> implementation, uncomment:
+ </para>
+
<programlisting language="XML" role="XML"><Valve className="org.apache.catalina.authenticator.SingleSignOn" />
</programlisting>
- </listitem>
- <listitem>
- <para>
- For a <emphasis>clustered</emphasis> implementation, uncomment:
- </para>
-
+ </listitem>
+ <listitem>
+ <para>
+ For a <emphasis>clustered</emphasis> implementation, uncomment:
+ </para>
+
<programlisting language="XML" role="XML"><Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </step>
- <step>
- <para>
- To integrate with the JBoss SSO valve, follow <emphasis role="bold">one</emphasis> of the procedures below to make the necessary configuration changes in the Java Authentication and Authorization Service (<emphasis role="bold">JAAS</emphasis>):
- </para>
- <itemizedlist>
- <listitem>
- <procedure id="proc-Reference_Guide-SSO_Integration-Call_the_JAAS_authentication_directly">
- <title>Call the JAAS authentication directly</title>
- <step>
- <para>
- Open the <filename>/<replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/login/jsp/login.jsp</filename> file.
- </para>
+ </step>
+ <step>
+ <para>
+ To integrate with the JBoss SSO valve, follow <emphasis role="bold">one</emphasis> of the procedures below to make the necessary configuration changes in the Java Authentication and Authorization Service (<emphasis role="bold">JAAS</emphasis>):
+ </para>
+ <itemizedlist>
+ <listitem>
+ <procedure id="proc-Reference_Guide-SSO_Integration-Call_the_JAAS_authentication_directly">
+ <title>Call the JAAS authentication directly</title>
+ <step>
+ <para>
+ Open the <filename>/<replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/login/jsp/login.jsp</filename> file.
+ </para>
- </step>
- <step>
- <para>
- Change the line that reads:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Change the line that reads:
+ </para>
+
<programlisting language="XML" role="XML"><form name="loginForm" action="<%= contextPath + "/login"%>" method="post" style="margin: 0px;">
</programlisting>
- <para>
- to read:
- </para>
-
+ <para>
+ to read:
+ </para>
+
<programlisting language="XML" role="XML"><form name="loginForm" action="<%= contextPath + "/private/j_security_check"%>" method="post" style="margin: 0px;">
</programlisting>
- </step>
- <step>
- <para>
- Change the line that reads:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Change the line that reads:
+ </para>
+
<programlisting language="XML" role="XML"><td><input class="UserName" name="username" value="<%=username%>"/></td>
</programlisting>
- <para>
- to read:
- </para>
-
+ <para>
+ to read:
+ </para>
+
<programlisting language="XML" role="XML"><td><input class="UserName" name="j_username" value="<%=username%>"/></td>
</programlisting>
- </step>
- <step>
- <para>
- Change the line that reads:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Change the line that reads:
+ </para>
+
<programlisting language="XML" role="XML"><td><input class="Password" type="password" name="password" value=""/></td>
</programlisting>
- <para>
- to read:
- </para>
-
+ <para>
+ to read:
+ </para>
+
<programlisting language="XML" role="XML"><td><input class="Password" type="password" name="j_password" value=""/></td>
</programlisting>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </listitem>
- <listitem>
- <procedure id="proc-Reference_Guide-SSO_Integration-Switch_to_BASIC_authentication">
- <title>Switch to <emphasis role="bold">BASIC</emphasis> authentication</title>
- <step>
- <para>
- Change the <parameter>auth-method</parameter> element in <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/web.xml</filename> from <parameter>FORM</parameter> to <parameter>BASIC</parameter>:
- </para>
-
+ </listitem>
+ <listitem>
+ <procedure id="proc-Reference_Guide-SSO_Integration-Switch_to_BASIC_authentication">
+ <title>Switch to <emphasis role="bold">BASIC</emphasis> authentication</title>
+ <step>
+ <para>
+ Change the <parameter>auth-method</parameter> element in <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/web.xml</filename> from <parameter>FORM</parameter> to <parameter>BASIC</parameter>:
+ </para>
+
<programlisting language="XML" role="XML"><login-config>
<auth-method>BASIC</auth-method>
<realm-name>gatein-domain</realm-name>
@@ -201,1168 +201,1168 @@
</form-login-config>
</programlisting>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </step>
+ </step>
- </procedure>
-
- <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_the_SSO_Valve">
- <title>Testing the SSO Valve</title>
- <para>
- Once the JBoss SSO Valve has been enabled, it can be tested with the following steps:
- </para>
+ </procedure>
+
+ <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_the_SSO_Valve">
+ <title>Testing the SSO Valve</title>
+ <para>
+ Once the JBoss SSO Valve has been enabled, it can be tested with the following steps:
+ </para>
- </formalpara>
- <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_the_SSO_Vavle">
- <title>Testing the SSO Vavle</title>
- <step>
- <para>
- Copy the <replaceable><PROFILE></replaceable> you enabled the valve in (<literal>all</literal>, for example) into two new profiles called <literal>node1</literal> and <literal>node2</literal>.
- </para>
+ </formalpara>
+ <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_the_SSO_ValVavlee">
+ <title>Testing the SSO Valve</title>
+ <step>
+ <para>
+ Copy the <replaceable><PROFILE></replaceable> you enabled the valve in (<literal>all</literal>, for example) into two new profiles called <literal>node1</literal> and <literal>node2</literal>.
+ </para>
- </step>
- <step>
- <para>
- Run an instance of JBoss Enterprise Portal Platform using the <literal>node1</literal> profile on a local machine:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Run an instance of JBoss Enterprise Portal Platform using the <literal>node1</literal> profile on a local machine:
+ </para>
+
<programlisting>./run.sh -c node1 -Djboss.service.binding.set=ports-default -Dexo.profiles=cluster -Djboss.messaging.ServerPeerID=0 &
</programlisting>
- </step>
- <step>
- <para>
- Start another instance using the <literal>node2</literal> profile:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Start another instance using the <literal>node2</literal> profile:
+ </para>
+
<programlisting>./run.sh -c node2 -Djboss.service.binding.set=ports-01 -Dexo.profiles=cluster -Djboss.messaging.ServerPeerID=1 &
</programlisting>
- </step>
- <step>
- <para>
- Navigate to <ulink type="http" url="http://localhost:8080/portal/private/classic" /> and authenticate with the pre-configured user account "<systemitem>root</systemitem>" (password "<systemitem>gtn</systemitem>").
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to <ulink type="http" url="http://localhost:8080/portal/private/classic" /> and authenticate with the pre-configured user account "<systemitem>root</systemitem>" (password "<systemitem>gtn</systemitem>").
+ </para>
- </step>
- <step>
- <para>
- Navigate to <ulink type="http" url="http://localhost:8180/portal/private/classic" />. You should be automatically authenticated as user <systemitem>root</systemitem> on this node as well.
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to <ulink type="http" url="http://localhost:8180/portal/private/classic" />. You should be automatically authenticated as user <systemitem>root</systemitem> on this node as well.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Enabling_SSO_in_a_physical_cluster">
- <title>Enabling SSO in a physical cluster</title>
- <para>
- If you require SSO to work across a physical cluster of separate machines you will need to use the <parameter>cookieDomain</parameter> attribute of the SSO valve.
- </para>
+ </procedure>
+
+ <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Enabling_SSO_in_a_physical_cluster">
+ <title>Enabling SSO in a physical cluster</title>
+ <para>
+ If you require SSO to work across a physical cluster of separate machines you will need to use the <parameter>cookieDomain</parameter> attribute of the SSO valve.
+ </para>
- </formalpara>
- <procedure>
- <step>
- <para>
- Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jbossweb.sar/server.xml</filename> file.
- </para>
+ </formalpara>
+ <procedure>
+ <step>
+ <para>
+ Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jbossweb.sar/server.xml</filename> file.
+ </para>
- </step>
- <step>
- <para>
- Uncomment the line:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Uncomment the line:
+ </para>
+
<programlisting language="XML" role="XML"><!--
<Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
-->
</programlisting>
- </step>
- <step>
- <para>
- And edit it to match the following:
- </para>
-
+ </step>
+ <step>
+ <para>
+ And edit it to match the following:
+ </para>
+
<programlisting language="XML" role="XML"><Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" cookieDomain="yourdomain.com" />
</programlisting>
- <para>
- (Where <literal>yourdomain.com</literal> is the domain used in your cluster. For example; <ulink type="http" url="http://machine1.yourdomain.com:8080/portal/private/classic" /> and <ulink type="http" url="http://machine2.yourdomain.com:8080/portal/private/classic" />)
- </para>
+ <para>
+ (Where <literal>yourdomain.com</literal> is the domain used in your cluster. For example; <ulink type="http" url="http://machine1.yourdomain.com:8080/portal/private/classic" /> and <ulink type="http" url="http://machine2.yourdomain.com:8080/portal/private/classic" />)
+ </para>
- </step>
- <step>
- <para>
- Repeat the process in the other nodes in the cluster.
- </para>
+ </step>
+ <step>
+ <para>
+ Repeat the process in the other nodes in the cluster.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- This will ensure the <literal>JSESSIONIDSSO</literal> cookie is used in the correct domain, allowing the SSO authentication to occur.
- </para>
- <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Enabling_SSO_with_Other_Web_Applications">
- <title>Enabling SSO with Other Web Applications</title>
- <para>
- As mentioned earlier, in order to use SSO authentication between JBoss Enterprise Portal Platform instances and other web applications, the roles defined in the web application must match those used in the portal instance.
- </para>
+ </procedure>
+
+ <para>
+ This will ensure the <literal>JSESSIONIDSSO</literal> cookie is used in the correct domain, allowing the SSO authentication to occur.
+ </para>
+ <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Enabling_SSO_with_Other_Web_Applications">
+ <title>Enabling SSO with Other Web Applications</title>
+ <para>
+ As mentioned earlier, in order to use SSO authentication between JBoss Enterprise Portal Platform instances and other web applications, the roles defined in the web application must match those used in the portal instance.
+ </para>
- </formalpara>
- <para>
- As an example, to use the SSO Valve to authenticate a user in both a portal instance and the JMX Console, the following actions would be required:
- </para>
- <procedure>
- <title></title>
- <step>
- <para>
- Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jmx-console.war/WEB-INF/web.xml</filename> file and edit it as follows:
- </para>
- <substeps>
- <step>
- <para>
- Change the <parameter><role-name></parameter> entry in the <parameter><auth-constraint></parameter> element (line <literal>110</literal>) from <literal>JBossAdmin</literal> to <literal>users</literal>:
- </para>
-
+ </formalpara>
+ <para>
+ As an example, to use the SSO Valve to authenticate a user in both a portal instance and the JMX Console, the following actions would be required:
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/jmx-console.war/WEB-INF/web.xml</filename> file and edit it as follows:
+ </para>
+ <substeps>
+ <step>
+ <para>
+ Change the <parameter><role-name></parameter> entry in the <parameter><auth-constraint></parameter> element (line <literal>110</literal>) from <literal>JBossAdmin</literal> to <literal>users</literal>:
+ </para>
+
<programlisting language="XML" role="XML"><auth-constraint>
<!--<role-name>JBossAdmin</role-name>-->
<role-name>users</role-name>
</auth-constraint></programlisting>
- </step>
- <step>
- <para>
- Change the <parameter><role-name></parameter> entry in the <parameter><security-role></parameter> element (line <literal>120</literal>) from <literal>JBossAdmin</literal> to <literal>users</literal>
- </para>
-
+ </step>
+ <step>
+ <para>
+ Change the <parameter><role-name></parameter> entry in the <parameter><security-role></parameter> element (line <literal>120</literal>) from <literal>JBossAdmin</literal> to <literal>users</literal>
+ </para>
+
<programlisting language="XML" role="XML"><security-role>
<!--<role-name>JBossAdmin</role-name>-->
<role-name>users</role-name>
</security-role></programlisting>
- </step>
+ </step>
- </substeps>
+ </substeps>
- </step>
+ </step>
- </procedure>
-
- <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_SSO_With_Other_Web_Applications">
- <title>Testing SSO With Other Web Applications</title>
- <para>
- To test that SSO authentication is enabled from portal instances to other web applications (in this case, the JMX Console), do the following:
- </para>
+ </procedure>
+
+ <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Testing_SSO_With_Other_Web_Applications">
+ <title>Testing SSO With Other Web Applications</title>
+ <para>
+ To test that SSO authentication is enabled from portal instances to other web applications (in this case, the JMX Console), do the following:
+ </para>
- </formalpara>
- <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Test_SSO_Between_Portal_and_JMX_Console">
- <title>Test SSO Between Portal and JMX Console</title>
- <step>
- <para>
- Start a portal instance on one node:
- </para>
-
+ </formalpara>
+ <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Test_SSO_Between_Portal_and_JMX_Console">
+ <title>Test SSO Between Portal and JMX Console</title>
+ <step>
+ <para>
+ Start a portal instance on one node:
+ </para>
+
<programlisting>./run.sh -c node1 -Djboss.service.binding.set=ports-default -Dexo.profiles=cluster -Djboss.messaging.ServerPeerID=0 &
</programlisting>
- </step>
- <step>
- <para>
- Navigate to <ulink type="http" url="http://localhost:8080/portal/private/classic" /> and authenticate with the pre-configured user account "<systemitem>root</systemitem>" (password "<systemitem>gtn</systemitem>").
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to <ulink type="http" url="http://localhost:8080/portal/private/classic" /> and authenticate with the pre-configured user account "<systemitem>root</systemitem>" (password "<systemitem>gtn</systemitem>").
+ </para>
- </step>
- <step>
- <para>
- Navigate to <ulink type="http" url="http://localhost:8080/jmx-console" />. You should be automatically authenticated into the JMX Console.
- </para>
+ </step>
+ <step>
+ <para>
+ Navigate to <ulink type="http" url="http://localhost:8080/jmx-console" />. You should be automatically authenticated into the JMX Console.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Using_SSO_to_Authenticate_From_the_Public_Page">
- <title>Using SSO to Authenticate From the Public Page</title>
- <para>
- The previous configuration changes in this section are useful if a user is using a private URL (<ulink type="http" url="http://localhost:8080/portal/private/classic" />, for example) to log in to the portal instance.
- </para>
+ </procedure>
+
+ <formalpara id="form-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Using_SSO_to_Authenticate_From_the_Public_Page">
+ <title>Using SSO to Authenticate From the Public Page</title>
+ <para>
+ The previous configuration changes in this section are useful if a user is using a private URL (<ulink type="http" url="http://localhost:8080/portal/private/classic" />, for example) to log in to the portal instance.
+ </para>
- </formalpara>
- <para>
- Further changes are needed however, if SSO authentication is required to work with the <guilabel>Sign In</guilabel> button on the front page of the portal (<ulink type="http" url="http://localhost:8080/portal/public/classic" />).
- </para>
- <para>
- To enable this functionality, the <guilabel>Sign In</guilabel> link must redirect to the <filename>login.jsp</filename> file edited earlier to call the JAAS authentication directly.
- </para>
- <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Redirect_to_Use_SSO_Valve_Authentication">
- <title>Redirect to Use SSO Valve Authentication</title>
- <step>
- <para>
- Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file and edit the line:
- </para>
-
+ </formalpara>
+ <para>
+ Further changes are needed however, if SSO authentication is required to work with the <guilabel>Sign In</guilabel> button on the front page of the portal (<ulink type="http" url="http://localhost:8080/portal/public/classic" />).
+ </para>
+ <para>
+ To enable this functionality, the <guilabel>Sign In</guilabel> link must redirect to the <filename>login.jsp</filename> file edited earlier to call the JAAS authentication directly.
+ </para>
+ <procedure id="proc-Reference_Guide-Enabling_SSO_using_JBoss_SSO_Valve-Redirect_to_Use_SSO_Valve_Authentication">
+ <title>Redirect to Use SSO Valve Authentication</title>
+ <step>
+ <para>
+ Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file and edit the line:
+ </para>
+
<programlisting language="Java" role="java"><a class="Login" onclick="$signInAction"><%=_ctx.appRes("UILoginForm.label.Signin")%></a>
</programlisting>
- <para>
- To read:
- </para>
-
+ <para>
+ To read:
+ </para>
+
<programlisting language="Java" role="java"><a class="Login" href="/portal/private/classic"><%=_ctx.appRes("UILoginForm.label.Signin")%></a>
</programlisting>
- </step>
- <step>
- <para>
- Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file and change the line:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Open the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file and change the line:
+ </para>
+
<programlisting language="Java" role="java"><a onclick="$signInAction"><%=_ctx.appRes("UILogoPortlet.action.signin")%></a>
</programlisting>
- <para>
- To read:
- </para>
-
+ <para>
+ To read:
+ </para>
+
<programlisting language="Java" role="java"><a href="/portal/private/classic"><%=_ctx.appRes("UILogoPortlet.action.signin")%></a>
</programlisting>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </section>
-
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-CAS_Central_Authentication_Service">
- <title>CAS - Central Authentication Service</title>
- <para>
- This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Central Authentication Service (<emphasis role="bold">CAS</emphasis>) Single Sign On Framework. Details about CAS can be found <ulink url="http://www.ja-sig.org/products/cas/">here</ulink>.
- </para>
- <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-CAS_server">
- <title>CAS server</title>
- <step>
- <para>
- Set up the server to authenticate against the portal login module.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-CAS_Central_Authentication_Service">
+ <title>CAS - Central Authentication Service</title>
+ <para>
+ This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Central Authentication Service (<emphasis role="bold">CAS</emphasis>) Single Sign On Framework. Details about CAS can be found <ulink url="http://www.ja-sig.org/products/cas/">here</ulink>.
+ </para>
+ <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-CAS_server">
+ <title>CAS server</title>
+ <step>
+ <para>
+ Set up the server to authenticate against the portal login module.
+ </para>
- </step>
- <step>
- <para>
- Downloaded CAS from <ulink type="http" url="http://www.jasig.org/cas/download">http://www.jasig.org/cas/download</ulink>.
- </para>
+ </step>
+ <step>
+ <para>
+ Downloaded CAS from <ulink type="http" url="http://www.jasig.org/cas/download">http://www.jasig.org/cas/download</ulink>.
+ </para>
- </step>
- <step>
- <para>
- Extract the downloaded file into a suitable location. This location will be referred to as <replaceable>CAS_DIR</replaceable> in the following example.
- </para>
+ </step>
+ <step>
+ <para>
+ Extract the downloaded file into a suitable location. This location will be referred to as <replaceable>CAS_DIR</replaceable> in the following example.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- The simplest way to configure the web archive is to make the necessary changes directly into the CAS codebase.
- </para>
- <note>
- <para>
- To perform the final build step and complete these instructions you will need the Apache Maven 2. Download it from <ulink type="http" url="http://maven.apache.org/download.html">here</ulink>.
- </para>
+ </procedure>
+
+ <para>
+ The simplest way to configure the web archive is to make the necessary changes directly into the CAS codebase.
+ </para>
+ <note>
+ <para>
+ To perform the final build step and complete these instructions you will need the Apache Maven 2. Download it from <ulink type="http" url="http://maven.apache.org/download.html">here</ulink>.
+ </para>
- </note>
- <para>
- The CAS Server Plugin makes secure callbacks to a RESTful service installed on the remote JBoss Enterprise Portal Platform server to authenticate a user.
- </para>
- <para>
- In order for the plugin to function correctly, it needs to be properly configured to connect to this service. This configuration is controlled by the <filename>cas.war/WEB-INF/deployerConfigContext.xml </filename> file.
- </para>
- <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Modifying_CAS_server">
- <title>Modifying CAS server</title>
- <step>
- <para>
- Open <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml</filename>
- </para>
+ </note>
+ <para>
+ The CAS Server Plugin makes secure callbacks to a RESTful service installed on the remote JBoss Enterprise Portal Platform server to authenticate a user.
+ </para>
+ <para>
+ In order for the plugin to function correctly, it needs to be properly configured to connect to this service. This configuration is controlled by the <filename>cas.war/WEB-INF/deployerConfigContext.xml </filename> file.
+ </para>
+ <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Modifying_CAS_server">
+ <title>Modifying CAS server</title>
+ <step>
+ <para>
+ Open <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml</filename>
+ </para>
- </step>
- <step>
- <para>
- Replace this code:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace this code:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default102.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- with:
- </para>
-
+ <para>
+ with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default103.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- Make sure to set the <emphasis>host</emphasis>, <emphasis>port</emphasis> and <emphasis>context</emphasis> with the values corresponding to your portal (also available in <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/deployerConfigContext.xml</filename>).
- </para>
+ <para>
+ Make sure to set the <emphasis>host</emphasis>, <emphasis>port</emphasis> and <emphasis>context</emphasis> with the values corresponding to your portal (also available in <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/deployerConfigContext.xml</filename>).
+ </para>
- </step>
- <step>
- <para>
- Copy <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/lib/sso-cas-plugin-<VERSION>.jar</filename> and <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar</filename> into the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/src/main/webapp/WEB-INF/lib</filename> created directory.
- </para>
+ </step>
+ <step>
+ <para>
+ Copy <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/lib/sso-cas-plugin-<VERSION>.jar</filename> and <filename><replaceable>PORTAL_SSO</replaceable>/cas/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar</filename> into the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/src/main/webapp/WEB-INF/lib</filename> created directory.
+ </para>
- </step>
- <step>
- <para>
- If you have not already done so, download an instance of Tomcat and extract it into a suitable location (which will be called <filename>TOMCAT_HOME</filename> for these instructions).
- </para>
+ </step>
+ <step>
+ <para>
+ If you have not already done so, download an instance of Tomcat and extract it into a suitable location (which will be called <filename>TOMCAT_HOME</filename> for these instructions).
+ </para>
- </step>
- <step>
- <para>
- Edit <filename>TOMCAT_HOME/conf/server.xml</filename> and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform .
- </para>
- <note>
- <para>
- If JBoss Enterprise Portal Platform is running on the same machine as Tomcat other ports will need to be changed in addition to 8080 in order to avoid conflicts. They can be changed to any free port. For example; you can change the admin port from 8005 to 8805 and the AJP port from 8009 to 8809.
- </para>
+ </step>
+ <step>
+ <para>
+ Edit <filename>TOMCAT_HOME/conf/server.xml</filename> and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform .
+ </para>
+ <note>
+ <para>
+ If JBoss Enterprise Portal Platform is running on the same machine as Tomcat other ports will need to be changed in addition to 8080 in order to avoid conflicts. They can be changed to any free port. For example; you can change the admin port from 8005 to 8805 and the AJP port from 8009 to 8809.
+ </para>
- </note>
+ </note>
- </step>
- <step>
- <para>
- Navigate locally to the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp</filename> directory and execute the following command:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Navigate locally to the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp</filename> directory and execute the following command:
+ </para>
+
<programlisting>mvn install
</programlisting>
- </step>
- <step>
- <para>
- Copy the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/target/cas.war</filename> file into the <filename>TOMCAT_HOME/webapps</filename> directory.
- </para>
- <para>
- Tomcat should start without issue and should be accessible at <ulink type="http" url="http://localhost:8888/cas">http://localhost:8888/cas</ulink>.
- </para>
- <note>
- <para>
- At this stage the login functionality will not be available.
- </para>
+ </step>
+ <step>
+ <para>
+ Copy the <filename><replaceable>CAS_DIR</replaceable>/cas-server-webapp/target/cas.war</filename> file into the <filename>TOMCAT_HOME/webapps</filename> directory.
+ </para>
+ <para>
+ Tomcat should start without issue and should be accessible at <ulink type="http" url="http://localhost:8888/cas">http://localhost:8888/cas</ulink>.
+ </para>
+ <note>
+ <para>
+ At this stage the login functionality will not be available.
+ </para>
- </note>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/AuthenticationAndIdentity/SSO/cas.png" format="PNG" scale="100" width="444" />
- </imageobject>
+ </note>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/AuthenticationAndIdentity/SSO/cas.png" format="PNG" scale="100" width="444" />
+ </imageobject>
- </mediaobject>
+ </mediaobject>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_CAS_client">
- <title>Setup the CAS client</title>
- <step>
- <para>
- Copy all the libraries from the <filename><replaceable>PORTAL_SSO</replaceable>/cas/gatein.ear/lib</filename> directory into the <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename>) directory.
- </para>
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_CAS_client">
+ <title>Setup the CAS client</title>
+ <step>
+ <para>
+ Copy all the libraries from the <filename><replaceable>PORTAL_SSO</replaceable>/cas/gatein.ear/lib</filename> directory into the <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename>) directory.
+ </para>
- </step>
- <step>
- <para>
- Edit the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Edit the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default105.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- There's a line comment already in this source file to assist you.
- </para>
+ <para>
+ There's a line comment already in this source file to assist you.
+ </para>
- </step>
- <step>
- <para>
- The installation can be tested at this point (assuming the CAS server on Tomcat is running):
- </para>
- <procedure>
- <step>
- <para>
- Start (or restart) JBoss Enterprise Portal Platform and direct your web browser to <ulink type="http" url="http://localhost:8888/cas">http://localhost:8888/cas</ulink>.
- </para>
+ </step>
+ <step>
+ <para>
+ The installation can be tested at this point (assuming the CAS server on Tomcat is running):
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Start (or restart) JBoss Enterprise Portal Platform and direct your web browser to <ulink type="http" url="http://localhost:8888/cas">http://localhost:8888/cas</ulink>.
+ </para>
- </step>
- <step>
- <para>
- Login with the username <literal>root</literal> and the password <literal>gtn</literal> (or any other account created through the portal).
- </para>
+ </step>
+ <step>
+ <para>
+ Login with the username <literal>root</literal> and the password <literal>gtn</literal> (or any other account created through the portal).
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
+ </step>
- </procedure>
-
- <para>
- To utilize the Central Authentication Service, JBoss Enterprise Portal Platform needs to redirect all user authentication to the CAS server.
- </para>
- <para>
- Information about where the CAS is hosted must be properly configured within the JBoss Enterprise Portal Platform instance. The required configuration is done by modifying three files.
- </para>
- <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Redirect_to_CAS">
- <title>Redirect to CAS</title>
- <step>
- <para>
- Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file as follows:
- </para>
-
+ </procedure>
+
+ <para>
+ To utilize the Central Authentication Service, JBoss Enterprise Portal Platform needs to redirect all user authentication to the CAS server.
+ </para>
+ <para>
+ Information about where the CAS is hosted must be properly configured within the JBoss Enterprise Portal Platform instance. The required configuration is done by modifying three files.
+ </para>
+ <procedure id="proc-Reference_Guide-CAS_Central_Authentication_Service-Redirect_to_CAS">
+ <title>Redirect to CAS</title>
+ <step>
+ <para>
+ Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default106.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default107.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default108.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Add the following Filters at the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Add the following Filters at the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default109.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default110.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
+ </step>
- </procedure>
-
- <para>
- Once these changes have been made, all links to the user authentication pages will redirect to the CAS centralized authentication form and CAS can be used as an SSO implementation in your portal.
- </para>
+ </procedure>
+
+ <para>
+ Once these changes have been made, all links to the user authentication pages will redirect to the CAS centralized authentication form and CAS can be used as an SSO implementation in your portal.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-JOSSO_Java_Open_Single_Sign_On_Project">
- <title>JOSSO - Java Open Single Sign-On Project</title>
- <para>
- This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Java Open Single Sign-On Project (<emphasis role="bold">JOSSO</emphasis>) Single Sign On Framework. Details about JOSSO can be found at <ulink url="http://www.josso.org">www.josso.org</ulink>.
- </para>
- <para>
- This section details setting up the JOSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
- </para>
- <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-JOSSO_server">
- <title>JOSSO server</title>
- <step>
- <para>
- Download JOSSO from <ulink type="http" url="http://sourceforge.net/projects/josso/files/">http://sourceforge.net/projects/josso/files/</ulink>.
- </para>
- <note>
- <para>
- Use the package that embeds Apache Tomcat. The integration was tested with JOSSO-1.8.1.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-JOSSO_Java_Open_Single_Sign_On_Project">
+ <title>JOSSO - Java Open Single Sign-On Project</title>
+ <para>
+ This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Java Open Single Sign-On Project (<emphasis role="bold">JOSSO</emphasis>) Single Sign On Framework. Details about JOSSO can be found at <ulink url="http://www.josso.org">www.josso.org</ulink>.
+ </para>
+ <para>
+ This section details setting up the JOSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
+ </para>
+ <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-JOSSO_server">
+ <title>JOSSO server</title>
+ <step>
+ <para>
+ Download JOSSO from <ulink type="http" url="http://sourceforge.net/projects/josso/files/">http://sourceforge.net/projects/josso/files/</ulink>.
+ </para>
+ <note>
+ <para>
+ Use the package that embeds Apache Tomcat. The integration was tested with JOSSO-1.8.1.
+ </para>
- </note>
+ </note>
- </step>
- <step>
- <para>
- Extract the package into what will be called <filename>JOSSO_HOME</filename> in this example.
- </para>
+ </step>
+ <step>
+ <para>
+ Extract the package into what will be called <filename>JOSSO_HOME</filename> in this example.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Modifying_JOSSO_server">
- <title>Modifying JOSSO server</title>
- <step>
- <para>
- Copy the files from <filename><replaceable>PORTAL_SSO</replaceable>/josso/plugin</filename> into the <filename>JOSSO_HOME</filename> directory created in the last step.
- </para>
- <para>
- This action should replace or add the following files to the <filename>JOSSO_HOME/webapps/josso/WEB-INF/lib</filename> directory:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <filename>JOSSO_HOME/lib/josso-gateway-config.xml</filename>
- </para>
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Modifying_JOSSO_server">
+ <title>Modifying JOSSO server</title>
+ <step>
+ <para>
+ Copy the files from <filename><replaceable>PORTAL_SSO</replaceable>/josso/plugin</filename> into the <filename>JOSSO_HOME</filename> directory created in the last step.
+ </para>
+ <para>
+ This action should replace or add the following files to the <filename>JOSSO_HOME/webapps/josso/WEB-INF/lib</filename> directory:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <filename>JOSSO_HOME/lib/josso-gateway-config.xml</filename>
+ </para>
- </listitem>
- <listitem>
- <para>
- <filename>JOSSO_HOME/lib/josso-gateway-gatein-stores.xml</filename>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>JOSSO_HOME/lib/josso-gateway-gatein-stores.xml</filename>
+ </para>
- </listitem>
- <listitem>
- <para>
- <filename>JOSSO_HOME/webapps/josso/WEB-INF/classes/gatein.properties</filename>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename>JOSSO_HOME/webapps/josso/WEB-INF/classes/gatein.properties</filename>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </step>
- <step>
- <para>
- Edit <filename>TOMCAT_HOME/conf/server.xml</filename> file and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform port.
- <note>
- <title>Port Conflicts</title>
- <para>
- If JBoss Enterprise Portal Platform is running on the same machine as Tomcat, other ports need to be changed in addition to 8080 in order to avoid port conflicts. They can be changed to any free port. For example, you can change admin port from 8005 to 8805, and AJP port from 8009 to 8809.
- </para>
+ </step>
+ <step>
+ <para>
+ Edit <filename>TOMCAT_HOME/conf/server.xml</filename> file and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform port.
+ <note>
+ <title>Port Conflicts</title>
+ <para>
+ If JBoss Enterprise Portal Platform is running on the same machine as Tomcat, other ports need to be changed in addition to 8080 in order to avoid port conflicts. They can be changed to any free port. For example, you can change admin port from 8005 to 8805, and AJP port from 8009 to 8809.
+ </para>
- </note>
+ </note>
- </para>
+ </para>
- </step>
- <step>
- <para>
- Tomcat should now start and allow access to <ulink type="http" url="http://localhost:8888/josso/signon/login.do">http://localhost:8888/josso/signon/login.do</ulink> but at this stage login will not be available.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/AuthenticationAndIdentity/SSO/opensso.png" format="PNG" width="444" />
- </imageobject>
+ </step>
+ <step>
+ <para>
+ Tomcat should now start and allow access to <ulink type="http" url="http://localhost:8888/josso/signon/login.do">http://localhost:8888/josso/signon/login.do</ulink> but at this stage login will not be available.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/AuthenticationAndIdentity/SSO/opensso.png" format="PNG" width="444" />
+ </imageobject>
- </mediaobject>
+ </mediaobject>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Setup_the_JOSSO_client">
- <title>Setup the JOSSO client</title>
- <step>
- <para>
- Copy the library files from <filename><replaceable>PORTAL_SSO</replaceable>/josso/gatein.ear/lib</filename> into <filename>gatein.ear/lib</filename>
- </para>
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Setup_the_JOSSO_client">
+ <title>Setup the JOSSO client</title>
+ <step>
+ <para>
+ Copy the library files from <filename><replaceable>PORTAL_SSO</replaceable>/josso/gatein.ear/lib</filename> into <filename>gatein.ear/lib</filename>
+ </para>
- </step>
- <step>
- <para>
- Copy the <filename><replaceable>PORTAL_SSO</replaceable>/josso/gatein.ear/02portal.war/WEB-INF/classes/josso-agent-config.xml</filename> file into the <filename>gatein.ear/02portal.war/WEB-INF/classes</filename> directory.
- </para>
+ </step>
+ <step>
+ <para>
+ Copy the <filename><replaceable>PORTAL_SSO</replaceable>/josso/gatein.ear/02portal.war/WEB-INF/classes/josso-agent-config.xml</filename> file into the <filename>gatein.ear/02portal.war/WEB-INF/classes</filename> directory.
+ </para>
- </step>
- <step>
- <para>
- Edit <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Edit <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default111.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- The installation can be tested at this point.
- </para>
- <procedure>
- <step>
- <para>
- Start (or restart) JBoss Enterprise Portal Platform, and (assuming the JOSSO server on Tomcat is running) direct your browser to <ulink type="http" url="http://localhost:8888/josso/signon/login.do">http://localhost:8888/josso/signon/login.do</ulink>.
- </para>
+ </step>
+ <step>
+ <para>
+ The installation can be tested at this point.
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Start (or restart) JBoss Enterprise Portal Platform, and (assuming the JOSSO server on Tomcat is running) direct your browser to <ulink type="http" url="http://localhost:8888/josso/signon/login.do">http://localhost:8888/josso/signon/login.do</ulink>.
+ </para>
- </step>
- <step>
- <para>
- Login with the username <literal>root</literal> and the password <literal>gtn</literal> or any account created through the portal.
- </para>
+ </step>
+ <step>
+ <para>
+ Login with the username <literal>root</literal> and the password <literal>gtn</literal> or any account created through the portal.
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
+ </step>
- </procedure>
-
- <para>
- The next part of the process is to redirect all user authentication to the JOSSO server.
- </para>
- <para>
- Information about where the JOSSO server is hosted must be properly configured within the JBoss Enterprise Portal Platform instance. The required configuration is done by modifying four files:
- </para>
- <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Setup_the_portal_to_redirect_to_JOSSO">
- <title>Setup the portal to redirect to JOSSO</title>
- <step>
- <para>
- In the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file modify the 'Sign In' link as follows:
- </para>
-
+ </procedure>
+
+ <para>
+ The next part of the process is to redirect all user authentication to the JOSSO server.
+ </para>
+ <para>
+ Information about where the JOSSO server is hosted must be properly configured within the JBoss Enterprise Portal Platform instance. The required configuration is done by modifying four files:
+ </para>
+ <procedure id="proc-Reference_Guide-JOSSO_Java_Open_Single_Sign_On_Project-Setup_the_portal_to_redirect_to_JOSSO">
+ <title>Setup the portal to redirect to JOSSO</title>
+ <step>
+ <para>
+ In the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file modify the 'Sign In' link as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default112.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename>gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename>gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default113.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default114.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Add the following Filters to the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Add the following Filters to the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default115.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default116.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Remove the <literal>PortalLoginController</literal> servlet declaration and mapping in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>
- </para>
+ </step>
+ <step>
+ <para>
+ Remove the <literal>PortalLoginController</literal> servlet declaration and mapping in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- From now on, all links redirecting to the user authentication pages will redirect to the JOSSO centralized authentication form.
- </para>
+ </procedure>
+
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to the JOSSO centralized authentication form.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
- <title>OpenSSO - The Open Web SSO project</title>
- <para>
- This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Open Web SSO project (<emphasis role="bold">OpenSSO</emphasis>) Single Sign On Framework. Details about OpenSSO can be found <ulink url="https://opensso.dev.java.net/">here</ulink>.
- </para>
- <para>
- This section details the setting up of OpenSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
- </para>
- <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Obtaining_OpenSSO">
- <title>Obtaining OpenSSO</title>
- <step>
- <para>
- Download OpenSSO from <ulink type="http" url="https://opensso.dev.java.net/public/use/index.html">https://opensso.dev.java.net/public/use/index.html</ulink>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
+ <title>OpenSSO - The Open Web SSO project</title>
+ <para>
+ This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Open Web SSO project (<emphasis role="bold">OpenSSO</emphasis>) Single Sign On Framework. Details about OpenSSO can be found <ulink url="https://opensso.dev.java.net/">here</ulink>.
+ </para>
+ <para>
+ This section details the setting up of OpenSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
+ </para>
+ <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Obtaining_OpenSSO">
+ <title>Obtaining OpenSSO</title>
+ <step>
+ <para>
+ Download OpenSSO from <ulink type="http" url="https://opensso.dev.java.net/public/use/index.html">https://opensso.dev.java.net/public/use/index.html</ulink>.
+ </para>
- </step>
- <step>
- <para>
- Extract the package into a suitable location. This location will be referred to as <filename>OPENSSO_HOME</filename> in this example.
- </para>
+ </step>
+ <step>
+ <para>
+ Extract the package into a suitable location. This location will be referred to as <filename>OPENSSO_HOME</filename> in this example.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- To configure the web server as required, it is simpler to directly modify the source files.
- </para>
- <para>
- The first step is to add the JBoss Enterprise Portal Platform Authentication Plugin.
- </para>
- <para>
- The plugin makes secure callbacks to a RESTful service installed on the remote JBoss Enterprise Portal Platform server to authenticate a user.
- </para>
- <para>
- In order for the plugin to function correctly, it needs to be properly configured to connect to this service. This configuration is done via the <filename>opensso.war/config/auth/default/AuthenticationPlugin.xml</filename> file.
- </para>
- <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Modifying_OpenSSO_server">
- <title>Modifying OpenSSO server</title>
- <step>
- <para>
- Obtain a copy of Tomcat and extract it into a suitable location. This location will be referred to as <filename>TOMCAT_HOME</filename> in this example.
- </para>
+ </procedure>
+
+ <para>
+ To configure the web server as required, it is simpler to directly modify the source files.
+ </para>
+ <para>
+ The first step is to add the JBoss Enterprise Portal Platform Authentication Plugin.
+ </para>
+ <para>
+ The plugin makes secure callbacks to a RESTful service installed on the remote JBoss Enterprise Portal Platform server to authenticate a user.
+ </para>
+ <para>
+ In order for the plugin to function correctly, it needs to be properly configured to connect to this service. This configuration is done via the <filename>opensso.war/config/auth/default/AuthenticationPlugin.xml</filename> file.
+ </para>
+ <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Modifying_OpenSSO_server">
+ <title>Modifying OpenSSO server</title>
+ <step>
+ <para>
+ Obtain a copy of Tomcat and extract it into a suitable location. This location will be referred to as <filename>TOMCAT_HOME</filename> in this example.
+ </para>
- </step>
- <step>
- <para>
- Edit <filename>TOMCAT_HOME/conf/server.xml</filename> and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform port.
- <note>
- <para>
- If JBoss Enterprise Portal Platform is running on the same machine as Tomcat, other ports need to be changed in addition to 8080 in order to avoid port conflicts. They can be changed to any free port. For example, you can change the admin port from 8005 to 8805 and the AJP port from 8009 to 8809.
- </para>
+ </step>
+ <step>
+ <para>
+ Edit <filename>TOMCAT_HOME/conf/server.xml</filename> and change the 8080 port to 8888 to avoid a conflict with the default JBoss Enterprise Portal Platform port.
+ <note>
+ <para>
+ If JBoss Enterprise Portal Platform is running on the same machine as Tomcat, other ports need to be changed in addition to 8080 in order to avoid port conflicts. They can be changed to any free port. For example, you can change the admin port from 8005 to 8805 and the AJP port from 8009 to 8809.
+ </para>
- </note>
+ </note>
- </para>
+ </para>
- </step>
- <step>
- <para>
- Ensure the <filename>TOMCAT_HOME/webapps/opensso/config/auth/default/AuthenticationPlugin.xml</filename> file matches the following:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Ensure the <filename>TOMCAT_HOME/webapps/opensso/config/auth/default/AuthenticationPlugin.xml</filename> file matches the following:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default117.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Copy the following files;
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/sso-opensso-plugin-<VERSION>.jar</filename>
- </para>
+ </step>
+ <step>
+ <para>
+ Copy the following files;
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/sso-opensso-plugin-<VERSION>.jar</filename>
+ </para>
- </listitem>
- <listitem>
- <para>
- <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar</filename>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar</filename>
+ </para>
- </listitem>
- <listitem>
- <para>
- <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/commons-logging-<VERSION>.jar</filename>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/lib/commons-logging-<VERSION>.jar</filename>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- ...into the Tomcat directory at <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/lib</filename>.
- </para>
+ </itemizedlist>
+ <para>
+ ...into the Tomcat directory at <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/lib</filename>.
+ </para>
- </step>
- <step>
- <para>
- Copy the <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/classes/gatein.properties</filename> file into the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/classes</filename> directory.
- </para>
+ </step>
+ <step>
+ <para>
+ Copy the <filename><replaceable>PORTAL_SSO</replaceable>/opensso/plugin/WEB-INF/classes/gatein.properties</filename> file into the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/classes</filename> directory.
+ </para>
- </step>
- <step>
- <para>
- Tomcat should start and be able to access <ulink type="http" url="http://localhost:8888/opensso/UI/Login?realm=gatein">http://localhost:8888/opensso/UI/Login?realm=gatein</ulink>.
- </para>
- <mediaobject>
- <imageobject role="html">
- <imagedata align="center" fileref="images/AuthenticationAndIdentity/SSO/opensso-shot.png" format="PNG" scale="110" width="444" />
- </imageobject>
- <imageobject role="fo">
- <imagedata align="center" contentwidth="150mm" fileref="images/AuthenticationAndIdentity/SSO/opensso-shot.png" format="PNG" width="444" />
- </imageobject>
+ </step>
+ <step>
+ <para>
+ Tomcat should start and be able to access <ulink type="http" url="http://localhost:8888/opensso/UI/Login?realm=gatein">http://localhost:8888/opensso/UI/Login?realm=gatein</ulink>.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/AuthenticationAndIdentity/SSO/opensso-shot.png" format="PNG" scale="110" width="444" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata align="center" contentwidth="150mm" fileref="images/AuthenticationAndIdentity/SSO/opensso-shot.png" format="PNG" width="444" />
+ </imageobject>
- </mediaobject>
- <note>
- <para>
- Login will not be available at this point.
- </para>
+ </mediaobject>
+ <note>
+ <para>
+ Login will not be available at this point.
+ </para>
- </note>
+ </note>
- </step>
+ </step>
- </procedure>
-
- <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Configure_the_gatein_realm">
- <title>Configure the "gatein" realm</title>
- <step>
- <para>
- Direct your browser to <ulink type="http" url="http://localhost:8888/opensso">http://localhost:8888/opensso</ulink>
- </para>
+ </procedure>
+
+ <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Configure_the_gatein_realm">
+ <title>Configure the "gatein" realm</title>
+ <step>
+ <para>
+ Direct your browser to <ulink type="http" url="http://localhost:8888/opensso">http://localhost:8888/opensso</ulink>
+ </para>
- </step>
- <step>
- <para>
- Create a default configuration.
- </para>
+ </step>
+ <step>
+ <para>
+ Create a default configuration.
+ </para>
- </step>
- <step>
- <para>
- Login as <literal>admin</literal>.
- </para>
- <important>
- <para>
- Go to the "<emphasis role="bold">Configuration</emphasis>" tab then to "<emphasis role="bold">Authentication</emphasis>".
- </para>
- <para>
- Follow the link to "<emphasis role="bold">Core</emphasis>" and add a new value with the class name "<literal>org.gatein.sso.opensso.plugin.AuthenticationPlugin</literal>".
- </para>
- <para>
- If this is not done <literal>AuthenticationPlugin</literal> is not available among other OpenSSO authentication modules.
- </para>
+ </step>
+ <step>
+ <para>
+ Login as <literal>admin</literal>.
+ </para>
+ <important>
+ <para>
+ Go to the "<emphasis role="bold">Configuration</emphasis>" tab then to "<emphasis role="bold">Authentication</emphasis>".
+ </para>
+ <para>
+ Follow the link to "<emphasis role="bold">Core</emphasis>" and add a new value with the class name "<literal>org.gatein.sso.opensso.plugin.AuthenticationPlugin</literal>".
+ </para>
+ <para>
+ If this is not done <literal>AuthenticationPlugin</literal> is not available among other OpenSSO authentication modules.
+ </para>
- </important>
+ </important>
- </step>
- <step>
- <para>
- Go to the "<emphasis role="bold">Access control</emphasis>" tab and create new realm called "<literal>gatein</literal>".
- </para>
+ </step>
+ <step>
+ <para>
+ Go to the "<emphasis role="bold">Access control</emphasis>" tab and create new realm called "<literal>gatein</literal>".
+ </para>
- </step>
- <step>
- <procedure>
- <step>
- <para>
- Go to the new "<literal>gatein</literal>" realm and click on the "<emphasis role="bold">Authentication</emphasis>" tab.
- </para>
+ </step>
+ <step>
+ <procedure>
+ <step>
+ <para>
+ Go to the new "<literal>gatein</literal>" realm and click on the "<emphasis role="bold">Authentication</emphasis>" tab.
+ </para>
- </step>
- <step>
- <para>
- Click on "<emphasis role="bold">ldapService</emphasis>" (at the bottom in the "Authentication chaining" section).
- </para>
+ </step>
+ <step>
+ <para>
+ Click on "<emphasis role="bold">ldapService</emphasis>" (at the bottom in the "Authentication chaining" section).
+ </para>
- </step>
- <step>
- <para>
- Change the selection from "<literal>Datastore</literal>", which is the default module in the authentication chain, to "<literal>AuthenticationPlugin</literal>".
- </para>
+ </step>
+ <step>
+ <para>
+ Change the selection from "<literal>Datastore</literal>", which is the default module in the authentication chain, to "<literal>AuthenticationPlugin</literal>".
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- These changes enable authentication of the "<literal>gatein</literal>" realm using the <literal>GateIn REST</literal> service instead of the OpenSSO LDAP server.
- </para>
+ </procedure>
+
+ <para>
+ These changes enable authentication of the "<literal>gatein</literal>" realm using the <literal>GateIn REST</literal> service instead of the OpenSSO LDAP server.
+ </para>
- </step>
- <step>
- <para>
- Go to "<emphasis role="bold">Advanced properties</emphasis>" and change <literal>UserProfile</literal> from "<parameter>Required</parameter>" to "<parameter>Dynamic</parameter>" to ensure all new users are automatically created in the OpenSSO datastore after successful authentication.
- </para>
+ </step>
+ <step>
+ <para>
+ Go to "<emphasis role="bold">Advanced properties</emphasis>" and change <literal>UserProfile</literal> from "<parameter>Required</parameter>" to "<parameter>Dynamic</parameter>" to ensure all new users are automatically created in the OpenSSO datastore after successful authentication.
+ </para>
- </step>
- <step>
- <para>
- Increase the user privileges to allow REST access with the following procedure:
- </para>
- <procedure>
- <step>
- <para>
- Go to "<emphasis role="bold">Access control</emphasis>", then <emphasis role="bold">Top level realm</emphasis>, then click on the "<emphasis role="bold">Privileges</emphasis>" tab and go to "<emphasis role="bold">All authenticated users</emphasis>".
- </para>
+ </step>
+ <step>
+ <para>
+ Increase the user privileges to allow REST access with the following procedure:
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Go to "<emphasis role="bold">Access control</emphasis>", then <emphasis role="bold">Top level realm</emphasis>, then click on the "<emphasis role="bold">Privileges</emphasis>" tab and go to "<emphasis role="bold">All authenticated users</emphasis>".
+ </para>
- </step>
- <step>
- <para>
- Check the last two checkboxes:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Read and write access only for policy properties
- </para>
+ </step>
+ <step>
+ <para>
+ Check the last two checkboxes:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Read and write access only for policy properties
+ </para>
- </listitem>
- <listitem>
- <para>
- Read and write access to all realm and policy properties
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Read and write access to all realm and policy properties
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
- <step>
- <para>
- Repeat step 7 for the '<literal>gatein</literal>' realm as well.
- </para>
+ </step>
+ <step>
+ <para>
+ Repeat step 7 for the '<literal>gatein</literal>' realm as well.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <!-- <para>
+ </procedure>
+
+ <!-- <para>
TODO: The above OpenSSO manual configuration could be replaced by configuration files prepared in advance
</para> --> <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Setup_the_OpenSSO_client">
- <title>Setup the OpenSSO client</title>
- <step>
- <para>
- Copy all libraries from the <filename><replaceable>PORTAL_SSO</replaceable>/opensso/gatein.ear/lib</filename> directory into the <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename> directory.
- </para>
- <para>
- Alternatively, in a Tomcat environment, copy the libraries into the <filename>GATEIN_HOME/lib</filename> directory.
- </para>
+ <title>Setup the OpenSSO client</title>
+ <step>
+ <para>
+ Copy all libraries from the <filename><replaceable>PORTAL_SSO</replaceable>/opensso/gatein.ear/lib</filename> directory into the <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename> directory.
+ </para>
+ <para>
+ Alternatively, in a Tomcat environment, copy the libraries into the <filename>GATEIN_HOME/lib</filename> directory.
+ </para>
- </step>
- <step>
- <para>
- Edit the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Edit the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default118.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Test the installation:
- </para>
- <procedure>
- <step>
- <para>
- Access JBoss Enterprise Portal Platform by going to <ulink type="http" url="http://localhost:8888/opensso/UI/Login?realm=gatein">http://localhost:8888/opensso/UI/Login?realm=gatein</ulink> (assuming that the OpenSSO server using Tomcat is still running).
- </para>
+ </step>
+ <step>
+ <para>
+ Test the installation:
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Access JBoss Enterprise Portal Platform by going to <ulink type="http" url="http://localhost:8888/opensso/UI/Login?realm=gatein">http://localhost:8888/opensso/UI/Login?realm=gatein</ulink> (assuming that the OpenSSO server using Tomcat is still running).
+ </para>
- </step>
- <step>
- <para>
- Login with the username <literal>root</literal> and the password <literal>gtn</literal> or any account created through the portal.
- </para>
+ </step>
+ <step>
+ <para>
+ Login with the username <literal>root</literal> and the password <literal>gtn</literal> or any account created through the portal.
+ </para>
- </step>
+ </step>
- </procedure>
-
+ </procedure>
+
- </step>
+ </step>
- </procedure>
-
- <para>
- The next part of the process is to redirect all user authentication to the OpenSSO server.
- </para>
- <para>
- Information about where the OpenSSO server is hosted must be properly configured within the Enterprise Portal Platform instance. The required configuration is done by modifying three files:
- </para>
- <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Setup_the_portal_to_redirect_to_OpenSSO">
- <title>Setup the portal to redirect to OpenSSO</title>
- <step>
- <para>
- Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file as follows:
- </para>
-
+ </procedure>
+
+ <para>
+ The next part of the process is to redirect all user authentication to the OpenSSO server.
+ </para>
+ <para>
+ Information about where the OpenSSO server is hosted must be properly configured within the Enterprise Portal Platform instance. The required configuration is done by modifying three files:
+ </para>
+ <procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Setup_the_portal_to_redirect_to_OpenSSO">
+ <title>Setup the portal to redirect to OpenSSO</title>
+ <step>
+ <para>
+ Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename><replaceable><JBOSS_HOME></replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtml</filename> file as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default119.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename>gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Modify the '<emphasis role="bold">Sign In</emphasis>' link in the <filename>gatein.ear/web.war/groovy/portal/webui/component/UILogoPortlet.gtmpl</filename> file as follows:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default120.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the entire contents of <filename>gatein.ear/02portal.war/login/jsp/login.jsp</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default121.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Add the following Filters to the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Add the following Filters to the top of the filter chain in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename>:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default122.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Replace the <literal>InitiateLoginServlet</literal> declaration in <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> with:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default123.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
+ </step>
- </procedure>
-
- <para>
- From now on, all links redirecting to the user authentication pages will redirect to the OpenSSO centralized authentication form.
- </para>
+ </procedure>
+
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to the OpenSSO centralized authentication form.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-SSO_Single_Sign_On-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism">
- <title>SPNEGO - Simple and Protected GSSAPI Negotiation Mechanism</title>
- <para>
- The Simple and Protected GSSAPI Negotiation Mechanism (<emphasis role="bold">SPNEGO</emphasis>) uses desktop credentials provided during a desktop login to transparently authenticate a portal user through a web browser.
- </para>
- <para>
- For illustrative purposes; a typical use case would be:
- </para>
- <procedure>
- <step>
- <para>
- A user logs into their desktop computer with a login that is governed by an Active Directory domain.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-SSO_Single_Sign_On-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism">
+ <title>SPNEGO - Simple and Protected GSSAPI Negotiation Mechanism</title>
+ <para>
+ The Simple and Protected GSSAPI Negotiation Mechanism (<emphasis role="bold">SPNEGO</emphasis>) uses desktop credentials provided during a desktop login to transparently authenticate a portal user through a web browser.
+ </para>
+ <para>
+ For illustrative purposes; a typical use case would be:
+ </para>
+ <procedure>
+ <step>
+ <para>
+ A user logs into their desktop computer with a login that is governed by an Active Directory domain.
+ </para>
- </step>
- <step>
- <para>
- The user then launches a web browser to access a web application (that uses JBoss Negotiation) hosted on JBoss Enterprise Portal Platform.
- </para>
+ </step>
+ <step>
+ <para>
+ The user then launches a web browser to access a web application (that uses JBoss Negotiation) hosted on JBoss Enterprise Portal Platform.
+ </para>
- </step>
- <step>
- <para>
- The browser transfers the desktop credentials to the web application.
- </para>
+ </step>
+ <step>
+ <para>
+ The browser transfers the desktop credentials to the web application.
+ </para>
- </step>
- <step>
- <para>
- JBoss EAP/AS uses background GSS messages with the Active Directory (or any Kerberos Server) to validate the user.
- </para>
+ </step>
+ <step>
+ <para>
+ JBoss EAP/AS uses background GSS messages with the Active Directory (or any Kerberos Server) to validate the user.
+ </para>
- </step>
- <step>
- <para>
- The user experiences a seamless single sign on (SSO) into the web application.
- </para>
+ </step>
+ <step>
+ <para>
+ The user experiences a seamless single sign on (SSO) into the web application.
+ </para>
- </step>
+ </step>
- </procedure>
-
- <para>
- JBoss Enterprise Portal Platform uses JBoss Negotiation to enable SPNEGO-based desktop SSO.
- </para>
- <para>
- The following procedure outlines how to integrate SPNEGO with the JBoss Enterprise Portal Platform.
- </para>
- <procedure id="proc-Reference_Guide-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism-SPNEGO_Configuration">
- <title>SPNEGO Configuration</title>
- <step>
- <para>
- Activate the Host authentication. Add the following host login module to the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/conf/login-config.xml</filename>:
- </para>
-
+ </procedure>
+
+ <para>
+ JBoss Enterprise Portal Platform uses JBoss Negotiation to enable SPNEGO-based desktop SSO.
+ </para>
+ <para>
+ The following procedure outlines how to integrate SPNEGO with the JBoss Enterprise Portal Platform.
+ </para>
+ <procedure id="proc-Reference_Guide-SPNEGO_Simple_and_Protected_GSSAPI_Negotiation_Mechanism-SPNEGO_Configuration">
+ <title>SPNEGO Configuration</title>
+ <step>
+ <para>
+ Activate the Host authentication. Add the following host login module to the <filename>jboss-as/server/<replaceable>PROFILE</replaceable>/conf/login-config.xml</filename>:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default124.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The '<literal>keyTab</literal>' value should point to the keytab file that was generated by the <literal>kadmin</literal> Kerberos tool. See the <ulink type="http" url="http://community.jboss.org/wiki/SettingupyourKerberosDevelopmentEnvironment">Setting up your Kerberos Development Environment</ulink> guide for more details.
- </para>
+ <para>
+ The '<literal>keyTab</literal>' value should point to the keytab file that was generated by the <literal>kadmin</literal> Kerberos tool. See the <ulink type="http" url="http://community.jboss.org/wiki/SettingupyourKerberosDevelopmentEnvironment">Setting up your Kerberos Development Environment</ulink> guide for more details.
+ </para>
- </step>
- <step>
- <para>
- Extend the core authentication mechanisms to support SPNEGO. Under <filename>deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml</filename>, add a '<literal>SPNEGO</literal>' authenticators property
- </para>
-
+ </step>
+ <step>
+ <para>
+ Extend the core authentication mechanisms to support SPNEGO. Under <filename>deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml</filename>, add a '<literal>SPNEGO</literal>' authenticators property
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default125.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </step>
- <step>
- <para>
- Add the Gatein SSO module binaries by adding <filename><replaceable>PORTAL_SSO</replaceable>/spnego/gatein.ear/lib/sso-agent.jar</filename> and <filename><replaceable>PORTAL_SSO</replaceable>/spnego/gatein.ear/lib/spnego-<replaceable>VERSION</replaceable>-epp-GA.jar</filename> to <filename>deploy/gatein.ear/lib</filename>.
- </para>
+ </step>
+ <step>
+ <para>
+ Add the Gatein SSO module binaries by adding <filename><replaceable>PORTAL_SSO</replaceable>/spnego/gatein.ear/lib/sso-agent.jar</filename> and <filename><replaceable>PORTAL_SSO</replaceable>/spnego/gatein.ear/lib/spnego-<replaceable>VERSION</replaceable>-epp-GA.jar</filename> to <filename>deploy/gatein.ear/lib</filename>.
+ </para>
- </step>
- <step>
- <para>
- Modifying <filename>deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> to match the following:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Modifying <filename>deploy/gatein.ear/META-INF/gatein-jboss-beans.xml</filename> to match the following:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default126.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- This activates the SPNEGO <literal>LoginModule</literal> for use with JBoss Enterprise Portal Platform.
- </para>
+ <para>
+ This activates the SPNEGO <literal>LoginModule</literal> for use with JBoss Enterprise Portal Platform.
+ </para>
- </step>
- <step>
- <para>
- Modify <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> to match:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Modify <filename>gatein.ear/02portal.war/WEB-INF/web.xml</filename> to match:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default127.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- This integrates SPNEGO support into the Portal web archive by switching authentication mechanism from the default "<literal>FORM</literal>"-based to "<literal>SPNEGO</literal>"-based authentication.
- </para>
+ <para>
+ This integrates SPNEGO support into the Portal web archive by switching authentication mechanism from the default "<literal>FORM</literal>"-based to "<literal>SPNEGO</literal>"-based authentication.
+ </para>
- </step>
- <step>
- <para>
- Add the following filters to the top of the Filter chain in the <filename>web.xml</filename> file:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Add the following filters to the top of the Filter chain in the <filename>web.xml</filename> file:
+ </para>
+
<programlisting language="XML" role="XML"><xi:include href="../../extras/Authentication_Identity_SSO/default128.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- This integrates request pre-processing needed for SPNEGO.
- </para>
+ <para>
+ This integrates request pre-processing needed for SPNEGO.
+ </para>
- </step>
- <step>
- <para>
- Edit the '<emphasis role="bold">Sign In</emphasis>' link in <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</filename> to match the following:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Edit the '<emphasis role="bold">Sign In</emphasis>' link in <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</filename> to match the following:
+ </para>
+
<programlisting language="Java" role="Java"><xi:include href="../../extras/Authentication_Identity_SSO/default129.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- This modifies the Portal's '<emphasis role="bold">Sign In</emphasis>' link to perform SPNEGO authentication.
- </para>
+ <para>
+ This modifies the Portal's '<emphasis role="bold">Sign In</emphasis>' link to perform SPNEGO authentication.
+ </para>
- </step>
- <step>
- <para>
- Start the JBoss Enterprise Portal Platform;
- </para>
-
+ </step>
+ <step>
+ <para>
+ Start the JBoss Enterprise Portal Platform;
+ </para>
+
<programlisting language="Java" role="Java"><xi:include href="../../extras/Authentication_Identity_SSO/default130.java" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <para>
- The <replaceable>PROFILE</replaceable> parameter in the above command should be replaced with the server profile modified with the above configuration.
- </para>
+ <para>
+ The <replaceable>PROFILE</replaceable> parameter in the above command should be replaced with the server profile modified with the above configuration.
+ </para>
- </step>
- <step>
- <para>
- Login to Kerberos:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Login to Kerberos:
+ </para>
+
<programlisting>kinit -A demo
</programlisting>
- </step>
+ </step>
- </procedure>
-
- <para>
- Clicking the 'Sign In' link on the JBoss Enterprise Portal Platform should automatically sign the 'demo' user into the portal.
- </para>
+ </procedure>
+
+ <para>
+ Clicking the 'Sign In' link on the JBoss Enterprise Portal Platform should automatically sign the 'demo' user into the portal.
+ </para>
- </section>
-
+ </section>
+
</section>
13 years, 3 months
gatein SVN: r7510 - in epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR: jcr-with-gtn and 1 other directory.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-09-27 00:42:42 -0400 (Tue, 27 Sep 2011)
New Revision: 7510
Removed:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
Modified:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gatein.xml
Log:
Removed How to extend GateIn section
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gatein.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gatein.xml 2011-09-27 04:40:31 UTC (rev 7509)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gatein.xml 2011-09-27 04:42:42 UTC (rev 7510)
@@ -4,9 +4,9 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-eXo_JCR_with_GateIn">
- <title>eXo JCR with GateIn</title>
- <xi:include href="jcr-with-gtn/how-to-extend-my-gatein-instance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="jcr-with-gtn/managed-datasources-under-jboss-as.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <title>eXo JCR with GateIn</title>
+ <!--<xi:include href="jcr-with-gtn/how-to-extend-my-gatein-instance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
+ <xi:include href="jcr-with-gtn/managed-datasources-under-jboss-as.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
Deleted: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-09-27 04:40:31 UTC (rev 7509)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-09-27 04:42:42 UTC (rev 7510)
@@ -1,2242 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance">
- <title>How to extend my GateIn instance?</title>
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Introduction">
- <title>Introduction</title>
- <section id="sect-Reference_Guide-Introduction-Overview">
- <title>Overview</title>
- <para>
- Since GateIn beta 2, we added a set of features in order to customize a GateIn instance without modifying the GateIn binary, this usecase will be called <emphasis>portal extension</emphasis> in this documentation. Those features are also required to be able to launch several portal instances at the same time, in "eXo terminology" that means to have several "portal.war".
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Introduction-Motivations">
- <title>Motivations</title>
- <para>
- Up to now, to create an application over an eXo portal such as DMS, WCM, CS and KS, we need to modify files into the "portal.war". This has many painful consequences, such as:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- It is quite hard to manage from the support point of view since we never know if or how the customer changed his eXo product.
- </para>
-
- </listitem>
- <listitem>
- <para>
- It is hard to be able to package several eXo products (WCM, CS...) as we need to merge everything manually which is quite error prone.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- Finally, at the very beginning, eXo was developed to be able to support several portal instances (which also means several portal containers) but with the time several bad practices made it impossible. So it was important to review the whole code base in order to help/enforce all the GateIn developers to follow the "good practices".
- </para>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Prerequisites">
- <title>Prerequisites</title>
- <para>
- To be able to migrate an application to GateIn, the first thing we need to do is to ensure that our application supports properly several portal container instances. The following section aims to help you to be compatible with GateIn.
- </para>
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_portal_container_name_i.e._portal">
- <title>Removing all the hard coded portal container name (i.e. "portal")</title>
- <para>
- Now if we need to get the portal container name we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getPortalContainerName()</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentPortalContainerName()</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- In js files, you can use the variable <emphasis>currentContext</emphasis> if your script must be loaded before the variable <emphasis>eXo.env.server.context</emphasis>, otherwise use <emphasis>eXo.env.server.context</emphasis> instead.
- </para>
-
- </listitem>
- <listitem>
- <para>
- In jsp files, you can use <emphasis>request.getContextPath()</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_rest_context_name_i.e._rest">
- <title>Removing all the hard coded rest context name (i.e. "rest")</title>
- <para>
- Now if we need to get the rest context name we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRestContextName()</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRestContextName()</emphasis>
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_realm_name_i.e._exo_domain">
- <title>Removing all the hard coded realm name (i.e. "exo-domain")</title>
- <para>
- Now if we need to get the realm name we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRealmName()</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRealmName()</emphasis>
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_Http_Filters_compatible">
- <title>Making your Http Filters compatible</title>
- <para>
- Now all your Http Filters that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractFilter</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpServlets_compatible">
- <title>Making your HttpServlets compatible</title>
- <para>
- Now all your HttpServlets that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis>. This abstract class will ensure that the environment has been properly set, so you will be able to call the usual methods such as <emphasis>PortalContainer.getInstance()</emphasis>.
- </para>
- <para>
- If you had to implement the method <emphasis>service(HttpServletRequest req, HttpServletResponse res)</emphasis>, now you will need to implement <emphasis>onService(ExoContainer container, HttpServletRequest req, HttpServletResponse res)</emphasis>, this method will directly give you the current <emphasis>ExoContainer</emphasis> in its signature.
- </para>
- <important>
- <title>Useful Information</title>
- <para>
- In the class <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis> you have a method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis>, <emphasis>ClassLoader</emphasis> and <emphasis>ServletContext</emphasis>) before executing the servlet. This value should return true when the servlet is executed within the web application of a portal container. By default, it checks if the name of the current <emphasis>ServletContext</emphasis> is a portal container name, it is sufficient in most of cases but you can still overload this method if you already know that the servlet will always been executed within the web application of portal container (i.e. the method always return true) or will never be executed within the web application of a portal container (i.e. the method always return false) .
- </para>
-
- </important>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpSessionListeners_compatible">
- <title>Making your HttpSessionListeners compatible</title>
- <para>
- Now all your HttpSessionListeners that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpSessionListener</emphasis>. This abstract class will give you the current <emphasis>ExoContainer</emphasis> directly in the signature of the methods to implement which are _ onSessionCreated(ExoContainer container, HttpSessionEvent event)\_ and <emphasis>onSessionDestroyed(ExoContainer container, HttpSessionEvent event)</emphasis>
- </para>
- <para>
- You will also need to implement the method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis> and <emphasis>ClassLoader</emphasis>) before processing the event. This value should return true when the event is processed within the web application of a portal container.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Use_init_tasks_if_you_need_a_PortalContainer_to_initialize_an_Http_Filter_or_an_HttpServlet">
- <title>Use init tasks if you need a PortalContainer to initialize an Http Filter or an HttpServlet</title>
- <para>
- If your Http <emphasis>Filter</emphasis> or your <emphasis>HttpServlet</emphasis> requires a PortalContainer to initialize, you need to convert your code in order to launch the code responsible for the initialization in the method <emphasis>onAlreadyExists</emphasis> of an <emphasis>org.exoplatform.container.RootContainer.PortalContainerInitTask</emphasis>.
- </para>
- <para>
- We need to rely on init tasks, in order to be sure that the portal container is at the right state when the task is executed, in other words the task could be delayed if you try to execute it too early. Each task is linked to a web application, so when we add a new task, we first retrieve all the portal containers that depend on this web application according to the <emphasis>PortalContainerDefinitions</emphasis>, and for each container we add the task in a sorted queue which order is in fact the order of the web applications dependencies defined in the <emphasis>PortalContainerDefinition</emphasis>. If no <emphasis>PortalContainerDefinition</emphasis> can be found we execute synchronously the task which is in fact the old behavior (i.e. without the starter).
- </para>
- <para>
- The supported init tasks are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPreInitTask</emphasis> which are executed before the portal container has been initialized
- </para>
-
- </listitem>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis> which are executed after the portal container has been initialized
- </para>
-
- </listitem>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostCreateTask</emphasis> which are executed after the portal container has been fully created (i.e. after all the post init tasks).
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- An init task is defined as below:
- </para>
- <note>
- <title>PortalContainerPreInitTask</title>
-
-<programlisting language="Java" role="Java"> /**
- * This interface is used to define a task that needs to be launched at a given state during the
- * initialization of a portal container
- */
- public static interface PortalContainerInitTask
- {
-
- /**
- * This method allows the implementation to define what the state "already exists"
- * means for a portal container
- *
- * @param portalContainer the value of the current portal container
- * @return <code>true</code> if the portal container exists according to the task
- * requirements, <code>false</code> otherwise
- */
- public boolean alreadyExists(PortalContainer portalContainer);
-
- /**
- * This method is called if the related portal container has already been registered
- *
- * @param context the servlet context of the web application
- * @param portalContainer the value of the current portal container
- */
- public void onAlreadyExists(ServletContext context, PortalContainer portalContainer);
-
- /**
- * Executes the task
- *
- * @param context the servlet context of the web application
- * @param container The portal container on which we would like to execute the task
- */
- public void execute(ServletContext context, PortalContainer portalContainer);
-
- /**
- * @return the type of the task
- */
- public String getType();
- }</programlisting>
-
- </note>
- <para>
- To add a task, you can either call:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on all the portal containers that depend on the given <emphasis>ServletContext</emphasis> according to the <emphasis>PortalContainerDefinitions</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task, String portalContainerName)</emphasis> in order to execute the task on a given portal container.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>RootContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on the portal container which name is the name of the given <emphasis>ServletContext</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- We will take for example the class <emphasis>GadgetRegister</emphasis> that is used to register new google gadgets on a given portal container.
- </para>
- <para>
- <emphasis role="underline">The old code was:</emphasis>
- </para>
- <note>
- <title>Old GadgetRegister.java</title>
-
-<programlisting language="Java" role="Java">...
-public class GadgetRegister implements ServletContextListener
-{
-...
- public void contextInitialized(ServletContextEvent event)
- {
- try
- {
- ExoContainer pcontainer = ExoContainerContext.getContainerByName("portal") ;
- SourceStorage sourceStorage = (SourceStorage)pcontainer.getComponentInstanceOfType(SourceStorage.class);
- ...
- }
- ...
-}</programlisting>
-
- </note>
- <para>
- The new code relies on a <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis>, as you can see below
- </para>
- <note>
- <title>New GadgetRegister.java</title>
-
-<programlisting language="Java" role="Java">...
-public class GadgetRegister implements ServletContextListener {
-...
- public void contextInitialized(ServletContextEvent event)
- {
- // Create a new post init task
- final PortalContainerPostInitTask task = new PortalContainerPostInitTask()
- {
-
- public void execute(ServletContext context, PortalContainer portalContainer)
- {
- contextInitialized(context, portalContainer);
- }
- };
- // Add the init task to all the related portal containers
- PortalContainer.addInitTask(event.getServletContext(), task);
- }
-
- private void contextInitialized(ServletContext context, PortalContainer pcontainer)
- {
- try
- {
- SourceStorage sourceStorage = (SourceStorage)pcontainer.getComponentInstanceOfType(SourceStorage.class);
- ...
- }
- ...
-}</programlisting>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_LoginModules_compatible">
- <title>Making your LoginModules compatible</title>
- <para>
- Now all your LoginModules that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
- </para>
- <important>
- <title>Useful Information</title>
- <para>
- The class <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis> supports 2 login module options which are <emphasis>portalContainerName</emphasis> and <emphasis>realmName</emphasis>, to allow you to indicate the realm name and the portal container name, if you want to change the default value.
- </para>
-
- </important>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Avoiding_static_modifier_on_component_dependency">
- <title>Avoiding <emphasis>static</emphasis> modifier on component dependency</title>
- <para>
- A local variable that stores a component dependency must not be static. In other words, when you create a component A that depends on component B, we don't store B in a static variable of A otherwise we cannot have several different instances of A in the same JVM which is not compatible with a multi-portal instance.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Avoid_component_initialization_based_on_component_dependency_in_the_constructor">
- <title>Avoid component initialization based on component dependency in the constructor</title>
- <para>
- We will have more and more extensible components (i.e. that can be extended thanks to an external plugin) which means that those components can only be initialized in the <emphasis>start</emphasis> method, thus it is not a good practice to initialize a component in its constructor if this initialization uses other components because those components may not be initialized. For example, now the ResourceBundleService is extensible, so if you create a component that depends on the ResourceBundleService and you need the ResourceBundleService to initialize your component, your component will need to be "Startable" and you will have to initialize your component in a <emphasis>start</emphasis> method.
- </para>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-FAQ">
- <title>FAQ</title>
- <section id="sect-Reference_Guide-FAQ-What_has_changed_since_the_previous_versions">
- <title>What has changed since the previous versions?</title>
- <para>
- The main difference with previous versions is the way to package your application, in the previous versions you had to change the content of the file <emphasis>portal.war</emphasis> in order to customize the portal. Now we more consider your application as an add-on that you can packaged in another ear/war file. You just need to follow some rules in order to notify the platform that it must take into account your add-on in order to customize the portal.
- </para>
- <para>
- Among other things, you will have to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Indicate the platform how to initialize and manage your application by defining and registering the <emphasis>PortalContainerDefinition</emphasis> related to your portal instance.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Deploy the <emphasis>starter</emphasis> ear/war file that is used to create and start all the portals (i.e. portal containers).
- </para>
-
- </listitem>
-
- </itemizedlist>
- <warning>
- <title>Warning</title>
- <para>
- Please take into account, that you need to ensure that the <emphasis>starter</emphasis> is launched after all the other ear/war files.
- </para>
-
- </warning>
- <important>
- <title>Nota Bene</title>
- <para>
- If you don't need to customize the portal, you don't have to deploy the starter. The old way to deploy an application is still compatible.
- </para>
-
- </important>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_a_portal_extension">
- <title>What is the main purpose of a <emphasis>portal extension</emphasis>?</title>
- <para>
- An <emphasis>extension</emphasis> is just a set of files that we use to customize or add new features to a given portal. An extension must be the least intrusive as possible, as we could potentially have several extensions for the same portal. In other words, we are supposed to only add what is missing in the portal and avoid changing or duplicated files that are in the portal.war.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_the_starter">
- <title>What is the main purpose of the <emphasis>starter</emphasis>?</title>
- <para>
- The <emphasis>sarter</emphasis> is a web application that has been added to create and start all the portals (i.e. portal containers) at the same time when all the other web applications have already been started. In fact all other web applications can potentially defined several things at startup such as skins, javascripts, google gadgets and configuration files, thus the loading order is important as we can redefine skins or configuration files or a javascript from a web application 1 could depend on another javascript from a web application 2 so if the web application 2 is loaded after the web application 1, we will get errors in the merged javascript file.
- </para>
- <para>
- If a <emphasis>PortalContainerDefinition</emphasis> has been defined, the loading order will be the order that has been used to define the list of dependency. And if you defined a <emphasis>PortalContainerDefinition</emphasis> you need to deploy the starter otherwise the loading order will be the default one (i.e. the loading order of the Application Server)
- </para>
- <para>
- So if you need to customize your portal by adding a new extension and/or a new portal, you need to defined the related <emphasis>PortalContainerDefinitions</emphasis> so you need to deploy also the starter. Otherwise, you don't need to define any <emphasis>PortalContainerDefinition</emphasis> and to deploy the <emphasis>starter</emphasis>.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_a_portal_and_a_portal_container_are_related">
- <title>How a portal and a portal container are related?</title>
- <para>
- Each portal instance has its own portal container which allows the portal to have its own set of components/services. It will ensure the isolation between the different portal instances.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_define_and_register_a_PortalContainerDefinition">
- <title>How to define and register a <emphasis>PortalContainerDefinition</emphasis>?</title>
- <para>
- A <emphasis>PortalContainerDefinition</emphasis> allows you to indicate the platform how it must initialize and manage your portal. In a <emphasis>PortalContainerDefinition</emphasis>, you can define a set of properties, such as:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The name of the portal container
- </para>
-
- </listitem>
- <listitem>
- <para>
- The name of the context name of the rest web application
- </para>
-
- </listitem>
- <listitem>
- <para>
- The name of the realm
- </para>
-
- </listitem>
- <listitem>
- <para>
- The list of all the dependencies of the portal container ordered by priority
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- You can define and register a <emphasis>PortalContainerDefinition</emphasis> thanks to an external plugin that has to be treated at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details, please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
- </para>
- <para>
- <emphasis role="underline">See below an example of configuration file that define and register a PortalContainerDefinition:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the PortalContainerConfig -->
- <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Add PortalContainer Definitions</name>
- <!-- The name of the method to call on the PortalContainerConfig in order to register the PortalContainerDefinitions -->
- <set-method>registerPlugin</set-method>
- <!-- The full qualified name of the PortalContainerDefinitionPlugin -->
- <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
- <init-params>
- <object-param>
- <name>portal</name>
- <object type="org.exoplatform.container.definition.PortalContainerDefinition">
- <!-- The name of the portal container -->
- <field name="name"><string>portal</string></field>
- <!-- The name of the context name of the rest web application -->
- <field name="restContextName"><string>rest</string></field>
- <!-- The name of the realm -->
- <field name="realmName"><string>exo-domain</string></field>
- <!-- All the dependencies of the portal container ordered by loading priority -->
- <field name="dependencies">
- <collection type="java.util.ArrayList">
- <value>
- <string>eXoResources</string>
- </value>
- <value>
- <string>portal</string>
- </value>
- <value>
- <string>dashboard</string>
- </value>
- <value>
- <string>exoadmin</string>
- </value>
- <value>
- <string>eXoGadgets</string>
- </value>
- <value>
- <string>eXoGadgetServer</string>
- </value>
- <value>
- <string>rest</string>
- </value>
- <value>
- <string>web</string>
- </value>
- <value>
- <string>wsrp-producer</string>
- </value>
- <value>
- <string>sample-ext</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
- <para>
- In the previous example, we define a portal container called "portal", which rest context name is "rest", which realm name is "exo-domain" and which dependencies are the web applications "eXoResources", "portal"... The platform will load first "eXoResources", then "portal" and so on.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_the_platform_interprets_the_dependency_order_defined_into_the_PortalContainerDefinition">
- <title>How the platform interprets the dependency order defined into the PortalContainerDefinition?</title>
- <para>
- The dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> is really crucial since it will be interpreted the same way by several components of the platform. All those components, will consider the 1st element in the list is less important than the second element and so on.
- </para>
- <para>
- <emphasis role="underline">So it is currently used to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Know loading order of all the dependencies
- </para>
-
- </listitem>
- <listitem>
- <para>
- If we have several <emphasis>PortalContainerConfigOwner</emphasis> (see next section for more details about a PortalContainerConfigOwner)
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The ServletContext of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ServletContext (PortalContainer.getPortalContext()) to get a resource, it will try to get the resource in the ServletContext of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
- </para>
-
- </listitem>
- <listitem>
- <para>
- The ClassLoader of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ClassLoader (PortalContainer.getPortalClassLoader()) to get a resource, it will try to get the resource in the ClassLoader of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition">
- <title>How to change the ServletContext name, the realm name and/or the rest context name of my portal without using a PortalContainerDefinition?</title>
- <para>
- To do that you need first to change the default values used by a PortalContainer that has not been defined thanks to a <emphasis>PortalContainerDefinition</emphasis>. Those default values can be modified thanks to a set of init parameters of the component <emphasis>PortalContainerConfig</emphasis>.
- </para>
- <para>
- The component <emphasis>PortalContainerConfig</emphasis> must be registered at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
- </para>
- <para>
- <emphasis role="underline">In the example below we will rename:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The portal name "portal" to "myPortal".
- </para>
-
- </listitem>
- <listitem>
- <para>
- The rest servlet context name "rest" to "myRest".
- </para>
-
- </listitem>
- <listitem>
- <para>
- The realm name "exo-domain" to "my-exo-domain".
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- <emphasis role="underline">See below an example</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <component>
- <!-- The full qualified name of the PortalContainerConfig -->
- <type>org.exoplatform.container.definition.PortalContainerConfig</type>
- <init-params>
- <!-- The name of the default portal container -->
- <value-param>
- <name>default.portal.container</name>
- <value>myPortal</value>
- </value-param>
- <!-- The name of the default rest ServletContext -->
- <value-param>
- <name>default.rest.context</name>
- <value>myRest</value>
- </value-param>
- <!-- The name of the default realm -->
- <value-param>
- <name>default.realm.name</name>
- <value>my-exo-domain</value>
- </value-param>
- </init-params>
- </component>
-</configuration></programlisting>
- <para>
- Once your configuration is ready, you need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "portal.war" by changing the "display-name" (the new value is "myPortal") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "portal.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the "portal.war" to "myPortal.war" (or "02portal.war" to "02myPortal.war")
- </para>
-
- </listitem>
- <listitem>
- <para>
- Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "rest.war" by changing the "display-name" (the new value is "myRest") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "rest.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the "rest.war" to "myRest.war"
- </para>
-
- </listitem>
- <listitem>
- <para>
- If "portal.war" and "rest.war" were embedded into an ear file: Update the file <emphasis>META-INF/application.xml</emphasis> of the file "exoplatform.ear" by remaming "02portal.war" to "02myPortal.war", "portal" to "myPortal", "rest.war" to "myRest.war" and "rest" to "myRest".
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- The end of the process depends on your application server
- </para>
- <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- You need to change the name of the application policy in your file <emphasis>conf/login-config.xml</emphasis> (the new name is "my-exo-domain").
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Update the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> by changing the "path" (the new value is "/myPortal"), the "docBase" (the new value is "myPortal") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> to <emphasis>myPortal.xml</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Update the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> by changing the "path" (the new value is "/myRest"), the "docBase" (the new value is "myRest") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> to <emphasis>myRest.xml</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Change the realm name in the file <emphasis>tomcat/conf/jaas.conf</emphasis> (the new name is "my-exo-domain").
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_configuration_file_to_a_given_portal_from_a_war_file">
- <title>How to add new configuration file to a given portal from a war file?</title>
- <para>
- To indicate the platform that a given web application has configuration file to provide, you need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the servlet context name of this web application as a new dependency in the <emphasis>PortalContainerDefinition</emphasis> of all the portal containers for which you want to share the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- The simple fact to add this Servlet Context Listener, will add the Servlet Context of this web application to the Unified Servlet Context of all the <emphasis>PortalContainers</emphasis> that depend on this web application according to their <emphasis>PortalContainerDefinition</emphasis>.
- </para>
- <important>
- <title>Useful Information #1</title>
- <para>
- The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
-
- </important>
- <important>
- <title>Useful Information #2</title>
- <para>
- A portal is implicitly considered as a <emphasis>PortalContainerConfigOwner</emphasis> without having to define the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
- </para>
-
- </important>
- <para>
- See an example of a web.xml below:
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
- <display-name>sample-ext</display-name>
-
- <context-param>
- <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsWorkspace</param-name>
- <param-value>collaboration</param-value>
- <description>Binary assets workspace name</description>
- </context-param>
-
- <context-param>
- <param-name>org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsPath</param-name>
- <param-value>/Digital Assets/</param-value>
- <description>Binary assets path</description>
- </context-param>
-
- <context-param>
- <param-name>CurrentFolder</param-name>
- <param-value>/Digital Assets/</param-value>
- <description>Binary assets workspace name</description>
- </context-param>
-
- <!-- ================================================================== -->
- <!-- RESOURCE FILTER TO CACHE MERGED JAVASCRIPT AND CSS -->
- <!-- ================================================================== -->
- <filter>
- <filter-name>ResourceRequestFilter</filter-name>
- <filter-class>org.exoplatform.portal.application.ResourceRequestFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>ResourceRequestFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
- <!-- ================================================================== -->
- <!-- LISTENER -->
- <!-- ================================================================== -->
- <listener>
- <listener-class>org.exoplatform.container.web.PortalContainerConfigOwner</listener-class>
- </listener>
- <!-- ================================================================== -->
- <!-- SERVLET -->
- <!-- ================================================================== -->
- <servlet>
- <servlet-name>GateInServlet</servlet-name>
- <servlet-class>org.gatein.wci.api.GateInServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
- </servlet>
- <!-- ================================================================= -->
- <servlet-mapping>
- <servlet-name>GateInServlet</servlet-name>
- <url-pattern>/gateinservlet</url-pattern>
- </servlet-mapping>
-</web-app></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_portal_extension">
- <title>How to create/define a portal extension?</title>
- <para>
- A portal extension is in fact a web application declared as a <emphasis>PortalContainerConfigOwner</emphasis> (see previous section for more details about a <emphasis>PortalContainerConfigOwner</emphasis>) that has been added to the dependency list of the <emphasis>PortalContainerDefinition</emphasis> of a given portal.
- </para>
- <para>
- <emphasis role="underline">See below an example of configuration file that add the portal extension "portal-ext" to the dependency list of the portal "portal":</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the PortalContainerConfig -->
- <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Add PortalContainer Definitions</name>
- <!-- The name of the method to call on the PortalContainerConfig in order to register the PortalContainerDefinitions -->
- <set-method>registerPlugin</set-method>
- <!-- The full qualified name of the PortalContainerDefinitionPlugin -->
- <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
- <init-params>
- <object-param>
- <name>portal</name>
- <object type="org.exoplatform.container.definition.PortalContainerDefinition">
- <!-- The name of the portal container -->
- <field name="name"><string>portal</string></field>
- <!-- The name of the context name of the rest web application -->
- <field name="restContextName"><string>rest</string></field>
- <!-- The name of the realm -->
- <field name="realmName"><string>exo-domain</string></field>
- <!-- All the dependencies of the portal container ordered by loading priority -->
- <field name="dependencies">
- <collection type="java.util.ArrayList">
- <value>
- <string>eXoResources</string>
- </value>
- <value>
- <string>portal</string>
- </value>
- <value>
- <string>dashboard</string>
- </value>
- <value>
- <string>exoadmin</string>
- </value>
- <value>
- <string>eXoGadgets</string>
- </value>
- <value>
- <string>eXoGadgetServer</string>
- </value>
- <value>
- <string>rest</string>
- </value>
- <value>
- <string>web</string>
- </value>
- <value>
- <string>wsrp-producer</string>
- </value>
- <!-- The sample-ext has been added at the end of the dependency list in order to have the highest priority towards
- the other web applications and particularly towards "portal" -->
- <value>
- <string>sample-ext</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_portal_extension">
- <title>How to deploy a portal extension?</title>
- <para>
- Refer to <emphasis>How to deploy the sample extension?</emphasis>
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_new_portal">
- <title>How to create/define a new portal?</title>
- <para>
- To duplicate the entire "portal.war" file to create a new portal, you just need to duplicate the following files from the original "portal.war":
- </para>
- <itemizedlist>
- <listitem>
- <para>
- login/jsp/login.jsp
- </para>
-
- </listitem>
- <listitem>
- <para>
- login/skin: You can customize the css files and pictures
- </para>
-
- </listitem>
- <listitem>
- <para>
- bookmark.jsp
- </para>
-
- </listitem>
- <listitem>
- <para>
- favicon.ico: You can replace it by your own logo
- </para>
-
- </listitem>
- <listitem>
- <para>
- index.jsp
- </para>
-
- </listitem>
- <listitem>
- <para>
- portal-unavailable.jsp
- </para>
-
- </listitem>
- <listitem>
- <para>
- portal-warning.jsp
- </para>
-
- </listitem>
- <listitem>
- <para>
- WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
- </para>
-
- </listitem>
- <listitem>
- <para>
- WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- You need also to duplicate the "rest.war" file to create a dedicated rest web application for your portal as we must have one rest web application per portal, in fact you just need to duplicate the following files from the original "rest.war":
- </para>
- <itemizedlist>
- <listitem>
- <para>
- WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
- </para>
-
- </listitem>
- <listitem>
- <para>
- WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- Finally, you need to register and define the corresponding <emphasis>PortalContainerDefinition</emphasis>. The <emphasis>PortalContainerDefinition</emphasis> of your portal will be composed of:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The name of new portal
- </para>
-
- </listitem>
- <listitem>
- <para>
- The name of the context name of the new rest web application
- </para>
-
- </listitem>
- <listitem>
- <para>
- The name of the new realm
- </para>
-
- </listitem>
- <listitem>
- <para>
- The list of all the dependencies of the original portal, with the new name of the rest web application instead of the old name (i.e. "rest") and with a new dependency which is in fact the name of your portal. As we leave the dependency of the original portal in the list of dependencies, it will load the configuration files of original "portal.war" file.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the PortalContainerConfig -->
- <target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Add PortalContainer Definitions</name>
- <!-- The name of the method to call on the PortalContainerConfig in order to register the PortalContainerDefinitions -->
- <set-method>registerPlugin</set-method>
- <!-- The full qualified name of the PortalContainerDefinitionPlugin -->
- <type>org.exoplatform.container.definition.PortalContainerDefinitionPlugin</type>
- <init-params>
- <object-param>
- <name>sample-portal</name>
- <object type="org.exoplatform.container.definition.PortalContainerDefinition">
- <!-- The name of the portal container -->
- <field name="name"><string>sample-portal</string></field>
- <!-- The name of the context name of the rest web application -->
- <field name="restContextName"><string>rest-sample-portal</string></field>
- <!-- The name of the realm -->
- <field name="realmName"><string>exo-domain-sample-portal</string></field>
- <!-- All the dependencies of the portal container ordered by loading priority -->
- <field name="dependencies">
- <collection type="java.util.ArrayList">
- <value>
- <string>eXoResources</string>
- </value>
- <value>
- <string>portal</string>
- </value>
- <value>
- <string>dashboard</string>
- </value>
- <value>
- <string>exoadmin</string>
- </value>
- <value>
- <string>eXoGadgets</string>
- </value>
- <value>
- <string>eXoGadgetServer</string>
- </value>
- <value>
- <string>rest-sample-portal</string>
- </value>
- <value>
- <string>web</string>
- </value>
- <value>
- <string>wsrp-producer</string>
- </value>
- <value>
- <string>sample-portal</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
- <important>
- <title>Useful Information #1</title>
- <para>
- A portal is implicitly a <emphasis>PortalContainerConfigOwner</emphasis> which means that it shares the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>
- </para>
-
- </important>
- <important>
- <title>Useful Information #2</title>
- <para>
- The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
-
- </important>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_new_portal">
- <title>How to deploy a new portal?</title>
- <para>
- Refer to <emphasis>How to deploy the sample portal?</emphasis>
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_import_properly_a_configuration_file_using_the_prefix_war">
- <title>How to import properly a configuration file using the prefix "war:"?</title>
- <para>
- Now, the <emphasis>ConfigurationManager</emphasis> uses by default the unified servlet context of the portal in order to get any resources in particular the configuration files. The unified servlet context is aware of the priorities that has been set in the <emphasis>PortalContainerDefinition</emphasis> of the portal. In other words, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
- <para>
- So, in order to avoid issues when we would like to package several products at the same time (i.e. WCM, DMS, CS, KS), we need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Avoid the best you can to redefine a configuration file from the "portal.war" by using the exact same path (like the previous example)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add your configuration files in a dedicated folder which name will be the name of the product, in oder to ensure that no other products will use the same path
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- The example below, is an the example of a file <emphasis>WEB-INF/conf/configuration.xml</emphasis> of the product "sample-ext".
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <import>war:/conf/sample-ext/common/common-configuration.xml</import>
- <import>war:/conf/sample-ext/jcr/jcr-configuration.xml</import>
- <import>war:/conf/sample-ext/portal/portal-configuration.xml</import>
- <import>war:/conf/sample-ext/web/web-inf-extension-configuration.xml</import>
-</configuration></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_avoid_duplicating_configuration_files_just_to_rename_a_simple_value">
- <title>How to avoid duplicating configuration files just to rename a simple value?</title>
- <para>
- In your configuration file, you can use a special variable called <emphasis>container.name.suffix</emphasis> in order to add a suffix to values that could change between portal containers. The value of this variable will be an empty sting if no <emphasis>PortalContainerDefinition</emphasis> has been defined otherwise the value will be <emphasis>\-$portal.container.name</emphasis>. <emphasis role="underline">See an example below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
-</configuration></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_or_change_a_Repository_andor_a_Workspace">
- <title>How to add or change a Repository and/or a Workspace?</title>
- <para>
- Now you can add new JCR repositories or workspaces thanks to an external plugin, the configuration of your JCR Repositories will be merged knowing that the merge algorithm will:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add missing Repository Definitions and/or Workspace Definitions.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Change the properties of a Repository Definition if it has already been defined.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Replace the Workspace Definition if it has already been defined.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- <emphasis role="underline">See an example of jcr-configuration.xml below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the RepositoryServiceConfiguration -->
- <target-component>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Sample RepositoryServiceConfiguration Plugin</name>
- <!-- The name of the method to call on the RepositoryServiceConfiguration in order to add the RepositoryServiceConfigurations -->
- <set-method>addConfig</set-method>
- <!-- The full qualified name of the RepositoryServiceConfigurationPlugin -->
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/sample-ext/jcr/repository-configuration.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
- <para>
- See an example of repository-configuration.xml below:
- </para>
-
-<programlisting language="XML" role="XML"><repository-service default-repository="repository">
- <repositories>
- <repository name="repository" system-workspace="system" default-workspace="portal-system">
- <security-domain>exo-domain</security-domain>
- <access-control>optional</access-control>
- <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
- <workspaces>
- <workspace name="sample-ws">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="source-name" value="jdbcexo${container.name.suffix}" />
- <property name="dialect" value="hsqldb" />
- <property name="multi-db" value="false" />
- <property name="update-storage" value="true" />
- <property name="max-buffer-size" value="204800" />
- <property name="swap-directory" value="../temp/swap/sample-ws${container.name.suffix}" />
- </properties>
- <value-storages>
- <value-storage id="sample-ws" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
- <properties>
- <property name="path" value="../temp/values/sample-ws${container.name.suffix}" />
- </properties>
- <filters>
- <filter property-type="Binary" />
- </filters>
- </value-storage>
- </value-storages>
- </container>
- <initializer class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
- <properties>
- <property name="root-nodetype" value="nt:unstructured" />
- <property name="root-permissions"
- value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
- </properties>
- </initializer>
- <cache enabled="true">
- <properties>
- <property name="max-size" value="20000" />
- <property name="live-time" value="30000" />
- </properties>
- </cache>
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
- <property name="index-dir" value="../temp/jcrlucenedb/sample-ws${container.name.suffix}" />
- </properties>
- </query-handler>
- <lock-manager>
- <time-out>15m</time-out><!-- 15min -->
- <persister class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
- <properties>
- <property name="path" value="../temp/lock/sample-ws${container.name.suffix}" />
- </properties>
- </persister>
- </lock-manager>
- </workspace>
- </workspaces>
- </repository>
- </repositories>
-</repository-service></programlisting>
- <warning>
- <title>Warning</title>
- <para>
- If you have to change the default repository or the default workspace, please be careful since it could cause side effects as you could be incompatible with some portal configuration files that refer explicitly to <emphasis>portal-system</emphasis> and/or to <emphasis>repository</emphasis>. To solve this problem you can either redefine the configuration file in a portal extension to change the workspace name and/or the repository name or you could also add your own repository instead of your own workspace.
- </para>
-
- </warning>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_ResourceBundles_to_my_portal">
- <title>How to add new ResourceBundles to my portal?</title>
- <para>
- Now you can add new Resource Bundles, thanks to an external plugin.
- </para>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the ResourceBundleService -->
- <target-component>org.exoplatform.services.resources.ResourceBundleService</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Sample ResourceBundle Plugin</name>
- <!-- The name of the method to call on the ResourceBundleService in order to register the ResourceBundles -->
- <set-method>addResourceBundle</set-method>
- <!-- The full qualified name of the BaseResourceBundlePlugin -->
- <type>org.exoplatform.services.resources.impl.BaseResourceBundlePlugin</type>
- <init-params>
- <!--values-param>
- <name>classpath.resources</name>
- <description>The resources that start with the following package name should be load from file system</description>
- <value>locale.portlet</value>
- </values-param-->
- <values-param>
- <name>init.resources</name>
- <description>Store the following resources into the db for the first launch </description>
- <value>locale.portal.sample</value>
- </values-param>
- <values-param>
- <name>portal.resource.names</name>
- <description>The properties files of the portal , those file will be merged
- into one ResoruceBundle properties </description>
- <value>locale.portal.sample</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_overwrite_existing_ResourceBundles_in_my_portal">
- <title>How to overwrite existing ResourceBundles in my portal?</title>
- <para>
- Now each portal container has its own <emphasis>ClassLoader</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalClassLoader()</emphasis>). This <emphasis>ClassLoader</emphasis> is an unified <emphasis>ClassLoader</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis>, so to add new keys or update key values, you just need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the corresponding resource bundle with the same name, with <emphasis role="underline">the same extension</emphasis> (xml or properties) at the same location into the <emphasis>classpath</emphasis> of your Web application (i.e. directly into the <emphasis>WEB-INF/classes</emphasis> directory or into a jar file in the <emphasis>WEB-INF/lib</emphasis> directory)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- In the example below, we want to change the values of the keys <emphasis>UIHomePagePortlet.Label.Username</emphasis> and <emphasis>UIHomePagePortlet.Label.Password</emphasis>, and add the new key <emphasis>UIHomePagePortlet.Label.SampleKey</emphasis> into the Resource Bundle <emphasis>locale.portal.webui</emphasis>.
- </para>
- <note>
- <title>WEB-INF/classes/local/portal/webui_en.properties</title>
-
-<programlisting>#############################################################################
-#org.exoplatform.portal.webui.component.UIHomePagePortlet #
-#############################################################################
-
-UIHomePagePortlet.Label.Username=Usr:
-UIHomePagePortlet.Label.Password=Pwd:
-UIHomePagePortlet.Label.SampleKey=This is a new key that has been added to the Resource Bundle "locale.portal.webui" of "sample-ext"</programlisting>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_replace_a_groovy_template_of_my_portal">
- <title>How to replace a groovy template of my portal?</title>
- <para>
- Now each portal container has its own <emphasis>ServletContext</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalContext()</emphasis>). This <emphasis>ServletContext</emphasis> is an unified <emphasis>ServletContext</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> so to replace a groovy template of the portal, you just need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the corresponding groovy template with the same name at the same location into your Web application
- </para>
-
- </listitem>
- <listitem>
- <para>
- Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_Portal_Configurations_Navigations_Pages_or_Portlet_Preferences_to_my_portal">
- <title>How to add new Portal Configurations, Navigations, Pages or Portlet Preferences to my portal?</title>
- <para>
- Now you can add new Portal Configurations, Navigations, Pages or Portlet Preferences thanks to an external plugin.
- </para>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the UserPortalConfigService -->
- <target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>new.portal.config.user.listener</name>
- <!-- The name of the method to call on the UserPortalConfigService in order to register the NewPortalConfigs -->
- <set-method>initListener</set-method>
- <!-- The full qualified name of the NewPortalConfigListener -->
- <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal configuration</description>
- <init-params>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>classic</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>portal</string>
- </field>
- <field name="templateLocation">
- <string>war:/conf/sample-ext/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>platform/users</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>group</string>
- </field>
- <field name="templateLocation">
- <string>war:/conf/sample-ext/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>root</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>user</string>
- </field>
- <field name="templateLocation">
- <string>war:/conf/sample-ext/portal</string>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_Http_Filters_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new Http Filters to my portal without modifying the portal binary?</title>
- <para>
- We added a <emphasis>GenericFilter</emphasis> that allows you to define new Http Filters thanks to an external plugin. Your filter will need to implement the interface <emphasis>org.exoplatform.web.filter.Filter</emphasis>.
- </para>
- <para>
- <emphasis role="underline">See an example of configuration below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the ExtensibleFilter -->
- <target-component>org.exoplatform.web.filter.ExtensibleFilter</target-component>
- <component-plugin>
- <!-- The name of the plugin -->
- <name>Sample Filter Definition Plugin</name>
- <!-- The name of the method to call on the ExtensibleFilter in order to register the FilterDefinitions -->
- <set-method>addFilterDefinitions</set-method>
- <!-- The full qualified name of the FilterDefinitionPlugin -->
- <type>org.exoplatform.web.filter.FilterDefinitionPlugin</type>
- <init-params>
- <object-param>
- <name>Sample Filter Definition</name>
- <object type="org.exoplatform.web.filter.FilterDefinition">
- <!-- The filter instance -->
- <field name="filter"><object type="org.exoplatform.sample.ext.web.SampleFilter"/></field>
- <!-- The mapping to use -->
- <!-- WARNING: the mapping is expressed with regular expressions -->
- <field name="patterns">
- <collection type="java.util.ArrayList" item-type="java.lang.String">
- <value>
- <string>/.*</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
- <para>
- See an example of Filter below:
- </para>
- <note>
- <title>SampleFilter.java</title>
-
-<programlisting language="Java" role="Java">...
-import org.exoplatform.web.filter.Filter;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-public class SampleFilter implements Filter
-{
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException
- {
- System.out.println("SampleFilter start");
- try
- {
- chain.doFilter(request, response);
- }
- finally
- {
- System.out.println("SampleFilter end");
- }
- }
-}</programlisting>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpSessionListeners_andor_ServletContextListeners_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> to my portal without modifying the portal binary?</title>
- <para>
- We added a <emphasis>GenericHttpListener</emphasis> that allows you to define new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> thanks to an external plugin. Actually, the <emphasis>GenericHttpListener</emphasis> will broadcast events thanks to the <emphasis>ListenerService</emphasis> that you can easily capture. The events that it broadcasts are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>: When a new session is created in the portal.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.sessionDestroyed</emphasis>: When a session is destroyed in the portal.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.contextInitialized</emphasis>: When the servlet context of the portal is initialized.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.contextDestroyed</emphasis>: When the servlet context of the portal is destroyed.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- If you want to listen to <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.sessionDestroyed_, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextInitialized_, you will need to create a Listener that extends _Listener<PortalContainer, ServletContextEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextDestroyed_, you will need to create a Listener that extends <emphasis>Listener<PortalContainer, ServletContextEvent></emphasis>
- </para>
- <para>
- <emphasis role="underline">See an example of configuration below:</emphasis>
- </para>
-
-<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
-<configuration
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <!-- The full qualified name of the ListenerService -->
- <target-component>org.exoplatform.services.listener.ListenerService</target-component>
- <component-plugin>
- <!-- The name of the listener that is also the name of the target event -->
- <name>org.exoplatform.web.GenericHttpListener.sessionCreated</name>
- <!-- The name of the method to call on the ListenerService in order to register the Listener -->
- <set-method>addListener</set-method>
- <!-- The full qualified name of the Listener -->
- <type>org.exoplatform.sample.ext.web.SampleHttpSessionCreatedListener</type>
- </component-plugin>
- <component-plugin>
- <!-- The name of the listener that is also the name of the target event -->
- <name>org.exoplatform.web.GenericHttpListener.sessionDestroyed</name>
- <!-- The name of the method to call on the ListenerService in order to register the Listener -->
- <set-method>addListener</set-method>
- <!-- The full qualified name of the Listener -->
- <type>org.exoplatform.sample.ext.web.SampleHttpSessionDestroyedListener</type>
- </component-plugin>
- <component-plugin>
- <!-- The name of the listener that is also the name of the target event -->
- <name>org.exoplatform.web.GenericHttpListener.contextInitialized</name>
- <!-- The name of the method to call on the ListenerService in order to register the Listener -->
- <set-method>addListener</set-method>
- <!-- The full qualified name of the Listener -->
- <type>org.exoplatform.sample.ext.web.SampleContextInitializedListener</type>
- </component-plugin>
- <component-plugin>
- <!-- The name of the listener that is also the name of the target event -->
- <name>org.exoplatform.web.GenericHttpListener.contextDestroyed</name>
- <!-- The name of the method to call on the ListenerService in order to register the Listener -->
- <set-method>addListener</set-method>
- <!-- The full qualified name of the Listener -->
- <type>org.exoplatform.sample.ext.web.SampleContextDestroyedListener</type>
- </component-plugin>
- </external-component-plugins>
-</configuration></programlisting>
- <para>
- See an example of Session Listener below:
- </para>
- <note>
- <title>SampleHttpSessionCreatedListener.java</title>
-
-<programlisting language="Java" role="Java">..
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.listener.Event;
-import org.exoplatform.services.listener.Listener;
-
-import javax.servlet.http.HttpSessionEvent;
-
-public class SampleHttpSessionCreatedListener extends Listener<PortalContainer, HttpSessionEvent>
-{
-
- @Override
- public void onEvent(Event<PortalContainer, HttpSessionEvent> event) throws Exception
- {
- System.out.println("Creating a new session");
- }
-}</programlisting>
-
- </note>
- <para>
- See an example of Context Listener below:
- </para>
- <note>
- <title>SampleContextInitializedListener.java</title>
-
-<programlisting language="Java" role="Java">..
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.listener.Event;
-import org.exoplatform.services.listener.Listener;
-
-import javax.servlet.ServletContextEvent;
-
-public class SampleContextInitializedListener extends Listener<PortalContainer, ServletContextEvent>
-{
-
- @Override
- public void onEvent(Event<PortalContainer, ServletContextEvent> event) throws Exception
- {
- System.out.println("Initializing the context");
- }
-}</programlisting>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpServlet_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new <emphasis>HttpServlet</emphasis> to my portal without modifying the portal binary?</title>
- <para>
- Actually, it is not possible but you can create a rest component instead. For more details about rest, please refer to the following article <xref linkend="sect-Reference_Guide-eXo_Web_Services" />.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_override_or_add_a_Context_Parameter_to_my_portal_without_modifying_the_portal_binary">
- <title>How to override or add a Context Parameter to my portal without modifying the portal binary?</title>
- <para>
- Actually, you have nothing to do, you just need to ensure that you get the context parameter value from the unified servlet context of the portal, that should be set for you but you can still get it from <emphasis>portalContainer.getPortalContext()</emphasis>.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-Where_can_I_found_an_example_of_how_to_extend_my_portal">
- <title>Where can I found an example of how to extend my portal?</title>
- <para>
- We added an example of portal extension (i.e. ability to customize a portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/extension.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_extension">
- <title>How to deploy the sample extension?</title>
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
- </para>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-ext.ear</emphasis> from sample/extension/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>sample-ext.war</emphasis> which is the web application that contains (potentially) configuration files, groovy templates, resource bundles, skins and javascript files, that will extend the portal.
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of the original portal in which we added <emphasis>sample-ext</emphasis> at the end of dependency list.
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
- <warning>
- <title>Warning #1</title>
- <para>
- This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-ext.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
- </para>
-
- </warning>
- <warning>
- <title>Warning #2</title>
- <para>
- The file <emphasis>starter.ear</emphasis> must always been started last.
- </para>
-
- </warning>
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-ext.war</emphasis> from sample/extension/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> (for more details see the warning below)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> from sample/extension/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> from sample/extension/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <warning>
- <title>Warning</title>
- <para>
- This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
- </para>
-
- </warning>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-Where_can_I_find_an_example_of_how_to_create_a_new_portal">
- <title>Where can I find an example of how to create a new portal?</title>
- <para>
- We added an example of new portal (i.e. ability to create a new portal from another portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/portal.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_portal">
- <title>How to deploy the sample portal?</title>
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
- </para>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-portal.ear</emphasis> from <emphasis>sample/portal/ear/target/</emphasis> to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>sample-portal.war</emphasis> which is the entry point of the new portal
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>rest-sample-portal.war</emphasis> which is the entry point for <emphasis>rest</emphasis> outside the portal (in the portal you can access to <emphasis>rest</emphasis> thanks to path prefix <emphasis>/sample-portal/rest</emphasis>)
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of this portal
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
- <listitem>
- <para>
- Define the related application policy in your file <emphasis>conf/login-config.xml</emphasis>, as below:
- </para>
-
- </listitem>
-
- </itemizedlist>
-
-<programlisting language="XML" role="XML"> <application-policy name="exo-domain-sample-portal">
- <authentication>
- <login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
- <module-option name="portalContainerName">sample-portal</module-option>
- <module-option name="realmName">exo-domain-sample-portal</module-option>
- </login-module>
- <login-module code="org.exoplatform.services.security.jaas.SharedStateLoginModule" flag="required">
- <module-option name="portalContainerName">sample-portal</module-option>
- <module-option name="realmName">exo-domain-sample-portal</module-option>
- </login-module>
- <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required">
- <module-option name="portalContainerName">sample-portal</module-option>
- <module-option name="realmName">exo-domain-sample-portal</module-option>
- </login-module>
- </authentication>
- </application-policy></programlisting>
- <warning>
- <title>Warning #1</title>
- <para>
- This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-portal.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
- </para>
-
- </warning>
- <warning>
- <title>Warning #2</title>
- <para>
- The file <emphasis>starter.ear</emphasis> must always been started last.
- </para>
-
- </warning>
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-portal.war</emphasis> from sample/portal/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>rest-sample-portal.war</emphasis> from sample/portal/rest-war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> <emphasis>(for more details see the warning below)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> from sample/portal/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> from sample/portal/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
-
- </listitem>
- <listitem>
- <para>
- Define the related realm in your file <emphasis>tomcat/conf/jaas.conf</emphasis>, as below:
- </para>
-
- </listitem>
-
- </itemizedlist>
- <note>
- <title>tomcat/conf/jaas.conf</title>
-
-<programlisting>...
-exo-domain-sample-portal {
- org.exoplatform.web.security.PortalLoginModule required
- portalContainerName="sample-portal"
- realmName="exo-domain-sample-portal";
- org.exoplatform.services.security.jaas.SharedStateLoginModule required
- portalContainerName="sample-portal"
- realmName="exo-domain-sample-portal";
- org.exoplatform.services.security.j2ee.TomcatLoginModule required
- portalContainerName="sample-portal"
- realmName="exo-domain-sample-portal";
-};</programlisting>
-
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Define the context of <emphasis>sample-portal</emphasis> by creating a file called <emphasis>sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
- </para>
-
- </listitem>
-
- </itemizedlist>
- <note>
- <title>tomcat/conf/Catalina/localhost/sample-portal.xml</title>
-
-<programlisting language="XML" role="XML"><Context path='/sample-portal' docBase='sample-portal' debug='0' reloadable='true' crossContext='true' privileged='true'>
- <Logger className='org.apache.catalina.logger.SystemOutLogger'
- prefix='localhost_portal_log.' suffix='.txt' timestamp='true'/>
- <Manager className='org.apache.catalina.session.PersistentManager' saveOnRestart='false'/>
- <Realm className='org.apache.catalina.realm.JAASRealm'
- appName='exo-domain-sample-portal'
- userClassNames='org.exoplatform.services.security.jaas.UserPrincipal'
- roleClassNames='org.exoplatform.services.security.jaas.RolePrincipal'
- debug='0' cache='false'/>
- <Valve className='org.apache.catalina.authenticator.FormAuthenticator' characterEncoding='UTF-8'/></Context></programlisting>
-
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Define the context of <emphasis>rest-sample-portal</emphasis> by creating a file called <emphasis>rest-sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
- </para>
-
- </listitem>
-
- </itemizedlist>
- <note>
- <title>tomcat/conf/Catalina/localhost/rest-sample-portal.xml</title>
-
-<programlisting language="XML" role="XML"><Context path="/rest-sample-portal" docBase="rest-sample-portal" reloadable="true" crossContext="false">
-
- <Logger className='org.apache.catalina.logger.SystemOutLogger'
- prefix='localhost_portal_log.' suffix='.txt' timestamp='true'/>
- <Manager className='org.apache.catalina.session.PersistentManager' saveOnRestart='false'/>
- <Realm className='org.apache.catalina.realm.JAASRealm'
- appName='exo-domain-sample-portal'
- userClassNames="org.exoplatform.services.security.jaas.UserPrincipal"
- roleClassNames="org.exoplatform.services.security.jaas.RolePrincipal"
- debug='0' cache='false'/>
-</Context></programlisting>
-
- </note>
- <warning>
- <title>Warning</title>
- <para>
- This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
- </para>
-
- </warning>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-FAQ-I_get_java.lang.IllegalStateException_No_pre_init_tasks_can_be_added_to_the_portal_container_portal_because_it_has_already_been_initialized._what_can_I_do_to_fix_it">
- <title>I get "java.lang.IllegalStateException: No pre init tasks can be added to the portal container 'portal', because it has already been initialized." what can I do to fix it?</title>
- <para>
- To fix this issue you need to check if:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) has been deployed
- </para>
-
- </listitem>
- <listitem>
- <para>
- The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) is the last ear file to be launched
- </para>
-
- </listitem>
-
- </orderedlist>
- <note>
- <title>Note</title>
- <para>
- With Tomcat to prevent any alphabetic issue, the good way to solve this problem is to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Unzip the archive <emphasis>starter.war</emphasis> into a directory called <emphasis>starter</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- Remove the archive <emphasis>starter.war</emphasis>
- </para>
-
- </listitem>
- <listitem>
- <para>
- Rename the folder <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis>
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- This tip works because folders corresponding to unzipped wars are launched after war files.
- </para>
-
- </note>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Recommendations">
- <title>Recommendations</title>
- <section id="sect-Reference_Guide-Recommendations-Dont_ship_your_configuration_files_with_your_jar_files">
- <title>Don't ship your configuration files with your jar files?</title>
- <para>
- Remove all the configuration files from the jar files ( <emphasis>conf/configuration.xml</emphasis> and <emphasis>conf/portal/configuration.xml</emphasis>) and move them to the war file of your extension, otherwise your configuration files will be loaded for all the portal containers which could cause incompatibility issues with other portals.
- </para>
- <para>
- Each extension should manage independently, its css files, js files, google gadgets and configuration files. If you add configuration files into the jar files of your extension, you brake this law.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Recommendations-Using_a_dedicated_workspacerepository_for_your_extension">
- <title>Using a dedicated workspace/repository for your extension?</title>
- <para>
- In order to avoid conflicts with other extensions and to manage each extension independently, it is highly recommended to use a dedicated workspace or repository per extension.
- </para>
-
- </section>
-
-
- </section>
-
-</section>
-
-
13 years, 3 months
gatein SVN: r7508 - in epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14: en-US and 9 other directories.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-09-27 00:38:00 -0400 (Tue, 27 Sep 2011)
New Revision: 7508
Removed:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/core.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/core/
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/ws.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/ws/
Modified:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Reference_Guide.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/jcr-exo-implementation.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/configuration-persister.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/jdbc-data-container-config.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jca.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/query-handler-config.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/transaction-manager-lookup.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/transaction-service.xml
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/publican.cfg
Log:
Removed references to standalone mode and Infinispan. Removed eXo Core and eXo WS sections
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Book_Info.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -3,8 +3,8 @@
<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent">
%BOOK_ENTITIES;
]>
-<bookinfo id="book-Reference_Guide-Reference_Guide">
- <title>Reference Guide</title>
+<bookinfo id="book-Reference_Guide-Reference_Guide_eXo_JCR_1.14">
+ <title>Reference Guide eXo JCR 1.14</title>
<subtitle>An in-depth guide to Enterprise Portal Platform &VZ;</subtitle>
<productname>JBoss Enterprise Portal Platform</productname>
<productnumber>5.2</productnumber>
@@ -25,7 +25,7 @@
</inlinemediaobject>
</corpauthor>
- <!-- FOR PUBLICAN --> <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- FOR JDOCBOOK: --> <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- FOR PUBLICAN --> <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- FOR JDOCBOOK: --> <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="fallback_content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
<xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Reference_Guide.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Reference_Guide.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/Reference_Guide.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,14 +4,15 @@
%BOOK_ENTITIES;
]>
<book>
- <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="modules/Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="modules/PortalDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="modules/PortletDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- <xi:include href="modules/GadgetDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> --> <xi:include href="modules/AuthenticationAndIdentity.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="modules/WSRP.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="modules/Advanced.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/Introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/PortalDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/PortletDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- <xi:include href="modules/GadgetDevelopment.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
+ <xi:include href="modules/AuthenticationAndIdentity.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/WSRP.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="modules/Advanced.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
Deleted: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/core.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/core.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/core.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-eXoCore">
- <title>eXoCore</title>
- <xi:include href="core/core.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/db-creator-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/security-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/spring-security-integration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/organization-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/organization-service-initalizer.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/organization-service-listener.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/conversationstate-when-membership-changed.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/db-schema-creator-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/db-configuration-hibernate.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/ldap-configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/tika-document-reader-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="core/digest-auth.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-</section>
-
-
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/faq/jcr-faq.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,181 +4,181 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JCR_FAQ">
- <title>JCR FAQ</title>
- <para>
- It's the draft for a future FAQ of JCR usage.
- </para>
- <section id="sect-Reference_Guide-JCR_FAQ-Kernel">
- <title>Kernel</title>
- <section id="sect-Reference_Guide-Kernel-What_is_the_best_standardized_way_to_get_the_instance_of_a_service_">
- <title>What is the best, standardized way to get the instance of a service ?</title>
-
+ <title>JCR FAQ</title>
+ <para>
+ It's the draft for a future FAQ of JCR usage.
+ </para>
+ <section id="sect-Reference_Guide-JCR_FAQ-Kernel">
+ <title>Kernel</title>
+ <section id="sect-Reference_Guide-Kernel-What_is_the_best_standardized_way_to_get_the_instance_of_a_service_">
+ <title>What is the best, standardized way to get the instance of a service ?</title>
+
<programlisting language="Java" role="Java">container.getComponentInstanceOfType(ServiceName.class);</programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR_FAQ-JCR">
- <title>JCR</title>
- <section id="sect-Reference_Guide-JCR-JCR_core">
- <title>JCR core</title>
- <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_Session.getNodeByUUID_or_Session.getItem">
- <title>Is it better to use Session.getNodeByUUID or Session.getItem?</title>
- <para>
- Session.getNodeByUUID() about 2.5 times faster of Session.getItem(String) and only 25% faster of Node.getNode(String). See the daily tests results for such comparisons, e.g.
- </para>
- <para>
- <ulink url="http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...">http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...</ulink>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_FAQ-JCR">
+ <title>JCR</title>
+ <section id="sect-Reference_Guide-JCR-JCR_core">
+ <title>JCR core</title>
+ <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_Session.getNodeByUUID_or_Session.getItem">
+ <title>Is it better to use Session.getNodeByUUID or Session.getItem?</title>
+ <para>
+ Session.getNodeByUUID() about 2.5 times faster of Session.getItem(String) and only 25% faster of Node.getNode(String). See the daily tests results for such comparisons, e.g.
+ </para>
+ <para>
+ <ulink url="http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...">http://tests.exoplatform.org/JCR/1.12.2-GA/rev.2442/daily-performance-tes...</ulink>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_it_make_sense_to_have_all_the_node_referencable_to_use_getNodeByUUID_all_the_time">
- <title>Does it make sense to have all the node referencable to use getNodeByUUID all the time?</title>
- <para>
- Until it's applicable for a business logic it can be. But take in account the paths are human readable and lets you think in hierarchy. If it's important a location based approach is preferable.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Does_it_make_sense_to_have_all_the_node_referencable_to_use_getNodeByUUID_all_the_time">
+ <title>Does it make sense to have all the node referencable to use getNodeByUUID all the time?</title>
+ <para>
+ Until it's applicable for a business logic it can be. But take in account the paths are human readable and lets you think in hierarchy. If it's important a location based approach is preferable.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-What_should_I_use_to_check_if_an_Item_exists_before_getting_the_Value">
- <title>What should I use to check if an Item exists before getting the Value?</title>
- <para>
- Use Session.itemExists(String absPath), Node.hasNode(String relPath) or Property.hasProperty(String name). It's also is possible to check Node.hasNodes() and Node.hasProprties().
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-What_should_I_use_to_check_if_an_Item_exists_before_getting_the_Value">
+ <title>What should I use to check if an Item exists before getting the Value?</title>
+ <para>
+ Use Session.itemExists(String absPath), Node.hasNode(String relPath) or Property.hasProperty(String name). It's also is possible to check Node.hasNodes() and Node.hasProprties().
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_use_Observation_properly">
- <title>How to use Observation properly?</title>
- <para>
- JCR Observation's a way to listen on persistence changes of a Repository. It provides several options to configure the listener for an interesting only changes. To use properly, it's important to understand concept of events filtering for a registered EventListener (8.3.3 Observation Manager). An often confusing part, it's the <emphasis role="bold">absPath</emphasis>, it's an associated parent of a location you want to observe events on. I.e. it's a parent of child node(s) or this parent property(ies); if <emphasis role="bold">isDeep</emphasis> is true then you'll get events of all the subtree of child nodes also. The same actual for <emphasis role="bold">uuid</emphasis> and <emphasis role="bold">nodeTypeName</emphasis> parameters of ObservationManager.addEventListener() method.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_to_use_Observation_properly">
+ <title>How to use Observation properly?</title>
+ <para>
+ JCR Observation's a way to listen on persistence changes of a Repository. It provides several options to configure the listener for an interesting only changes. To use properly, it's important to understand concept of events filtering for a registered EventListener (8.3.3 Observation Manager). An often confusing part, it's the <emphasis role="bold">absPath</emphasis>, it's an associated parent of a location you want to observe events on. I.e. it's a parent of child node(s) or this parent property(ies); if <emphasis role="bold">isDeep</emphasis> is true then you'll get events of all the subtree of child nodes also. The same actual for <emphasis role="bold">uuid</emphasis> and <emphasis role="bold">nodeTypeName</emphasis> parameters of ObservationManager.addEventListener() method.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_queries_that_to_access_the_data_by_the_JCR_API">
- <title>Is it better to use queries that to access the data by the JCR API?</title>
- <para>
- No, direct access to items via JCR API is more efficient. Search will consume additional resources for index querying and only then return the items.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Is_it_better_to_use_queries_that_to_access_the_data_by_the_JCR_API">
+ <title>Is it better to use queries that to access the data by the JCR API?</title>
+ <para>
+ No, direct access to items via JCR API is more efficient. Search will consume additional resources for index querying and only then return the items.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-What_is_default_query_ordering">
- <title>What is default query ordering?</title>
- <para>
- By default (if query do not contains any ordering statements) result nodes is sorted by document order.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-What_is_default_query_ordering">
+ <title>What is default query ordering?</title>
+ <para>
+ By default (if query do not contains any ordering statements) result nodes is sorted by document order.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_ordering_by_jcrpath_or_Item_name_supported">
- <title>Is ordering by jcr:path or Item name supported?</title>
- <para>
- No, it does not supported. There is two ways to ordering results, when path may be used as criteria:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Order by property with value type NAME or PATH (jcr supports it).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Is_ordering_by_jcrpath_or_Item_name_supported">
+ <title>Is ordering by jcr:path or Item name supported?</title>
+ <para>
+ No, it does not supported. There is two ways to ordering results, when path may be used as criteria:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Order by property with value type NAME or PATH (jcr supports it).
+ </para>
- </listitem>
- <listitem>
- <para>
- Order by jcr:path - sort by exact path of node (jcr do not supports it).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Order by jcr:path - sort by exact path of node (jcr do not supports it).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Order by jcr:path
- </para>
- <para>
- If no order specification is supplied in the query statement, implementations may support document order on the result nodes (see 6.6.4.2 Document Order). And it is sorted by order number.
- </para>
- <para>
- By default, (if query do not contains any ordering statements) result nodes is sorted by document order.
- </para>
-
+ </itemizedlist>
+ <para>
+ Order by jcr:path
+ </para>
+ <para>
+ If no order specification is supplied in the query statement, implementations may support document order on the result nodes (see 6.6.4.2 Document Order). And it is sorted by order number.
+ </para>
+ <para>
+ By default, (if query do not contains any ordering statements) result nodes is sorted by document order.
+ </para>
+
<programlisting>SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%'</programlisting>
- <para>
- For specified jcr:path ordering there is different proceeding in XPath and SQL:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- SQL no matter ascending or descending - query returns result nodes in random order: {code}SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%' ORDER BY jcr:path{code}
- </para>
+ <para>
+ For specified jcr:path ordering there is different proceeding in XPath and SQL:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ SQL no matter ascending or descending - query returns result nodes in random order: {code}SELECT * FROM nt:unstructured WHERE jcr:path LIKE 'testRoot/%' ORDER BY jcr:path{code}
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- XPath - jcr:path order construction is ignored (so result is not sorted according path); {code}/testRoot/* <ulink url="@jcr:primaryType='nt:unstructured'">@jcr:primaryType='nt:unstructured'</ulink> order by jcr:path{code}
- </para>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ XPath - jcr:path order construction is ignored (so result is not sorted according path); {code}/testRoot/* <ulink url="@jcr:primaryType='nt:unstructured'">@jcr:primaryType='nt:unstructured'</ulink> order by jcr:path{code}
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_eXo_JCR_indexer_uses_content_encoding">
- <title>How eXo JCR indexer uses content encoding?</title>
- <para>
- 1. Indexer uses jcr:encoding property of nt:resource node (used as jcr:content child node of nt:file) 2. if no jcr:encoding property set the Document Service will use the one configured in the service (defaultEncoding) 3. if nothing is configured a JVM, the default encoding will be used
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_eXo_JCR_indexer_uses_content_encoding">
+ <title>How eXo JCR indexer uses content encoding?</title>
+ <para>
+ 1. Indexer uses jcr:encoding property of nt:resource node (used as jcr:content child node of nt:file) 2. if no jcr:encoding property set the Document Service will use the one configured in the service (defaultEncoding) 3. if nothing is configured a JVM, the default encoding will be used
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Which_database_server_is_better_for_eXo_JCR">
- <title>Which database server is better for eXo JCR?</title>
- <para>
- If the question is a performance, it's difficult question, as each database can be configured to be more (and more) faster for each special case. MySQL with MyISAM engine will be faster. But MySQL has limitations for indexes for multilingual columns (Item names actually). So, with long Item names (larger ofOracle or PostgreSQL also are good for performance. DB2 and MSSQL are slower in default configurations. Default configuration of Sybase leader of slowness. But in this question, take the database server maintenance in account. MySQL and PostgreSQL are simple in installation and can work even on limited hardware. Oracle, DB2, MSSQL or Sybase need more efforts. The same actual for maintenance during the work. Note for Sybase: "check-sns-new-connection" data container configuration parameter should be set to "true". For testing purpose, embedded database such as HSQLDB is the best choice. Apache Derby and H2 also supported. But H2 surprisingly needs "beta" feature enabl!
ed - MVCC=TRUE in JDBC url.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Which_database_server_is_better_for_eXo_JCR">
+ <title>Which database server is better for eXo JCR?</title>
+ <para>
+ If the question is a performance, it's difficult question, as each database can be configured to be more (and more) faster for each special case. MySQL with MyISAM engine will be faster. But MySQL has limitations for indexes for multilingual columns (Item names actually). So, with long Item names (larger ofOracle or PostgreSQL also are good for performance. DB2 and MSSQL are slower in default configurations. Default configuration of Sybase leader of slowness. But in this question, take the database server maintenance in account. MySQL and PostgreSQL are simple in installation and can work even on limited hardware. Oracle, DB2, MSSQL or Sybase need more efforts. The same actual for maintenance during the work. Note for Sybase: "check-sns-new-connection" data container configuration parameter should be set to "true". For testing purpose, embedded database such as HSQLDB is the best choice. Apache Derby and H2 also supported. But H2 surprisingly needs "beta!
" feature enabled - MVCC=TRUE in JDBC url.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_setup_eXo_JCR_for_mutilingial_content_on_MySQL">
- <title>How to setup eXo JCR for mutilingial content on MySQL?</title>
- <para>
- To allow multiple character sets to be sent from the client, the UTF-8 encoding should be used, either by configuring utf8 as the default server character set, or by configuring the JDBC driver to use UTF-8 through the characterEncoding property. MySQL database should be created in single-byte encoding, e.g. "latin1":
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_to_setup_eXo_JCR_for_mutilingial_content_on_MySQL">
+ <title>How to setup eXo JCR for mutilingial content on MySQL?</title>
+ <para>
+ To allow multiple character sets to be sent from the client, the UTF-8 encoding should be used, either by configuring utf8 as the default server character set, or by configuring the JDBC driver to use UTF-8 through the characterEncoding property. MySQL database should be created in single-byte encoding, e.g. "latin1":
+ </para>
+
<programlisting>CREATE DATABASE db1 CHARACTER SET latin1 COLLATE latin1_general_cs;</programlisting>
- <para>
- eXo JCR application (e.g. GateIn) should use JCR dialect "MySQL-UTF8".
- </para>
- <para>
- In other words: MySQL database default encoding and JCR dialect cannot be UTF8 both. Use single-byte encoding (e.g. "latin1") for database and "mysql-utf8" dialect for eXo JCR.
- </para>
- <para>
- Notice: "MySQL-UTF8" dialect cannot be auto-detected, it should be set explicitly in configuration.
- </para>
+ <para>
+ eXo JCR application (e.g. GateIn) should use JCR dialect "MySQL-UTF8".
+ </para>
+ <para>
+ In other words: MySQL database default encoding and JCR dialect cannot be UTF8 both. Use single-byte encoding (e.g. "latin1") for database and "mysql-utf8" dialect for eXo JCR.
+ </para>
+ <para>
+ Notice: "MySQL-UTF8" dialect cannot be auto-detected, it should be set explicitly in configuration.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_MySQL_have_limitation_affecting_on_eXo_JCR_features">
- <title>Does MySQL have limitation affecting on eXo JCR features?</title>
- <para>
- Index's key length of JCR_SITEM (JCR_MITEM) table for mysql-utf8 dialect is reduced to 765 bytes (or 255 chars).
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Does_MySQL_have_limitation_affecting_on_eXo_JCR_features">
+ <title>Does MySQL have limitation affecting on eXo JCR features?</title>
+ <para>
+ Index's key length of JCR_SITEM (JCR_MITEM) table for mysql-utf8 dialect is reduced to 765 bytes (or 255 chars).
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Does_use_of_Sybase_database_need_special_options_in_eXo_JCR_configuration">
- <title>Does use of Sybase database need special options in eXo JCR configuration?</title>
- <para>
- To enable JCR working properly with Sybase, a property 'check-sns-new-connection' with 'false' value is required for each workspace data container:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Does_use_of_Sybase_database_need_special_options_in_eXo_JCR_configuration">
+ <title>Does use of Sybase database need special options in eXo JCR configuration?</title>
+ <para>
+ To enable JCR working properly with Sybase, a property 'check-sns-new-connection' with 'false' value is required for each workspace data container:
+ </para>
+
<programlisting language="XML" role="XML"><container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
<property name="source-name" value="jdbcjcr" />
@@ -191,11 +191,11 @@
<property name="check-sns-new-connection" value="false" />
</properties></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_open_and_close_a_session_properly_to_avoid_memory_leaks">
- <title>How to open and close a session properly to avoid memory leaks?</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_to_open_and_close_a_session_properly_to_avoid_memory_leaks">
+ <title>How to open and close a session properly to avoid memory leaks?</title>
+
<programlisting language="Java" role="Java">Session session = repository.login(credentials);
try
{
@@ -206,257 +206,41 @@
session.logout();
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Can_I_use_Session_after_loging_out">
- <title>Can I use Session after loging out?</title>
- <para>
- No. Any instance of Session or Node (acquired through session) shouldn't be used after loging out anymore. At least, it is highly recommended not to use.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Can_I_use_Session_after_loging_out">
+ <title>Can I use Session after loging out?</title>
+ <para>
+ No. Any instance of Session or Node (acquired through session) shouldn't be used after loging out anymore. At least, it is highly recommended not to use.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_configure_jcr_for_cluster_">
- <title>How to configure jcr for cluster ?</title>
- <para>
- So we have configured JCR in standalone mode and want to reconfigure it for clustered environment. First of all, let's check whether all requirements are satisfied:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Dedicated RDBMS anyone like MySQL, Postges, Oracle and, etc but just not HSSQL;
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-Is_JCR_suitable_for_remote_sites_synchronization">
+ <title>Is JCR suitable for remote sites\* synchronization?</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Remote sites can be visualized as different buildings seperated by a WAN network.
+ </para>
- </listitem>
- <listitem>
- <para>
- Shared storage. The simplest thing is to use shared FS like NFS or SMB mounted in operation system, but they are rather slow. The best thing is to use SAN (Storage Area Network);
- </para>
+ </listitem>
- </listitem>
- <listitem>
- <para>
- Fast network between JCR nodes.
- </para>
+ </itemizedlist>
- </listitem>
-
- </itemizedlist>
- <para>
- So now, need to configure Container a bit. Check exo-configuration.xml to be sure that you are using JBossTS Transaction Service and JBossCache Transaction Manager, as shown below.
- </para>
-
-<programlisting language="XML" role="XML"><component>
- <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
- <type>org.jboss.cache.GenericTransactionManagerLookup</type>
-</component>
-
-<component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
- <init-params>
- <value-param>
- <name>timeout</name>
- <value>300</value>
- </value-param>
- </init-params>
-</component></programlisting>
- <para>
- Next stage is actually the JCR configuration. We need JBossCache configuration templates for : data-cache, indexer-cache and lock-manager-cache. Later they will be used to configure JCR's core components. There are pre-bundled templates in EAR or JAR in conf/standalone/cluster. They can be used as is or re-written if needed. And now, re-configure a bit each workspace. Actually, a few parameters need changing, e.g. <cache>, <query-handler> and <lock-manager>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <cache> configuration should look like this:
- </para>
-
-<programlisting language="XML" role="XML"><cache enabled="true"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- <properties>
- <property name="jbosscache-configuration" value="test-jbosscache-data.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR-cluster-db1-ws" />
- </properties>
-</cache></programlisting>
- <itemizedlist>
- <listitem>
- <para>
- "jbosscache-configuration" is the path to configuration template;
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jgroups-configuration" is path to JGroups configuration that is multiplexer stack is used (default). This file is also pre-bundled with templates and is recommended for use;
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jgroups-multiplexer-stack" just simply "true". Strongly recommended;
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cluster-name" is the name of cluster group. It should be different for each workspace and each workspace component. I.e.: <repository_name>-<ws_name>-<component(cache\|lock\|index)>
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- <query-handler> configuration
- </para>
- <itemizedlist>
- <listitem>
- <para>
- You must replace or add in <query-handler> block the "changesfilter-class" parameter equals with:
- </para>
-
-<programlisting language="XML" role="XML"><property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"/></programlisting>
-
- </listitem>
- <listitem>
- <para>
- add JBossCache-oriented configuration:
- </para>
-
-<programlisting language="XML" role="XML"><property name="jbosscache-configuration" value="test-jbosscache-indexer.xml" />
-<property name="jgroups-configuration" value="udp-mux.xml" />
-<property name="jgroups-multiplexer-stack" value="true" />
-<property name="jbosscache-cluster-name" value="JCR-cluster-indexer-db1-ws" />
-<property name="max-volatile-time" value="60" /></programlisting>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
- <para>
- Those properties have the same meaning and restrictions as in the previous block. The last property "max-volatile-time" is not mandatory but recommended. This notifies that the latest changes in index will be visible for each cluster node not later than in 60s.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <lock-manager> configuration
- </para>
- <para>
- Maybe this is the hardest element to configure, because we have to define access to DB where locks will be stored. Replace exsiting lock-manager configuration with shown below.
- </para>
-
-<programlisting language="XML" role="XML">
-<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- <properties>
- <property name="time-out" value="15m" />
- <property name="jbosscache-configuration" value="test-jbosscache-lock.xml" />
- <property name="jgroups-configuration" value="udp-mux.xml" />
- <property name="jgroups-multiplexer-stack" value="true" />
- <property name="jbosscache-cluster-name" value="JCR-cluster-locks-db1-ws" />
- <property name="jbosscache-cl-cache.jdbc.table.name" value="jcrlocks_db1_ws" />
- <property name="jbosscache-cl-cache.jdbc.table.create" value="true" />
- <property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
- <property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws_pk" />
- <property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
- <property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
- </properties>
-</lock-manager>
-
-</programlisting>
- <para>
- First few properties are the same as in the previous components, but here you can see some strange "jbosscache-cl-cache.jdbc.*" properties. They define access parameters for database where lock are persisted.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.table.create" - whether to create it or not. Usually "true";
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.table.drop" - whether to drop on a start or not. Use "false";
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.table.primarykey" - the name of column with pk;
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.fqn.column" - the name of one more column. If you are not sure how to use, follow the example above (if much interested, please refer to JBossCache JDBCCacheLoader documentation)
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.node.column" - the name of one more column. If you are not sure how to use, follow the example above (if much interested, please refer to JBossCache JDBCCacheLoader documentation)
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.parent.column" - name of one more column. If you are not sure how to use, follow the example above if you are not sure (if much interested, please refer to JBossCache JDBCCacheLoader documentation)
- </para>
-
- </listitem>
- <listitem>
- <para>
- "jbosscache-cl-cache.jdbc.datasource" - name of configured in Container datasource, where you want to store locks. The best idea is to use the same as for workspace.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
- <para>
- That's all. JCR is ready for running in a cluster.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-Is_JCR_suitable_for_remote_sites_synchronization">
- <title>Is JCR suitable for remote sites\* synchronization?</title>
- <itemizedlist>
- <listitem>
- <para>
- Remote sites can be visualized as different buildings seperated by a WAN network.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_to_use_lucene_spellchecker">
- <title>How to use lucene spellchecker?</title>
- <para>
- There is few steps:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Enable lucene spellchecker in jcr QueryHandler configuration:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_to_use_lucene_spellchecker">
+ <title>How to use lucene spellchecker?</title>
+ <para>
+ There is few steps:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Enable lucene spellchecker in jcr QueryHandler configuration:
+ </para>
+
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
@@ -465,56 +249,56 @@
</properties>
</query-handler></programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- Execute query with rep:spellcheck function and word that is checked:
- </para>
-
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Execute query with rep:spellcheck function and word that is checked:
+ </para>
+
<programlisting language="Java" role="Java">Query query = qm.createQuery("select rep:spellcheck() from nt:base where " + "jcr:path = '/' and spellcheck('word that is checked')", Query.SQL);
RowIterator rows = query.execute().getRows();</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <itemizedlist>
- <listitem>
- <para>
- Fetch a result:
- </para>
-
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Fetch a result:
+ </para>
+
<programlisting language="Java" role="Java">Row r = rows.nextRow();
Value v = r.getValue("rep:spellcheck()");</programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- If there is no any results, that means there is no suggestion, so word is correct or spellcheckers dictionary do not contain any words like the checked word.
- </para>
+ </itemizedlist>
+ <para>
+ If there is no any results, that means there is no suggestion, so word is correct or spellcheckers dictionary do not contain any words like the checked word.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_core-How_can_I_affect_to_spellchecker_results">
- <title>How can I affect to spellchecker results?</title>
- <para>
- There is two parameters in jcr QueryHandler configuration:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Minimal distance between checked word and proposed suggestion;
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_core-How_can_I_affect_to_spellchecker_results">
+ <title>How can I affect to spellchecker results?</title>
+ <para>
+ There is two parameters in jcr QueryHandler configuration:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Minimal distance between checked word and proposed suggestion;
+ </para>
- </listitem>
- <listitem>
- <para>
- Search for more popular suggestions;
- </para>
-
+ </listitem>
+ <listitem>
+ <para>
+ Search for more popular suggestions;
+ </para>
+
<programlisting language="XML" role="XML"><query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
...
@@ -525,134 +309,134 @@
</properties>
</query-handler></programlisting>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Minimal distance is counted as Levenshtein distance between checked word and spellchecker suggestion.
- </para>
- <para>
- MorePopular paramter affects in next way: If "morePopular" disabled:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the proposed word exists in the directory - no suggestion given;
- </para>
+ </itemizedlist>
+ <para>
+ Minimal distance is counted as Levenshtein distance between checked word and spellchecker suggestion.
+ </para>
+ <para>
+ MorePopular paramter affects in next way: If "morePopular" disabled:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the proposed word exists in the directory - no suggestion given;
+ </para>
- </listitem>
- <listitem>
- <para>
- If the proposed word doesn't exist in the directory - propose the closed word;
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the proposed word doesn't exist in the directory - propose the closed word;
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- If "morePopular" enabled:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- No matter word exists or not, checker will propose the closed word that is more popular than the checked word.
- </para>
+ </itemizedlist>
+ <para>
+ If "morePopular" enabled:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ No matter word exists or not, checker will propose the closed word that is more popular than the checked word.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR-JCR_extensions">
- <title>JCR extensions</title>
- <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_repository_to_existing_repository_">
- <title>How to restore repository to existing repository ?</title>
- <orderedlist>
- <listitem>
- <para>
- Remove existing repository, use:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR-JCR_extensions">
+ <title>JCR extensions</title>
+ <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_repository_to_existing_repository_">
+ <title>How to restore repository to existing repository ?</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Remove existing repository, use:
+ </para>
+
<programlisting language="Java" role="Java">RepositoryService.removeRepository(String repositoryName)</programlisting>
- </listitem>
- <listitem>
- <para>
- Restore repository, use
- </para>
-
+ </listitem>
+ <listitem>
+ <para>
+ Restore repository, use
+ </para>
+
<programlisting language="Java" role="Java">BackupManager.restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous)</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_workspace_to_existing_worksapce">
- <title>How to restore workspace to existing worksapce?</title>
- <orderedlist>
- <listitem>
- <para>
- Remove existing workspace, use:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_extensions-How_to_restore_workspace_to_existing_worksapce">
+ <title>How to restore workspace to existing worksapce?</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Remove existing workspace, use:
+ </para>
+
<programlisting language="Java" role="Java">ManageableRepository.removeWorkspace(String workspaceName)</programlisting>
- </listitem>
- <listitem>
- <para>
- Restore workspace, use:
- </para>
-
+ </listitem>
+ <listitem>
+ <para>
+ Restore workspace, use:
+ </para>
+
<programlisting language="Java" role="Java">BackupManager.restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous)</programlisting>
- </listitem>
+ </listitem>
- </orderedlist>
+ </orderedlist>
- </section>
-
- <section id="sect-Reference_Guide-JCR_extensions-Does_JCR_support_hot_backup">
- <title>Does JCR support hot backup?</title>
- <para>
- Yes, JCR is support hot backup. Will use org.exoplatform.services.jcr.ext.backup.BackupManager.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_extensions-Does_JCR_support_hot_backup">
+ <title>Does JCR support hot backup?</title>
+ <para>
+ Yes, JCR is support hot backup. Will use org.exoplatform.services.jcr.ext.backup.BackupManager.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR-WebDAV">
- <title>WebDAV</title>
- <section id="sect-Reference_Guide-WebDAV-I_uploaded_a_file_to_WebDAV_server_using_Mac_OS_Finder_but_the_file_size_is_0_what_is_wrong_">
- <title>I uploaded a file to WebDAV server using Mac OS Finder, but the file size is '0', what is wrong ?</title>
- <para>
- This is known as a finder bug started from Mac OS v.10.5.3 and not yet fixed, .
- </para>
- <para>
- For more details follow:&nbsp; <ulink url="http://discussions.apple.com/thread.jspa?threadID=1538882&start=0&...">Apple Disscussion thread.</ulink>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR-WebDAV">
+ <title>WebDAV</title>
+ <section id="sect-Reference_Guide-WebDAV-I_uploaded_a_file_to_WebDAV_server_using_Mac_OS_Finder_but_the_file_size_is_0_what_is_wrong_">
+ <title>I uploaded a file to WebDAV server using Mac OS Finder, but the file size is '0', what is wrong ?</title>
+ <para>
+ This is known as a finder bug started from Mac OS v.10.5.3 and not yet fixed, .
+ </para>
+ <para>
+ For more details follow:&nbsp; <ulink url="http://discussions.apple.com/thread.jspa?threadID=1538882&start=0&...">Apple Disscussion thread.</ulink>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-Can_I_manage_cache_control_value_for_different_media_types_from_server_configuration_">
- <title>Can I manage 'cache-control' value for different media-types from server configuration ?</title>
- <para>
- Use "cache-control" configuration parameter.
- </para>
- <para>
- The value of this parameter must contain colon-separated pairs "MediaType:cache-control value"
- </para>
- <para>
- For example, if you need to cache all text/xml and text/plain files for 5 minutes (300 sec.) and other text/\* files for 10 minutes (600 sec.), use the next configuration:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-WebDAV-Can_I_manage_cache_control_value_for_different_media_types_from_server_configuration_">
+ <title>Can I manage 'cache-control' value for different media-types from server configuration ?</title>
+ <para>
+ Use "cache-control" configuration parameter.
+ </para>
+ <para>
+ The value of this parameter must contain colon-separated pairs "MediaType:cache-control value"
+ </para>
+ <para>
+ For example, if you need to cache all text/xml and text/plain files for 5 minutes (300 sec.) and other text/\* files for 10 minutes (600 sec.), use the next configuration:
+ </para>
+
<programlisting language="XML" role="XML"><component>
<type>org.exoplatform.services.jcr.webdav.WebDavServiceImpl</type>
<init-params>
@@ -664,79 +448,79 @@
<component>
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-How_to_perform_WebDAV_requests_using_curl_">
- <title>How to perform WebDAV requests using curl ?</title>
- <para>
- Simple Requests
- </para>
- <para>
- For simple request such as: GET, HEAD, MKCOL, COPY, MOVE, DELETE, CHECKIN, CHECKOUT, UNCHECKOUT, LOCK, UNLOCK, VERSIONCONTROL, OPTIONS
- </para>
- <para>
- perform:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-WebDAV-How_to_perform_WebDAV_requests_using_curl_">
+ <title>How to perform WebDAV requests using curl ?</title>
+ <para>
+ Simple Requests
+ </para>
+ <para>
+ For simple request such as: GET, HEAD, MKCOL, COPY, MOVE, DELETE, CHECKIN, CHECKOUT, UNCHECKOUT, LOCK, UNLOCK, VERSIONCONTROL, OPTIONS
+ </para>
+ <para>
+ perform:
+ </para>
+
<programlisting>curl -i -u 'user:pass' -X 'METHOD_NAME' 'resource_url'</programlisting>
- <para>
- for example to create a folder named test perform:
- </para>
-
+ <para>
+ for example to create a folder named test perform:
+ </para>
+
<programlisting>curl -i -u 'root:exo' -X MKCOL 'http://localhost:8080/rest/jcr/repository/production/test</programlisting>
- <para>
- to PUT a test.txt file from your current folder to "test "folder on server perform:
- </para>
-
+ <para>
+ to PUT a test.txt file from your current folder to "test "folder on server perform:
+ </para>
+
<programlisting>curl -i -u 'root:exo' -X PUT 'http://localhost:8080/rest/jcr/repository/production/test/test.txt' -d @test.txt</programlisting>
- <para>
- Requests with XML body
- </para>
- <para>
- For requests which contains xml body such as: ORDER, PROPFIND, PROPPATCH, REPORT, SEARCH
- </para>
- <para>
- add <emphasis role="bold">-d 'xml_body text'</emphasis> or <emphasis role="bold">-d @body.xml</emphasis>
- </para>
- <para>
- (body.xml must contain a valid xml request bidy.) to you curl-command:
- </para>
-
+ <para>
+ Requests with XML body
+ </para>
+ <para>
+ For requests which contains xml body such as: ORDER, PROPFIND, PROPPATCH, REPORT, SEARCH
+ </para>
+ <para>
+ add <emphasis role="bold">-d 'xml_body text'</emphasis> or <emphasis role="bold">-d @body.xml</emphasis>
+ </para>
+ <para>
+ (body.xml must contain a valid xml request bidy.) to you curl-command:
+ </para>
+
<programlisting>curl -i -u 'user:pass' -X 'METHOD_NAME' -H 'Headers' 'resource_url' -d 'xml_body text'</programlisting>
- <para>
- For example about finding all files containing "test" perform:
- </para>
-
+ <para>
+ For example about finding all files containing "test" perform:
+ </para>
+
<programlisting>curl -i -u "root:exo" -X "SEARCH" "http://192.168.0.7:8080/rest/jcr/repository/production/" -d
"<?xml version='1.0' encoding='UTF-8' ?>
<D:searchrequest xmlns:D='DAV:'>
<D:sql>SELECT * FROM nt:base WHERE contains(*, 'text')</D:sql>
</D:searchrequest>"</programlisting>
- <para>
- If you need to add some headers to your request, use \-H key.
- </para>
- <para>
- To have more information about methods parameters, you can find in <ulink url="http://www.ietf.org/rfc/rfc2518.txt">HTTP Extensions for Distributed Authoring</ulink> specification.
- </para>
+ <para>
+ If you need to add some headers to your request, use \-H key.
+ </para>
+ <para>
+ To have more information about methods parameters, you can find in <ulink url="http://www.ietf.org/rfc/rfc2518.txt">HTTP Extensions for Distributed Authoring</ulink> specification.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-WebDAV-How_eXo_JCR_WebDAV_server_treats_content_encoding">
- <title>How eXo JCR WebDAV server treats content encoding?</title>
- <para>
- OS client (Windows, Linux etc) doesn't set an encoding in a request. But eXo JCR WebDAV server looks for an encoding in a Content-Type header and set it to jcr:encoding. See <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,</ulink> 14.17 Content-Type. e.g. Content-Type: text/html; charset=ISO-8859-4 So, if a client will set Content-Type header, e.g. JS code from a page, it will works for a text file as expected.
- </para>
- <para>
- If WebDAV request doesn't contain a content encoding, it's possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, e.g. based on IP or user preferences.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-WebDAV-How_eXo_JCR_WebDAV_server_treats_content_encoding">
+ <title>How eXo JCR WebDAV server treats content encoding?</title>
+ <para>
+ OS client (Windows, Linux etc) doesn't set an encoding in a request. But eXo JCR WebDAV server looks for an encoding in a Content-Type header and set it to jcr:encoding. See <ulink url="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html,</ulink> 14.17 Content-Type. e.g. Content-Type: text/html; charset=ISO-8859-4 So, if a client will set Content-Type header, e.g. JS code from a page, it will works for a text file as expected.
+ </para>
+ <para>
+ If WebDAV request doesn't contain a content encoding, it's possible to write a dedicated action in a customer application. The action will set jcr:encoding using its own logic, e.g. based on IP or user preferences.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/jcr-exo-implementation.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/jcr-exo-implementation.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/concepts/jcr-exo-implementation.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,67 +4,83 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Implementation">
- <!-- This document was created with Syntext Serna Free. --> <title>Implementation</title>
+ <!-- This document was created with Syntext Serna Free. -->
+ <title>Implementation</title>
<section id="sect-Reference_Guide-Implementation-How_it_works">
<title>How it works</title>
<para>
- eXo Repository Service is a standard eXo service and is a registered IoC component, i.e. can be deployed in some eXo Containers (see <xref linkend="sect-Reference_Guide-JCR_configuration" /> for details). The relationships between components are shown in the picture below:
+ The relationships between the eXo Repository Service components are shown in the picture below:
</para>
<mediaobject>
<imageobject>
<imagedata fileref="images/eXoJCR/concepts/exojcr.gif" />
</imageobject>
-
</mediaobject>
+ <variablelist>
+ <title>Definitions</title>
+ <varlistentry>
+ <term>eXo Container:</term>
+ <listitem>
+ <para>
+ A subclasses of <parameter>org.exoplatform.container.ExoContainer</parameter> (<parameter>org.exoplatform.container.PortalContainer</parameter>) holds a reference to the Repository Service.
+ </para>
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>Repository Service</term>
+ <listitem>
+ <para>
+ This contains information about repositories. eXo JCR is able to manage many Repositories.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Repository:</term>
+ <listitem>
+ <para>
+ An implementation of <literal>javax.jcr.Repository</literal>. It holds references to one or more Workspace(s).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Workspace:</term>
+ <listitem>
+ <para>
+ Container of a single rooted tree of Items.
+ </para>
+ <note>
+ <title>Note:</title>
+ <para>
+ That here it is not exactly the same as <literal>javax.jcr.Workspace</literal> as it is not a per Session object.
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<para>
- <keycap>eXo Container: </keycap>some subclasses of org.exoplatform.container.ExoContainer (usually org.exoplatform.container.StandaloneContainer or org.exoplatform.container.PortalContainer) that holds a reference to Repository Service.
+ The usual JCR application usecase includes two initial steps:
</para>
- <itemizedlist>
- <listitem>
+ <procedure>
+ <step>
<para>
- <emphasis role="bold">Repository Service:</emphasis> contains information about repositories. eXo JCR is able to manage many Repositories.
+ Obtaining Repository object by getting <emphasis role="bold">Repository Service</emphasis> via JNDI lookup if eXo repository is bound to the naming context using (see <xref linkend="sect-Reference_Guide-JCR_configuration" /> for details).
</para>
-
- </listitem>
- <listitem>
+ </step>
+ <step>
<para>
- <emphasis role="bold">Repository:</emphasis> Implementation of javax.jcr.Repository. It holds references to one or more Workspace(s).
+ Creating a <parameter>javax.jcr.Session object</parameter> that calls <parameter>Repository.login(..)</parameter>.
</para>
-
- </listitem>
- <listitem>
- <para>
- <keycap>Workspace:</keycap> Container of a single rooted tree of Items. (Note that here it is not exactly the same as javax.jcr.Workspace as it is not a per Session object).
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- Usual JCR application use case includes two initial steps:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Obtaining Repository object by getting <emphasis role="bold">Repository Service</emphasis> from the current eXo Container (eXo "native" way) or via JNDI lookup if eXo repository is bound to the naming context using (see <xref linkend="sect-Reference_Guide-JCR_configuration" /> for details).
- </para>
-
- </listitem>
- <listitem>
- <para>
- Creating javax.jcr.Session object that calls Repository.login(..).
- </para>
-
- </listitem>
-
- </itemizedlist>
-
+ </step>
+ </procedure>
</section>
<section id="sect-Reference_Guide-Implementation-Workspace_Data_Model">
<title>Workspace Data Model</title>
<para>
- The following diagram explains which components of eXo JCR implementation are used in a data flow to perform operations specified in JCR API
+ The following diagram explains which components of a eXo JCR implementation are used in a data flow to perform operations specified in the JCR API.
</para>
<mediaobject>
<imageobject>
@@ -73,7 +89,7 @@
</mediaobject>
<para>
- The Workspace Data Model can be split into 4 levels by data isolation and value from the JCR model point of view.
+ The Workspace Data Model can be split into four levels by data isolation and value from the JCR model point of view.
</para>
<itemizedlist>
<listitem>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/configuration-persister.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/configuration-persister.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/configuration-persister.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,13 +4,12 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JCR_Configuration_persister">
- <title>JCR Configuration persister</title>
- <section id="sect-Reference_Guide-JCR_Configuration_persister-Idea">
- <title>Idea</title>
- <para>
- JCR Repository Service uses <classname>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</classname> component to read its configuration.
- </para>
-
+ <title>JCR Configuration persister</title>
+ <section id="sect-Reference_Guide-JCR_Configuration_persister-Idea">
+ <title>Idea</title>
+ <para>
+ JCR Repository Service uses <classname>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</classname> component to read its configuration.
+ </para>
<programlisting language="XML" role="XML"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -18,31 +17,30 @@
<value-param>
<name>conf-path</name>
<description>JCR configuration file</description>
- <value>/conf/standalone/exo-jcr-config.xml</value>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
</value-param>
</init-params>
</component></programlisting>
- <para>
- In the example, Repository Service will read the configuration from the file <filename>/conf/standalone/exo-jcr-config.xml</filename>.
- </para>
- <para>
- But in some cases, it's required to change the configuration on the fly. And know that the new one will be used. Additionally we wish not to modify the original file.
- </para>
- <para>
- In this case, we have to use the configuration persister feature which allows to store the configuration in different locations.
- </para>
+ <para>
+ In the example, Repository Service will read the configuration from the file <filename>war:/conf/jcr/repository-configuration.xml</filename>.
+ </para>
+ <para>
+ But in some cases, it's required to change the configuration on the fly. And know that the new one will be used. Additionally we wish not to modify the original file.
+ </para>
+ <para>
+ In this case, we have to use the configuration persister feature which allows to store the configuration in different locations.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Configuration_persister-Usage">
- <title>Usage</title>
- <para>
- On startup <classname>RepositoryServiceConfiguration</classname> component checks if a configuration persister was configured. In that case, it uses the provided <classname>ConfigurationPersister</classname> implementation class to instantiate the persister object.
- </para>
- <para>
- Configuration with persister:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Configuration_persister-Usage">
+ <title>Usage</title>
+ <para>
+ On startup <classname>RepositoryServiceConfiguration</classname> component checks if a configuration persister was configured. In that case, it uses the provided <classname>ConfigurationPersister</classname> implementation class to instantiate the persister object.
+ </para>
+ <para>
+ Configuration with persister:
+ </para>
<programlisting language="XML" role="XML"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -50,7 +48,7 @@
<value-param>
<name>conf-path</name>
<description>JCR configuration file</description>
- <value>/conf/standalone/exo-jcr-config.xml</value>
+ <value>war:/conf/jcr/repository-configuration.xml</value>
</value-param>
<properties-param>
<name>working-conf</name>
@@ -62,34 +60,34 @@
</init-params>
</component>
</programlisting>
- <para>
- Where:
- <itemizedlist>
- <listitem>
- <para>
- <parameter>source-name</parameter>: JNDI source name configured in <classname>InitialContextInitializer</classname> component. (<parameter>sourceName</parameter> prior v.1.9.) Find more in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />.
- </para>
+ <para>
+ Where:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>source-name</parameter>: JNDI source name configured in <classname>InitialContextInitializer</classname> component. (<parameter>sourceName</parameter> prior v.1.9.) Find more in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />.
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>dialect</parameter>: SQL dialect which will be used with database from <parameter>source-name</parameter>. Find more in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>dialect</parameter>: SQL dialect which will be used with database from <parameter>source-name</parameter>. Find more in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />.
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>persister-class-name</parameter> - class name of <classname>ConfigurationPersister</classname> interface implementation. (<parameter>persisterClassName</parameter> prior v.1.9.)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>persister-class-name</parameter> - class name of <classname>ConfigurationPersister</classname> interface implementation. (<parameter>persisterClassName</parameter> prior v.1.9.)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
- <para>
- ConfigurationPersister interface:
- </para>
-
+ </itemizedlist>
+ </para>
+ <para>
+ ConfigurationPersister interface:
+ </para>
+
<programlisting language="Java" role="Java">/**
* Init persister.
* Used by RepositoryServiceConfiguration on init.
@@ -115,17 +113,17 @@
*/
boolean hasConfig() throws RepositoryConfigurationException;
</programlisting>
- <para>
- JCR Core implementation contains a persister which stores the repository configuration in the relational database using JDBC calls - <classname>org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister</classname>.
- </para>
- <para>
- The implementation will crate and use table JCR_CONFIG in the provided database.
- </para>
- <para>
- But the developer can implement his own persister for his particular usecase.
- </para>
+ <para>
+ JCR Core implementation contains a persister which stores the repository configuration in the relational database using JDBC calls - <classname>org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister</classname>.
+ </para>
+ <para>
+ The implementation will crate and use table JCR_CONFIG in the provided database.
+ </para>
+ <para>
+ But the developer can implement his own persister for his particular usecase.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/jdbc-data-container-config.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/jdbc-data-container-config.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/configuration/jdbc-data-container-config.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,308 +4,289 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JDBC_Data_Container_Config">
- <title>JDBC Data Container Config</title>
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Introduction">
- <title>Introduction</title>
- <para>
- eXo JCR persistent data container can work in two configuration modes:
- <itemizedlist>
- <listitem>
- <para>
- <phrase>Multi-database</phrase>: One database for each workspace (used in standalone eXo JCR service mode)
- </para>
+ <title>JDBC Data Container Config</title>
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Introduction">
+ <title>Introduction</title>
+ <para>
+ The data container uses the JDBC driver to communicate with the actual database software, i.e. any JDBC-enabled data storage can be used with eXo JCR implementation.
+ </para>
+ <para>
+ Currently the data container is tested with the following RDBMS:
+ <itemizedlist>
+ <listitem>
+ <para>
+ MySQL 5.1 MYSQL Connector/J 5.1.8
+ </para>
- </listitem>
- <listitem>
- <para>
- <phrase>Single-database</phrase>: All workspaces persisted in one database (used in embedded eXo JCR service mode, e.g. in eXo portal)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-605
+ </para>
- </listitem>
+ </listitem>
+ <listitem>
+ <para>
+ Oracle DB 11g (11.0.1.6), JDBC Driver Oracle 11g R1 (11.1.0.6.0)
+ </para>
- </itemizedlist>
- </para>
- <para>
- The data container uses the JDBC driver to communicate with the actual database software, i.e. any JDBC-enabled data storage can be used with eXo JCR implementation.
- </para>
- <para>
- Currently the data container is tested with the following RDBMS:
- <itemizedlist>
- <listitem>
- <para>
- MySQL 5.1 MYSQL Connector/J 5.1.8
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ DB2 9,7 IBM Data Server Driver for JDBC and SQLJ (JCC Driver) v.9.1 (fixpack 3a)
+ </para>
- </listitem>
- <listitem>
- <para>
- PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-605
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ MS SQL Server 2005 SP3 JDBC Driver 2.0
+ </para>
- </listitem>
- <listitem>
- <para>
- Oracle DB 11g (11.0.1.6), JDBC Driver Oracle 11g R1 (11.1.0.6.0)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Sybase 15.0.3 Driver: Sybase jConnect JDBC driver v7 (Build 26502)
+ </para>
- </listitem>
- <listitem>
- <para>
- DB2 9,7 IBM Data Server Driver for JDBC and SQLJ (JCC Driver) v.9.1 (fixpack 3a)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ HSQLDB (2.0.0)
+ </para>
- </listitem>
- <listitem>
- <para>
- MS SQL Server 2005 SP3 JDBC Driver 2.0
- </para>
+ </listitem>
- </listitem>
- <listitem>
- <para>
- Sybase 15.0.3 Driver: Sybase jConnect JDBC driver v7 (Build 26502)
- </para>
+ </itemizedlist>
+ </para>
+ <para>
+ <note>
+ <para>
+ Please note, that JCR requires at least READ_COMMITED isolation level and other RDBMS configurations can cause some side-effects and issues. So, please, make sure proper isolation level is configured on database server side.
+ </para>
- </listitem>
- <listitem>
- <para>
- HSQLDB (2.0.0)
- </para>
+ </note>
+ Each database software supports ANSI SQL standards but also has its own specifics. So, each database has its own configuration in eXo JCR as a database dialect parameter. If you need a more detailed configuration of the database, it's possible to do that by editing the metadata SQL-script files.
+ </para>
+ <para>
+ SQL-scripts you can obtain from jar-file exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found at SVN <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/...">here.</ulink>
+ </para>
+ <para>
+ In the next two tables correspondence between the scripts and databases is shown.
+ </para>
+ <table id="tabl-Reference_Guide-Introduction-Single_database">
+ <title>Single-database</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ Database
+ </entry>
+ <entry>
+ Script
+ </entry>
- </listitem>
+ </row>
- </itemizedlist>
- </para>
- <para>
- <note>
- <para>
- Please note, that JCR requires at least READ_COMMITED isolation level and other RDBMS configurations can cause some side-effects and issues. So, please, make sure proper isolation level is configured on database server side.
- </para>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ MySQL DB
+ </entry>
+ <entry>
+ jcr-sjdbc.mysql.sql
+ </entry>
- </note>
- Each database software supports ANSI SQL standards but also has its own specifics. So, each database has its own configuration in eXo JCR as a database dialect parameter. If you need a more detailed configuration of the database, it's possible to do that by editing the metadata SQL-script files.
- </para>
- <para>
- SQL-scripts you can obtain from jar-file exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found at SVN <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/jcr/trunk/exo.jcr.component.core/...">here.</ulink>
- </para>
- <para>
- In the next two tables correspondence between the scripts and databases is shown.
- </para>
- <table id="tabl-Reference_Guide-Introduction-Single_database">
- <title>Single-database</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>
- Database
- </entry>
- <entry>
- Script
- </entry>
+ </row>
+ <row>
+ <entry>
+ MySQL DB with utf-8
+ </entry>
+ <entry>
+ jcr-sjdbc.mysql-utf8.sql
+ </entry>
- </row>
+ </row>
+ <row>
+ <entry>
+ PostgresSQL
+ </entry>
+ <entry>
+ jcr-sjdbc.pqsql.sql
+ </entry>
- </thead>
- <tbody>
- <row>
- <entry>
- MySQL DB
- </entry>
- <entry>
- jcr-sjdbc.mysql.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ Oracle DB
+ </entry>
+ <entry>
+ jcr-sjdbc.ora.sql
+ </entry>
- </row>
- <row>
- <entry>
- MySQL DB with utf-8
- </entry>
- <entry>
- jcr-sjdbc.mysql-utf8.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ DB2 9.7
+ </entry>
+ <entry>
+ jcr-sjdbc.db2.sql
+ </entry>
- </row>
- <row>
- <entry>
- PostgresSQL
- </entry>
- <entry>
- jcr-sjdbc.pqsql.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ MS SQL Server
+ </entry>
+ <entry>
+ jcr-sjdbc.mssql.sql
+ </entry>
- </row>
- <row>
- <entry>
- Oracle DB
- </entry>
- <entry>
- jcr-sjdbc.ora.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ Sybase
+ </entry>
+ <entry>
+ jcr-sjdbc.sybase.sql
+ </entry>
- </row>
- <row>
- <entry>
- DB2 9.7
- </entry>
- <entry>
- jcr-sjdbc.db2.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ HSQLDB
+ </entry>
+ <entry>
+ jcr-sjdbc.sql
+ </entry>
- </row>
- <row>
- <entry>
- MS SQL Server
- </entry>
- <entry>
- jcr-sjdbc.mssql.sql
- </entry>
+ </row>
- </row>
- <row>
- <entry>
- Sybase
- </entry>
- <entry>
- jcr-sjdbc.sybase.sql
- </entry>
+ </tbody>
- </row>
- <row>
- <entry>
- HSQLDB
- </entry>
- <entry>
- jcr-sjdbc.sql
- </entry>
+ </tgroup>
- </row>
+ </table>
+ <table id="tabl-Reference_Guide-Introduction-Multi_database">
+ <title>Multi-database</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ Database
+ </entry>
+ <entry>
+ Script
+ </entry>
- </tbody>
+ </row>
- </tgroup>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ MySQL DB
+ </entry>
+ <entry>
+ jcr-mjdbc.mysql.sql
+ </entry>
- </table>
- <table id="tabl-Reference_Guide-Introduction-Multi_database">
- <title>Multi-database</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>
- Database
- </entry>
- <entry>
- Script
- </entry>
+ </row>
+ <row>
+ <entry>
+ MySQL DB with utf-8
+ </entry>
+ <entry>
+ jcr-mjdbc.mysql-utf8.sql
+ </entry>
- </row>
+ </row>
+ <row>
+ <entry>
+ PostgresSQL
+ </entry>
+ <entry>
+ jcr-mjdbc.pqsql.sql
+ </entry>
- </thead>
- <tbody>
- <row>
- <entry>
- MySQL DB
- </entry>
- <entry>
- jcr-mjdbc.mysql.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ Oracle DB
+ </entry>
+ <entry>
+ jcr-mjdbc.ora.sql
+ </entry>
- </row>
- <row>
- <entry>
- MySQL DB with utf-8
- </entry>
- <entry>
- jcr-mjdbc.mysql-utf8.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ DB2 9.7
+ </entry>
+ <entry>
+ jcr-mjdbc.db2.sql
+ </entry>
- </row>
- <row>
- <entry>
- PostgresSQL
- </entry>
- <entry>
- jcr-mjdbc.pqsql.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ MS SQL Server
+ </entry>
+ <entry>
+ jcr-mjdbc.mssql.sql
+ </entry>
- </row>
- <row>
- <entry>
- Oracle DB
- </entry>
- <entry>
- jcr-mjdbc.ora.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ Sybase
+ </entry>
+ <entry>
+ jcr-mjdbc.sybase.sql
+ </entry>
- </row>
- <row>
- <entry>
- DB2 9.7
- </entry>
- <entry>
- jcr-mjdbc.db2.sql
- </entry>
+ </row>
+ <row>
+ <entry>
+ HSQLDB
+ </entry>
+ <entry>
+ jcr-mjdbc.sql
+ </entry>
- </row>
- <row>
- <entry>
- MS SQL Server
- </entry>
- <entry>
- jcr-mjdbc.mssql.sql
- </entry>
+ </row>
- </row>
- <row>
- <entry>
- Sybase
- </entry>
- <entry>
- jcr-mjdbc.sybase.sql
- </entry>
+ </tbody>
- </row>
- <row>
- <entry>
- HSQLDB
- </entry>
- <entry>
- jcr-mjdbc.sql
- </entry>
+ </tgroup>
- </row>
+ </table>
+ <para>
+ In case the non-ANSI node name is used, it's necessary to use a database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC drivers need additional parameters for establishing a Unicode friendly connection. E.g. under mysql it's necessary to add an additional parameter for the JDBC driver at the end of JDBC URL. For instance: <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code>
+ </para>
+ <para>
+ There are preconfigured configuration files for HSQLDB. Look for these files in the source-distribution of eXo JCR implementation.
+ </para>
+ <para>
+ By default, the configuration files are located in service jars <filename>/conf/portal/configuration.xml</filename> (eXo services including JCR Repository Service) and <filename>exo-jcr-config.xml</filename> (repositories configuration). In eXo portal product, JCR is configured in portal web application <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR Repository Service and related serivces) and repository-configuration.xml (repositories configuration).
+ </para>
+ <para>
+ Read more about <xref linkend="sect-Reference_Guide-JCR_configuration" />.
+ </para>
- </tbody>
-
- </tgroup>
-
- </table>
- <para>
- In case the non-ANSI node name is used, it's necessary to use a database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC drivers need additional parameters for establishing a Unicode friendly connection. E.g. under mysql it's necessary to add an additional parameter for the JDBC driver at the end of JDBC URL. For instance: <code>jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8</code>
- </para>
- <para>
- There are preconfigured configuration files for HSQLDB. Look for these files in /conf/portal and /conf/standalone folders of the jar-file <package>exo.jcr.component.core-XXX.XXX.jar</package> or source-distribution of eXo JCR implementation.
- </para>
- <para>
- By default, the configuration files are located in service jars <filename>/conf/portal/configuration.xml</filename> (eXo services including JCR Repository Service) and <filename>exo-jcr-config.xml</filename> (repositories configuration). In eXo portal product, JCR is configured in portal web application <filename>portal/WEB-INF/conf/jcr/jcr-configuration.xml</filename> (JCR Repository Service and related serivces) and repository-configuration.xml (repositories configuration).
- </para>
- <para>
- Read more about <xref linkend="sect-Reference_Guide-JCR_configuration" />.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Multi_database_Configuration">
- <title>Multi-database Configuration</title>
- <para>
- You need to configure each workspace in a repository. You may have each one on different remote servers as far as you need.
- </para>
- <para>
- First of all configure the data containers in the <classname>org.exoplatform.services.naming.InitialContextInitializer</classname> service. It's the JNDI context initializer which registers (binds) naming resources (DataSources) for data containers.
- </para>
- <para>
- For example (standalone mode, two data containers <parameter>jdbcjcr</parameter> - local HSQLDB, <parameter>jdbcjcr1</parameter> - remote MySQL):
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Multi_database_Configuration">
+ <title>Multi-database Configuration</title>
+ <para>
+ You need to configure each workspace in a repository. You may have each one on different remote servers as far as you need.
+ </para>
+ <para>
+ First of all configure the data containers in the <classname>org.exoplatform.services.naming.InitialContextInitializer</classname> service. It's the JNDI context initializer which registers (binds) naming resources (DataSources) for data containers.
+ </para>
+ <para>
+ For example (two data containers <parameter>jdbcjcr</parameter> - local HSQLDB, <parameter>jdbcjcr1</parameter> - remote MySQL):
+ </para>
<programlisting language="XML" role="XML"><component>
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
@@ -376,73 +357,73 @@
</init-params>
</component>
</programlisting>
- <para>
- We configure the database connection parameters:
- <itemizedlist>
- <listitem>
- <para>
- <parameter>driverClassName</parameter>, e.g. "org.hsqldb.jdbcDriver", "com.mysql.jdbc.Driver", "org.postgresql.Driver"
- </para>
+ <para>
+ We configure the database connection parameters:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>driverClassName</parameter>, e.g. "org.hsqldb.jdbcDriver", "com.mysql.jdbc.Driver", "org.postgresql.Driver"
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>url</parameter>, e.g. "jdbc:hsqldb:file:target/temp/data/portal", "jdbc:mysql://exoua.dnsalias.net/jcr"
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>url</parameter>, e.g. "jdbc:hsqldb:file:target/temp/data/portal", "jdbc:mysql://exoua.dnsalias.net/jcr"
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>username</parameter>, e.g. "sa", "exoadmin"
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>username</parameter>, e.g. "sa", "exoadmin"
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>password</parameter>, e.g. "", "exo12321"
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>password</parameter>, e.g. "", "exo12321"
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
- <para>
- There can be connection pool configuration parameters (org.apache.commons.dbcp.BasicDataSourceFactory):
- <itemizedlist>
- <listitem>
- <para>
- <parameter>maxActive</parameter>, e.g. 50
- </para>
+ </itemizedlist>
+ </para>
+ <para>
+ There can be connection pool configuration parameters (org.apache.commons.dbcp.BasicDataSourceFactory):
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>maxActive</parameter>, e.g. 50
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>maxIdle</parameter>, e.g. 5
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>maxIdle</parameter>, e.g. 5
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>initialSize</parameter>, e.g. 5
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>initialSize</parameter>, e.g. 5
+ </para>
- </listitem>
- <listitem>
- <para>
- and other according to <ulink url="http://jakarta.apache.org/commons/dbcp/configuration.html">Apache DBCP configuration</ulink>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ and other according to <ulink url="http://jakarta.apache.org/commons/dbcp/configuration.html">Apache DBCP configuration</ulink>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
- <para>
- When the data container configuration is done, we can configure the repository service. Each workspace will be configured for its own data container.
- </para>
- <para>
- For example (two workspaces <parameter>ws</parameter> - jdbcjcr, <parameter>ws1</parameter> - jdbcjcr1):
- </para>
-
+ </itemizedlist>
+ </para>
+ <para>
+ When the data container configuration is done, we can configure the repository service. Each workspace will be configured for its own data container.
+ </para>
+ <para>
+ For example (two workspaces <parameter>ws</parameter> - jdbcjcr, <parameter>ws1</parameter> - jdbcjcr1):
+ </para>
+
<programlisting language="XML" role="XML"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
@@ -506,60 +487,60 @@
</workspace>
</workspaces>
</programlisting>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>source-name</parameter>: A javax.sql.DataSource name configured in InitialContextInitializer component (was <parameter>sourceName</parameter> prior JCR 1.9);
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>source-name</parameter>: A javax.sql.DataSource name configured in InitialContextInitializer component (was <parameter>sourceName</parameter> prior JCR 1.9);
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>dialect</parameter>: A database dialect, one of "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci", "mssql", "sybase", "derby", "db2", "db2v8" or "auto" for dialect autodetection;
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>dialect</parameter>: A database dialect, one of "hsqldb", "mysql", "mysql-utf8", "pgsql", "oracle", "oracle-oci", "mssql", "sybase", "derby", "db2", "db2v8" or "auto" for dialect autodetection;
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>multi-db</parameter>: Enable multi-database container with this parameter (set value "true");
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>multi-db</parameter>: Enable multi-database container with this parameter (set value "true");
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>max-buffer-size: A</parameter> a threshold (in bytes) after which a javax.jcr.Value content will be swapped to a file in a temporary storage. I.e. swap for pending changes.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>max-buffer-size: A</parameter> a threshold (in bytes) after which a javax.jcr.Value content will be swapped to a file in a temporary storage. I.e. swap for pending changes.
+ </para>
- </listitem>
- <listitem>
- <para>
- <parameter>swap-directory</parameter>: A path in the file system used to swap the pending changes.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>swap-directory</parameter>: A path in the file system used to swap the pending changes.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- In this way, we have configured two workspace which will be persisted in two different databases (ws in HSQLDB, ws1 in MySQL).
- </para>
- <note>
- <para>
- Starting from v.1.9 <xref linkend="sect-Reference_Guide-JCR_configuration" /> parameters supports human-readable formats of values (e.g. 200K - 200 Kbytes, 30m - 30 minutes etc)
- </para>
+ </itemizedlist>
+ <para>
+ In this way, we have configured two workspace which will be persisted in two different databases (ws in HSQLDB, ws1 in MySQL).
+ </para>
+ <note>
+ <para>
+ Starting from v.1.9 <xref linkend="sect-Reference_Guide-JCR_configuration" /> parameters supports human-readable formats of values (e.g. 200K - 200 Kbytes, 30m - 30 minutes etc)
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Single_database_configuration">
- <title>Single-database configuration</title>
- <para>
- It's more simple to configure a single-database data container. We have to configure one naming resource.
- </para>
- <para>
- For example (embedded mode for <parameter>jdbcjcr</parameter> data container):
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Single_database_configuration">
+ <title>Single-database configuration</title>
+ <para>
+ It's more simple to configure a single-database data container. We have to configure one naming resource.
+ </para>
+ <para>
+ For example (embedded mode for <parameter>jdbcjcr</parameter> data container):
+ </para>
+
<programlisting language="XML" role="XML"><external-component-plugins>
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
<component-plugin>
@@ -594,13 +575,13 @@
</component-plugin>
</external-component-plugins>
</programlisting>
- <para>
- And configure repository workspaces in repositories configuration with this one database. Parameter "multi-db" must be switched off (set value "false").
- </para>
- <para>
- For example (two workspaces <parameter>ws</parameter> - jdbcjcr, <parameter>ws1</parameter> - jdbcjcr):
- </para>
-
+ <para>
+ And configure repository workspaces in repositories configuration with this one database. Parameter "multi-db" must be switched off (set value "false").
+ </para>
+ <para>
+ For example (two workspaces <parameter>ws</parameter> - jdbcjcr, <parameter>ws1</parameter> - jdbcjcr):
+ </para>
+
<programlisting language="XML" role="XML"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
@@ -659,39 +640,39 @@
</workspace>
</workspaces>
</programlisting>
- <para>
- In this way, we have configured two workspaces which will be persisted in one database (PostgreSQL).
- </para>
- <section id="sect-Reference_Guide-Single_database_configuration-Configuration_without_DataSource">
- <title>Configuration without DataSource</title>
- <para>
- Repository configuration without using of the <classname>javax.sql.DataSource</classname> bounded in JNDI.
- </para>
- <para>
- This case may be usable if you have a dedicated JDBC driver implementation with special features like XA transactions, statements/connections pooling etc:
- <itemizedlist>
- <listitem>
- <para>
- You have to remove the configuration in <classname>InitialContextInitializer</classname> for your database and configure a new one directly in the workspace container.
- </para>
+ <para>
+ In this way, we have configured two workspaces which will be persisted in one database (PostgreSQL).
+ </para>
+ <section id="sect-Reference_Guide-Single_database_configuration-Configuration_without_DataSource">
+ <title>Configuration without DataSource</title>
+ <para>
+ Repository configuration without using of the <classname>javax.sql.DataSource</classname> bounded in JNDI.
+ </para>
+ <para>
+ This case may be usable if you have a dedicated JDBC driver implementation with special features like XA transactions, statements/connections pooling etc:
+ <itemizedlist>
+ <listitem>
+ <para>
+ You have to remove the configuration in <classname>InitialContextInitializer</classname> for your database and configure a new one directly in the workspace container.
+ </para>
- </listitem>
- <listitem>
- <para>
- Remove parameter "source-name" and add next lines instead. Describe your values for a JDBC driver, database url and username.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Remove parameter "source-name" and add next lines instead. Describe your values for a JDBC driver, database url and username.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
- <note>
- <para>
- But be careful in this case JDBC driver should implement and provide connection pooling. Connection pooling is very recommended for use with JCR to prevent a database overload.
- </para>
+ </itemizedlist>
+ </para>
+ <note>
+ <para>
+ But be careful in this case JDBC driver should implement and provide connection pooling. Connection pooling is very recommended for use with JCR to prevent a database overload.
+ </para>
- </note>
-
+ </note>
+
<programlisting language="XML" role="XML"><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
@@ -702,46 +683,46 @@
<property name="password" value=""/>
......</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Single_database_configuration-Dynamic_Workspace_Creation">
- <title>Dynamic Workspace Creation</title>
- <para>
- Workspaces can be added dynamically during runtime.
- </para>
- <para>
- This can be performed in two steps:
- <itemizedlist>
- <listitem>
- <para>
- Firstly, <classname>ManageableRepository.configWorkspace(WorkspaceEntry wsConfig)</classname> - register a new configuration in RepositoryContainer and create a WorkspaceContainer.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Single_database_configuration-Dynamic_Workspace_Creation">
+ <title>Dynamic Workspace Creation</title>
+ <para>
+ Workspaces can be added dynamically during runtime.
+ </para>
+ <para>
+ This can be performed in two steps:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Firstly, <classname>ManageableRepository.configWorkspace(WorkspaceEntry wsConfig)</classname> - register a new configuration in RepositoryContainer and create a WorkspaceContainer.
+ </para>
- </listitem>
- <listitem>
- <para>
- Secondly, the main step, <classname>ManageableRepository.createWorkspace(String workspaceName)</classname> - creation of a new workspace.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Secondly, the main step, <classname>ManageableRepository.createWorkspace(String workspaceName)</classname> - creation of a new workspace.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
+ </itemizedlist>
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Simple_and_Complex_queries">
- <title>Simple and Complex queries</title>
- <para>
- eXo JCR provides two ways for interact with Database - <classname>JDBCStorageConnection</classname> that uses simple queries and <classname>CQJDBCStorageConection</classname> that uses complex queries for reducing amount of database callings.
- </para>
- <para>
- Simple queries will be used if you chose <classname>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</classname>:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Simple_and_Complex_queries">
+ <title>Simple and Complex queries</title>
+ <para>
+ eXo JCR provides two ways for interact with Database - <classname>JDBCStorageConnection</classname> that uses simple queries and <classname>CQJDBCStorageConection</classname> that uses complex queries for reducing amount of database callings.
+ </para>
+ <para>
+ Simple queries will be used if you chose <classname>org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer</classname>:
+ </para>
+
<programlisting language="XML" role="XML"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
@@ -749,90 +730,90 @@
</workspace>
</worksapces>
</programlisting>
- <para>
- Complex queries will be used if you chose <classname>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</classname>:
- </para>
-
+ <para>
+ Complex queries will be used if you chose <classname>org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer</classname>:
+ </para>
+
<programlisting language="XML" role="XML"><workspaces>
<workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
...
</workspace>
</worksapces></programlisting>
- <para>
- Why we should use a Complex Queries?
- <simplelist>
- <member>They are optimised to reduce amount of requests to database.</member>
+ <para>
+ Why we should use a Complex Queries?
+ <simplelist>
+ <member>They are optimised to reduce amount of requests to database.</member>
- </simplelist>
- Why we should use a Simple Queries?
- <simplelist>
- <member>Simple queries implemented in way to support as many database dialects as possible.</member>
- <member>Simple queries do not use sub queries, left or right joins.</member>
+ </simplelist>
+ Why we should use a Simple Queries?
+ <simplelist>
+ <member>Simple queries implemented in way to support as many database dialects as possible.</member>
+ <member>Simple queries do not use sub queries, left or right joins.</member>
- </simplelist>
- </para>
+ </simplelist>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Forse_Query_Hints">
- <title>Forse Query Hints</title>
- <para>
- Some databases supports hints to increase query performance (like Oracle, MySQL, etc). eXo JCR have separate Complex Query implementation for Orcale dialect, that uses query hints to increase performance for few important queries.
- </para>
- <para>
- To enable this option put next configuration property:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Forse_Query_Hints">
+ <title>Forse Query Hints</title>
+ <para>
+ Some databases supports hints to increase query performance (like Oracle, MySQL, etc). eXo JCR have separate Complex Query implementation for Orcale dialect, that uses query hints to increase performance for few important queries.
+ </para>
+ <para>
+ To enable this option put next configuration property:
+ </para>
+
<programlisting language="XML" role="XML"><workspace name="ws" auto-init-root-nodetype="nt:unstructured">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
<property name="dialect" value="oracle"/>
<property name="force.query.hints" value="true" />
......</programlisting>
- <para>
- Query hints enabled by default.
- </para>
- <para>
- eXo JCR uses query hints only for Complex Query Oracle dialect. For all other dialects this parameter is ignored.
- </para>
+ <para>
+ Query hints enabled by default.
+ </para>
+ <para>
+ eXo JCR uses query hints only for Complex Query Oracle dialect. For all other dialects this parameter is ignored.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Notes_for_Microsoft_Windows_users">
- <title>Notes for Microsoft Windows users</title>
- <para>
- The current configuration of eXo JCR uses <ulink url="http://commons.apache.org/dbcp/">Apache DBCP</ulink> connection pool (<classname>org.apache.commons.dbcp.BasicDataSourceFactory</classname>). It's possible to set a big value for maxActive parameter in <filename>configuration.xml</filename>. That means usage of lots of TCP/IP ports from a client machine inside the pool (i.e. JDBC driver). As a result, the data container can throw exceptions like "Address already in use". To solve this problem, you have to configure the client's machine networking software for the usage of shorter timeouts for opened TCP/IP ports.
- </para>
- <para>
- Microsoft Windows has <parameter>MaxUserPort</parameter>, <parameter>TcpTimedWaitDelay</parameter> registry keys in the node <parameter>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters</parameter>, by default these keys are unset, set each one with values like these:
- <itemizedlist>
- <listitem>
- <para>
- "TcpTimedWaitDelay"=dword:0000001e, sets TIME_WAIT parameter to 30 seconds, default is 240.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-JDBC_Data_Container_Config-Notes_for_Microsoft_Windows_users">
+ <title>Notes for Microsoft Windows users</title>
+ <para>
+ The current configuration of eXo JCR uses <ulink url="http://commons.apache.org/dbcp/">Apache DBCP</ulink> connection pool (<classname>org.apache.commons.dbcp.BasicDataSourceFactory</classname>). It's possible to set a big value for maxActive parameter in <filename>configuration.xml</filename>. That means usage of lots of TCP/IP ports from a client machine inside the pool (i.e. JDBC driver). As a result, the data container can throw exceptions like "Address already in use". To solve this problem, you have to configure the client's machine networking software for the usage of shorter timeouts for opened TCP/IP ports.
+ </para>
+ <para>
+ Microsoft Windows has <parameter>MaxUserPort</parameter>, <parameter>TcpTimedWaitDelay</parameter> registry keys in the node <parameter>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters</parameter>, by default these keys are unset, set each one with values like these:
+ <itemizedlist>
+ <listitem>
+ <para>
+ "TcpTimedWaitDelay"=dword:0000001e, sets TIME_WAIT parameter to 30 seconds, default is 240.
+ </para>
- </listitem>
- <listitem>
- <para>
- "MaxUserPort"=dword:00001b58, sets the maximum of open ports to 7000 or higher, default is 5000.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ "MaxUserPort"=dword:00001b58, sets the maximum of open ports to 7000 or higher, default is 5000.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- </para>
- <para>
- A sample registry file is below:
- </para>
-
+ </itemizedlist>
+ </para>
+ <para>
+ A sample registry file is below:
+ </para>
+
<programlisting>Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:00001b58
"TcpTimedWaitDelay"=dword:0000001e</programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jbosscache-configuration-templates.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,76 +4,76 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JBoss_Cache_configuration">
- <title>JBoss Cache configuration</title>
- <section id="sect-Reference_Guide-JBoss_Cache_configuration-JBoss_cache_configuration_for_indexer_lock_manager_and_data_container">
- <title>JBoss cache configuration for indexer, lock manager and data container</title>
- <para>
- Each mentioned components uses instances of JBoss Cache product for caching in clustered environment. So every element has it's own transport and has to be configured in a proper way. As usual, workspaces have similar configuration but with different cluster-names and may-be some other parameters. The simplest way to configure them is to define their own configuration files for each component in each workspace:
- </para>
-
-<programlisting language="XML" role="XML"><property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-lock-db1-ws1.xml" /></programlisting>
- <para>
- But if there are few workspaces, configuring them in such a way can be painful and hard-manageable. eXo JCR offers a template-based configuration for JBoss Cache instances. You can have one template for Lock Manager, one for Indexer and one for data container and use them in all the workspaces, defining the map of substitution parameters in a main configuration file. Just simply define ${jbosscache-<parameter name>} inside xml-template and list correct value in JCR configuration file just below "jbosscache-configuration", as shown:
- </para>
- <para>
- Template:
- </para>
-
+ <title>JBoss Cache configuration</title>
+ <section id="sect-Reference_Guide-JBoss_Cache_configuration-JBoss_cache_configuration_for_indexer_lock_manager_and_data_container">
+ <title>JBoss cache configuration for indexer, lock manager and data container</title>
+ <para>
+ Each mentioned components uses instances of JBoss Cache product for caching in clustered environment. So every element has it's own transport and has to be configured in a proper way. As usual, workspaces have similar configuration but with different cluster-names and may-be some other parameters. The simplest way to configure them is to define their own configuration files for each component in each workspace:
+ </para>
+
+<programlisting language="XML" role="XML"><property name="jbosscache-configuration" value="conf/<remark>standalone</remark>/test-jbosscache-lock-db1-ws1.xml" /></programlisting>
+ <para>
+ But if there are few workspaces, configuring them in such a way can be painful and hard-manageable. eXo JCR offers a template-based configuration for JBoss Cache instances. You can have one template for Lock Manager, one for Indexer and one for data container and use them in all the workspaces, defining the map of substitution parameters in a main configuration file. Just simply define ${jbosscache-<parameter name>} inside xml-template and list correct value in JCR configuration file just below "jbosscache-configuration", as shown:
+ </para>
+ <para>
+ Template:
+ </para>
+
<programlisting language="XML" role="XML">...
<clustering mode="replication" clusterName="${jbosscache-cluster-name}">
<stateRetrieval timeout="20000" fetchInMemoryState="false" />
...</programlisting>
- <para>
- and JCR configuration file:
- </para>
-
+ <para>
+ and JCR configuration file:
+ </para>
+
<programlisting language="XML" role="XML">...
<property name="jbosscache-configuration" value="jar:/conf/portal/jbosscache-lock.xml" />
<property name="jbosscache-cluster-name" value="JCR-cluster-locks-db1-ws" />
...</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JBoss_Cache_configuration-JGroups_configuration">
- <title>JGroups configuration</title>
- <para>
- JGroups is used by JBoss Cache for network communications and transport in a clustered environment. If property "jgroups-configuration" is defined in component configuration, it will be injected into the JBoss Cache instance on startup.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JBoss_Cache_configuration-JGroups_configuration">
+ <title>JGroups configuration</title>
+ <para>
+ JGroups is used by JBoss Cache for network communications and transport in a clustered environment. If property "jgroups-configuration" is defined in component configuration, it will be injected into the JBoss Cache instance on startup.
+ </para>
+
<programlisting language="XML" role="XML"><property name="jgroups-configuration" value="your/path/to/modified-udp.xml" /></programlisting>
- <para>
- As mentioned above, each component (lock manager, data container and query handler) for each workspace requires its own clustered environment. In other words, they have their own clusters with unique names. By default, each cluster should perform multi-casts on a separate port. This configuration leads to much unnecessary overhead on cluster. That's why JGroups offers multiplexer feature, providing ability to use one single channel for set of clusters. This feature reduces network overheads and increase performance and stability of application. To enable multiplexer stack, you should define appropriate configuration file (upd-mux.xml is pre-shipped one with eXo JCR) and set "jgroups-multiplexer-stack" into "true".
- </para>
-
+ <para>
+ As mentioned above, each component (lock manager, data container and query handler) for each workspace requires its own clustered environment. In other words, they have their own clusters with unique names. By default, each cluster should perform multi-casts on a separate port. This configuration leads to much unnecessary overhead on cluster. That's why JGroups offers multiplexer feature, providing ability to use one single channel for set of clusters. This feature reduces network overheads and increase performance and stability of application. To enable multiplexer stack, you should define appropriate configuration file (upd-mux.xml is pre-shipped one with eXo JCR) and set "jgroups-multiplexer-stack" into "true".
+ </para>
+
<programlisting language="XML" role="XML"><property name="jgroups-configuration" value="jar:/conf/portal/udp-mux.xml" />
<property name="jgroups-multiplexer-stack" value="true" /></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-JBoss_Cache_configuration-Allow_to_share_JBoss_Cache_instances">
- <title>Allow to share JBoss Cache instances</title>
- <para>
- A JBoss Cache instance is quite resource consuming and by default we will have 3 JBoss Cache instances (one instance for the indexer, one for the lock manager and one for the data container) for each workspace, so if you intend to have a lot of workspaces it could make sense to decide to share one JBoss Cache instance with several cache instances of the same type (i.e. indexer, lock manager or data container). This feature is disabled by default and can be enabled at component configuration level (i.e. indexer configuration, lock manager configuration and/or data container configuration) by setting the property "jbosscache-shareable" to true as below:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JBoss_Cache_configuration-Allow_to_share_JBoss_Cache_instances">
+ <title>Allow to share JBoss Cache instances</title>
+ <para>
+ A JBoss Cache instance is quite resource consuming and by default we will have 3 JBoss Cache instances (one instance for the indexer, one for the lock manager and one for the data container) for each workspace, so if you intend to have a lot of workspaces it could make sense to decide to share one JBoss Cache instance with several cache instances of the same type (i.e. indexer, lock manager or data container). This feature is disabled by default and can be enabled at component configuration level (i.e. indexer configuration, lock manager configuration and/or data container configuration) by setting the property "jbosscache-shareable" to true as below:
+ </para>
+
<programlisting language="XML" role="XML"><property name="jbosscache-shareable" value="true" /></programlisting>
- <para>
- Once enabled this feature will allow the JBoss Cache instance used by the component to be re-used by another components of the same type (i.e. indexer, lock manager or data container) with the exact same JBoss Cache configuration (except the eviction configuration that cans be different), which means that all the parameters of type ${jbosscache-<parameter name>} must be identical between the components of same type of different workspaces. In other words, if we use the same values for the parameters of type ${jbosscache-<parameter name>} in each workspace, we will have only 3 JBoss Cache instances (one instance for the indexer, one for the lock manager and one for the data container) used whatever the total amount of workspaces defined.
- </para>
+ <para>
+ Once enabled this feature will allow the JBoss Cache instance used by the component to be re-used by another components of the same type (i.e. indexer, lock manager or data container) with the exact same JBoss Cache configuration (except the eviction configuration that cans be different), which means that all the parameters of type ${jbosscache-<parameter name>} must be identical between the components of same type of different workspaces. In other words, if we use the same values for the parameters of type ${jbosscache-<parameter name>} in each workspace, we will have only 3 JBoss Cache instances (one instance for the indexer, one for the lock manager and one for the data container) used whatever the total amount of workspaces defined.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JBoss_Cache_configuration-Shipped_JBoss_Cache_configuration_templates">
- <title>Shipped JBoss Cache configuration templates</title>
- <para>
- eXo JCR implementation is shipped with ready-to-use JBoss Cache configuration templates for JCR's components. They are situated in application package in /conf/porta/ folder.
- </para>
- <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Data_container_template">
- <title>Data container template</title>
- <para>
- Data container template is "jbosscache-data.xml":
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-JBoss_Cache_configuration-Shipped_JBoss_Cache_configuration_templates">
+ <title>Shipped JBoss Cache configuration templates</title>
+ <para>
+ eXo JCR implementation is shipped with ready-to-use JBoss Cache configuration templates for JCR's components. They are situated in application package in /conf/porta/ folder.
+ </para>
+ <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Data_container_template">
+ <title>Data container template</title>
+ <para>
+ Data container template is "jbosscache-data.xml":
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
@@ -96,42 +96,42 @@
</default>
</eviction>
</jbosscache></programlisting>
- <table id="tabl-Reference_Guide-Data_container_template-Template_variables">
- <title>Template variables</title>
- <tgroup cols="1">
- <thead>
- <row>
- <entry align="center">
- Variable
- </entry>
+ <table id="tabl-Reference_Guide-Data_container_template-Template_variables">
+ <title>Template variables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">
+ Variable
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- jbosscache-cluster-name
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ jbosscache-cluster-name
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- </para>
+ </table>
+ <para>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Lock_manager_template">
- <title>Lock manager template</title>
- <para>
- It's template name is "jbosscache-lock.xml"
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Lock_manager_template">
+ <title>Lock manager template</title>
+ <para>
+ It's template name is "jbosscache-lock.xml"
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
@@ -163,100 +163,100 @@
</loader>
</loaders>
</jbosscache></programlisting>
- <table id="tabl-Reference_Guide-Lock_manager_template-Template_variables">
- <title>Template variables</title>
- <tgroup cols="1">
- <thead>
- <row>
- <entry align="center">
- Variable
- </entry>
+ <table id="tabl-Reference_Guide-Lock_manager_template-Template_variables">
+ <title>Template variables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">
+ Variable
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- jbosscache-cluster-name
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ jbosscache-cluster-name
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.table.name
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.table.name
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.table.create
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.table.create
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.table.drop
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.table.drop
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.table.primarykey
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.table.primarykey
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.fqn.column
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.fqn.column
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.fqn.type
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.fqn.type
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.node.column
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.node.column
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.node.type
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.node.type
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.parent.column
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.parent.column
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cl-cache.jdbc.datasource
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cl-cache.jdbc.datasource
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
- <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Query_handler_indexer_template">
- <title>Query handler (indexer) template</title>
- <para>
- Have a look at "jbosscache-indexer.xml"
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Shipped_JBoss_Cache_configuration_templates-Query_handler_indexer_template">
+ <title>Query handler (indexer) template</title>
+ <para>
+ Have a look at "jbosscache-indexer.xml"
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
@@ -274,36 +274,36 @@
</default>
</eviction>
</jbosscache></programlisting>
- <table id="tabl-Reference_Guide-Query_handler_indexer_template-Template_variables">
- <title>Template variables</title>
- <tgroup cols="1">
- <thead>
- <row>
- <entry align="center">
- Variable
- </entry>
+ <table id="tabl-Reference_Guide-Query_handler_indexer_template-Template_variables">
+ <title>Template variables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry align="center">
+ Variable
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- jbosscache-cluster-name
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ jbosscache-cluster-name
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jca.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jca.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/jca.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,21 +4,21 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-The_JCA_Resource_Adapter">
- <title>The <emphasis>JCA</emphasis> Resource Adapter</title>
- <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Overview">
- <title>Overview</title>
- <para>
- eXo JCR supports <emphasis>J2EE Connector Architecture</emphasis> 1.5, thus If you would like to delegate the JCR Session lifecycle to your application server, you can use the JCA Resource Adapter for eXo JCR if your application server supports JCA 1.5. This adapter only supports XA Transaction, in other words you cannot use it for local transactions. Since the JCR Sessions have not been designed to be shareable, the session pooling is simply not covered by the adapter.
- </para>
+ <title>The <emphasis>JCA</emphasis> Resource Adapter</title>
+ <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Overview">
+ <title>Overview</title>
+ <para>
+ eXo JCR supports <emphasis>J2EE Connector Architecture</emphasis> 1.5, thus If you would like to delegate the JCR Session lifecycle to your application server, you can use the JCA Resource Adapter for eXo JCR if your application server supports JCA 1.5. This adapter only supports XA Transaction, in other words you cannot use it for local transactions. Since the JCR Sessions have not been designed to be shareable, the session pooling is simply not covered by the adapter.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-The_SessionFactory">
- <title>The <emphasis>SessionFactory</emphasis></title>
- <para>
- The equivalent of the <emphasis>javax.resource.cci.ConnectionFactory</emphasis> in JCA terminology is <emphasis>org.exoplatform.connectors.jcr.adapter.SessionFactory</emphasis> in the context of eXo JCR, the resource that you will get thanks to a JNDI lookup is of type <emphasis>SessionFactory</emphasis> and provides the following methods:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-The_SessionFactory">
+ <title>The <emphasis>SessionFactory</emphasis></title>
+ <para>
+ The equivalent of the <emphasis>javax.resource.cci.ConnectionFactory</emphasis> in JCA terminology is <emphasis>org.exoplatform.connectors.jcr.adapter.SessionFactory</emphasis> in the context of eXo JCR, the resource that you will get thanks to a JNDI lookup is of type <emphasis>SessionFactory</emphasis> and provides the following methods:
+ </para>
+
<programlisting> /**
* Get a JCR session corresponding to the repository
* defined in the configuration and the default workspace.
@@ -59,50 +59,50 @@
*/
Session getSession(String workspace, String userName, String password) throws RepositoryException;</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Configuration">
- <title>Configuration</title>
- <table id="tabl-Reference_Guide-Configuration-Configuration_Properties">
- <title>Configuration Properties</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- <emphasis>PortalContainer</emphasis>
- </entry>
- <entry>
- In case of the portal mode, if no portal container can be found in the context of the request, the adapter will use the value of this parameter to get the name of the expected portal container to create the JCR sessions. In case of a standalone mode, this parameter is not used. This parameter is optional, by default the default portal container will be used.
- </entry>
+ </section>
+
+ <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Configuration">
+ <title>Configuration</title>
+ <table id="tabl-Reference_Guide-Configuration-Configuration_Properties">
+ <title>Configuration Properties</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ <emphasis>PortalContainer</emphasis>
+ </entry>
+ <entry>
+ In case of the portal mode, if no portal container can be found in the context of the request, the adapter will use the value of this parameter to get the name of the expected portal container to create the JCR sessions. This parameter is optional, by default the default portal container will be used.
+ </entry>
- </row>
- <row>
- <entry>
- <emphasis>Repository</emphasis>
- </entry>
- <entry>
- The repository name used to create JCR sessions. This parameter is optional, by default the current repository will be used.
- </entry>
+ </row>
+ <row>
+ <entry>
+ <emphasis>Repository</emphasis>
+ </entry>
+ <entry>
+ The repository name used to create JCR sessions. This parameter is optional, by default the current repository will be used.
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
- <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Deployment">
- <title>Deployment</title>
- <para>
- In case of the standalone mode where the JCR and its dependencies are not provided, you will need to deploy the whole ear file corresponding to the artifactId <emphasis>exo.jcr.ear</emphasis> and groupId <emphasis>org.exoplatform.jcr</emphasis>, the rar file is embedded into the ear file. In case the JCR and its dependencies are provided like when you use it with gateIn for example, you will need to deploy only the rar file corresponding to the artifactId <emphasis>exo.jcr.connectors.jca</emphasis> and groupId <emphasis>org.exoplatform.jcr</emphasis>.
- </para>
- <para>
- Then you will need to configure the connector itself, for example for JBoss AS, you need to create in your deploy directory a file of type <emphasis>*-ds.xml</emphasis> (jcr-ds.xml for example) with the following content:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-The_JCA_Resource_Adapter-Deployment">
+ <title>Deployment</title>
+ <para>
+ As the JCR and its dependencies are provided when you use it with gateIn you will need to deploy only the rar file corresponding to the artifactId <emphasis>exo.jcr.connectors.jca</emphasis> and groupId <emphasis>org.exoplatform.jcr</emphasis>.
+ </para>
+ <para>
+ Then you will need to configure the connector itself, for example for JBoss AS, you need to create in your deploy directory a file of type <emphasis>*-ds.xml</emphasis> (jcr-ds.xml for example) with the following content:
+ </para>
+
<programlisting><connection-factories>
<tx-connection-factory>
<jndi-name>jcr/repository</jndi-name>
@@ -118,7 +118,7 @@
</tx-connection-factory>
</connection-factories></programlisting>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/other/binary-values-processing.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,42 +4,42 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Binary_Values_Processing">
- <title>Binary Values Processing</title>
- <section id="sect-Reference_Guide-Binary_Values_Processing-Configuration">
- <title>Configuration</title>
- <para>
- Binary large object (BLOB) properties can be stored in two ways in the eXo JCR: in the database with items information or in an external storage on host file system. These options can be configured at workspace in the repository configuration file (repository-configuration.xml in portal and exo-jcr-config.xml in standalone mode). The database storage can't be completely disabled.
- </para>
- <para>
- The first case is optimal for most of cases which you do not use very large values or/and do not have too many BLOBs. The configuration of the BLOBs size and BLOBs quantity in a repository depend on your database features and hardware.
- </para>
- <para>
- The second case is to use an external values storage. The storage can be located on a built-in hard disk or on an attached storage. But in any cases, you should access to the storage as if it was a regular file(s). The external value storage is optional and can be enabled in a database configuration.
- </para>
- <note>
- <para>
- eXo JCR Repository service configuration basics is discussed in <xref linkend="sect-Reference_Guide-JCR_configuration" />
- </para>
- <para>
- Database and workspace persistence storage configuration is discussed in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />
- </para>
- <para>
- Configuration details for <xref linkend="sect-Reference_Guide-External_Value_Storages" />.
- </para>
+ <title>Binary Values Processing</title>
+ <section id="sect-Reference_Guide-Binary_Values_Processing-Configuration">
+ <title>Configuration</title>
+ <para>
+ Binary large object (BLOB) properties can be stored in two ways in the eXo JCR: in the database with items information or in an external storage on host file system. These options can be configured at workspace in the repository configuration file (repository-configuration.xml). The database storage can't be completely disabled.
+ </para>
+ <para>
+ The first case is optimal for most of cases which you do not use very large values or/and do not have too many BLOBs. The configuration of the BLOBs size and BLOBs quantity in a repository depend on your database features and hardware.
+ </para>
+ <para>
+ The second case is to use an external values storage. The storage can be located on a built-in hard disk or on an attached storage. But in any cases, you should access to the storage as if it was a regular file(s). The external value storage is optional and can be enabled in a database configuration.
+ </para>
+ <note>
+ <para>
+ eXo JCR Repository service configuration basics is discussed in <xref linkend="sect-Reference_Guide-JCR_configuration" />
+ </para>
+ <para>
+ Database and workspace persistence storage configuration is discussed in <xref linkend="sect-Reference_Guide-JDBC_Data_Container_Config" />
+ </para>
+ <para>
+ Configuration details for <xref linkend="sect-Reference_Guide-External_Value_Storages" />.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Binary_Values_Processing-Usage">
- <title>Usage</title>
- <para>
- In both of the cases, a developer can set/update the binary Property via Node.setProperty(String, InputStream), Property.setValue(InputStream) as described in the spec JSR-170. Also, there is the setter with a ready Value object (obtainer from ValueFactory.createValue(InputStream)).
- </para>
- <para>
- An example of a specification usage.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Binary_Values_Processing-Usage">
+ <title>Usage</title>
+ <para>
+ In both of the cases, a developer can set/update the binary Property via Node.setProperty(String, InputStream), Property.setValue(InputStream) as described in the spec JSR-170. Also, there is the setter with a ready Value object (obtainer from ValueFactory.createValue(InputStream)).
+ </para>
+ <para>
+ An example of a specification usage.
+ </para>
+
<programlisting language="Java" role="Java">// Set the property value with given stream content.
Property binProp = node.setProperty("BinData", myDataStream);
// Get the property value stream.
@@ -54,34 +54,34 @@
updatedBinProp.setValue(ValueFactory.createValue(newDataStream));
// Get the updated property value stream.
InputStream newStream = updatedBinProp.getStream();</programlisting>
- <para>
- But if you need to update the property sequentially and with partial content, you have no choice but to edit the whole data stream outside and get it back to the repository each time. In case of really large-sized data, the application will be stuck and the productivity will decrease a lot. JCR stream setters will also check constraints and perform common validation each time.
- </para>
- <para>
- There is a feature of the eXo JCR extension that can be used for binary values partial writing without frequent session level calls. The main idea is to use a value object obtained from the property as the storage of the property content while writing/reading during runtime.
- </para>
- <para>
- According to the spec JSR-170, Value interface provides the state of property that can't be changed (edited). The eXo JCR core provides ReadableBinaryValue and EditableBinaryValue interfaces which themselves extend JCR Value. The interfaces allow the user to partially read and change a value content.
- </para>
- <para>
- ReadableBinaryValue value can be casted from any value, i.e. String, Binary, Date etc.
- </para>
-
+ <para>
+ But if you need to update the property sequentially and with partial content, you have no choice but to edit the whole data stream outside and get it back to the repository each time. In case of really large-sized data, the application will be stuck and the productivity will decrease a lot. JCR stream setters will also check constraints and perform common validation each time.
+ </para>
+ <para>
+ There is a feature of the eXo JCR extension that can be used for binary values partial writing without frequent session level calls. The main idea is to use a value object obtained from the property as the storage of the property content while writing/reading during runtime.
+ </para>
+ <para>
+ According to the spec JSR-170, Value interface provides the state of property that can't be changed (edited). The eXo JCR core provides ReadableBinaryValue and EditableBinaryValue interfaces which themselves extend JCR Value. The interfaces allow the user to partially read and change a value content.
+ </para>
+ <para>
+ ReadableBinaryValue value can be casted from any value, i.e. String, Binary, Date etc.
+ </para>
+
<programlisting language="Java" role="Java">// get the property value of type PropertyType.STRING
ReadableBinaryValue extValue = (ReadableBinaryValue) node.getProperty("LargeText").getValue();
// read 200 bytes to a destStream from the position 1024 in the value content
OutputStream destStream = new FileOutputStream("MyTextFile.txt");
extValue.read(destStream, 200, 1024);</programlisting>
- <para>
- But EditableBinaryValue can be applied only to properties of type PropertyType.BINARY. In other cases, a cast to EditableBinaryValue will fail.
- </para>
- <para>
- After the value has been edited, the EditableBinaryValue value can be applied to the property using the standard setters (Property.setValue(Value), Property.setValues(Value), Node.setProperty(String, Value) etc.). Only after the EditableBinaryValue has been set to the property, it can be obtained in this session by getters (Property.getValue(), Node.getProperty(String) etc.).
- </para>
- <para>
- The user can obtain an EditableBinaryValue instance and fill it with data in an interaction manner (or any other appropriated to the targets) and return (set) the value to the property after the content will be done.
- </para>
-
+ <para>
+ But EditableBinaryValue can be applied only to properties of type PropertyType.BINARY. In other cases, a cast to EditableBinaryValue will fail.
+ </para>
+ <para>
+ After the value has been edited, the EditableBinaryValue value can be applied to the property using the standard setters (Property.setValue(Value), Property.setValues(Value), Node.setProperty(String, Value) etc.). Only after the EditableBinaryValue has been set to the property, it can be obtained in this session by getters (Property.getValue(), Node.getProperty(String) etc.).
+ </para>
+ <para>
+ The user can obtain an EditableBinaryValue instance and fill it with data in an interaction manner (or any other appropriated to the targets) and return (set) the value to the property after the content will be done.
+ </para>
+
<programlisting language="Java" role="Java">// get the property value for PropertyType.BINARY Property
EditableBinaryValue extValue = (EditableBinaryValue) node.getProperty("BinData").getValue();
@@ -93,10 +93,10 @@
// save the Property to persistence
node.save();</programlisting>
- <para>
- A practical example of the iterative usage. In this example, the value is updated with data from the sequence of streams and after the update is done, the value will be applied to the property and be visible during the session.
- </para>
-
+ <para>
+ A practical example of the iterative usage. In this example, the value is updated with data from the sequence of streams and after the update is done, the value will be applied to the property and be visible during the session.
+ </para>
+
<programlisting language="Java" role="Java">// update length bytes from the stream starting from the particular
// position in the existing Value data
int dpos = 1024;
@@ -108,42 +108,42 @@
// apply the edited EditableBinaryValue to the Property
node.setProperty("BinData", extValue);</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Binary_Values_Processing-Value_implementations">
- <title>Value implementations</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eXoJCR/other/binaryvalue.png" width="444" />
- </imageobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Binary_Values_Processing-Value_implementations">
+ <title>Value implementations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eXoJCR/other/binaryvalue.png" width="444" />
+ </imageobject>
- </mediaobject>
- <para>
- ReadableBinaryValue has one method to read Value.
- </para>
- <para>
- Read length bytes is counted from the binary value to the given position into the stream.
- </para>
-
+ </mediaobject>
+ <para>
+ ReadableBinaryValue has one method to read Value.
+ </para>
+ <para>
+ Read length bytes is counted from the binary value to the given position into the stream.
+ </para>
+
<programlisting language="Java" role="Java">long read(OutputStream stream, long length, long position) throws IOException, RepositoryException ;</programlisting>
- <para>
- EditableBinaryValue has two methods to edit value.
- </para>
- <para>
- Update with length bytes from the specified stream to this value data at a position. If the position is lower than 0, the IOException exception will be thrown. If the position is higher than the current Value length, the Value length will be increased at first to the size of position and length bytes will be added after the position.
- </para>
-
+ <para>
+ EditableBinaryValue has two methods to edit value.
+ </para>
+ <para>
+ Update with length bytes from the specified stream to this value data at a position. If the position is lower than 0, the IOException exception will be thrown. If the position is higher than the current Value length, the Value length will be increased at first to the size of position and length bytes will be added after the position.
+ </para>
+
<programlisting language="Java" role="Java">void update(InputStream stream, long length, long position) throws IOException;</programlisting>
- <para>
- Set the length of the Value in bytes to the specified size. If the size is lower than 0, the IOException exception will be thrown. This operation can be used to extend or truncat the Value size. This method is used internally in the update operation in case of extending the size to the given position.
- </para>
-
+ <para>
+ Set the length of the Value in bytes to the specified size. If the size is lower than 0, the IOException exception will be thrown. This operation can be used to extend or truncat the Value size. This method is used internally in the update operation in case of extending the size to the given position.
+ </para>
+
<programlisting language="Java" role="Java">void setLength(long size) throws IOException;</programlisting>
- <para>
- An application can perform JCR binary operations more flexibly and will have less I/O and CPU usage using these methods.
- </para>
+ <para>
+ An application can perform JCR binary operations more flexibly and will have less I/O and CPU usage using these methods.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/performance-tuning-guide.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,372 +4,372 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide">
- <title>JCR Performance Tuning Guide</title>
- <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-Introduction">
- <title>Introduction</title>
- <para>
- This guide will show you possible ways of improving JCR performance.
- </para>
- <para>
- It is intended to GateIn Administrators and those who wants to use JCR features.
- </para>
+ <title>JCR Performance Tuning Guide</title>
+ <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-Introduction">
+ <title>Introduction</title>
+ <para>
+ This guide will show you possible ways of improving JCR performance.
+ </para>
+ <para>
+ It is intended to GateIn Administrators and those who wants to use JCR features.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-JCR_Performance_and_Scalability">
- <title>JCR Performance and Scalability</title>
- <section id="sect-Reference_Guide-JCR_Performance_and_Scalability-Cluster_configuration">
- <title>Cluster configuration</title>
- <para>
- <citetitle>EC2 network</citetitle>: 1Gbit
- </para>
- <para>
- <citetitle>Servers hardware</citetitle>:
- <simplelist>
- <member>7.5 GB memory</member>
- <member>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)</member>
- <member>850 GB instance storage (2×420 GB plus 10 GB root partition)</member>
- <member>64-bit platform</member>
- <member>I/O Performance: High</member>
- <member>API name: m1.large</member>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-JCR_Performance_and_Scalability">
+ <title>JCR Performance and Scalability</title>
+ <section id="sect-Reference_Guide-JCR_Performance_and_Scalability-Cluster_configuration">
+ <title>Cluster configuration</title>
+ <para>
+ <citetitle>EC2 network</citetitle>: 1Gbit
+ </para>
+ <para>
+ <citetitle>Servers hardware</citetitle>:
+ <simplelist>
+ <member>7.5 GB memory</member>
+ <member>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)</member>
+ <member>850 GB instance storage (2×420 GB plus 10 GB root partition)</member>
+ <member>64-bit platform</member>
+ <member>I/O Performance: High</member>
+ <member>API name: m1.large</member>
- </simplelist>
- </para>
- <note>
- <para>
- NFS and statistics (cacti snmp) server were located on one physical server.
- </para>
+ </simplelist>
+ </para>
+ <note>
+ <para>
+ NFS and statistics (cacti snmp) server were located on one physical server.
+ </para>
- </note>
- <para>
- <citetitle>JBoss AS configuration</citetitle>
- </para>
- <para>
- <code>JAVA_OPTS: -Dprogram.name=run.sh -server -Xms4g -Xmx4g -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true</code>
- </para>
+ </note>
+ <para>
+ <citetitle>JBoss AS configuration</citetitle>
+ </para>
+ <para>
+ <code>JAVA_OPTS: -Dprogram.name=run.sh -server -Xms4g -Xmx4g -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true</code>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-JCR_Performance_and_Scalability-JCR_Clustered_Performance">
- <title>JCR Clustered Performance</title>
- <para>
- Benchmark test using webdav (Complex read/write load test (benchmark)) with 20K same file. To obtain per-operation results we have used custom output from the testscase threads to CSV file.
- </para>
- <para>
- <citetitle>Read operation</citetitle>:
- <simplelist>
- <member>Warm-up iterations: 100</member>
- <member>Run iterations: 2000</member>
- <member>Background writing threads: 25</member>
- <member>Reading threads: 225</member>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Performance_and_Scalability-JCR_Clustered_Performance">
+ <title>JCR Clustered Performance</title>
+ <para>
+ Benchmark test using webdav (Complex read/write load test (benchmark)) with 20K same file. To obtain per-operation results we have used custom output from the testscase threads to CSV file.
+ </para>
+ <para>
+ <citetitle>Read operation</citetitle>:
+ <simplelist>
+ <member>Warm-up iterations: 100</member>
+ <member>Run iterations: 2000</member>
+ <member>Background writing threads: 25</member>
+ <member>Reading threads: 225</member>
- </simplelist>
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eXoJCR/perf_EC2_results.jpg" />
- </imageobject>
+ </simplelist>
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eXoJCR/perf_EC2_results.jpg" />
+ </imageobject>
- </mediaobject>
- <table>
- <title></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>
- Nodes count
- </entry>
- <entry>
- tps
- </entry>
- <entry>
- Responses >2s
- </entry>
- <entry>
- Responses >4s
- </entry>
+ </mediaobject>
+ <table>
+ <title></title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>
+ Nodes count
+ </entry>
+ <entry>
+ tps
+ </entry>
+ <entry>
+ Responses >2s
+ </entry>
+ <entry>
+ Responses >4s
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- 1
- </entry>
- <entry>
- 523
- </entry>
- <entry>
- 6.87%
- </entry>
- <entry>
- 1.27%
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ 1
+ </entry>
+ <entry>
+ 523
+ </entry>
+ <entry>
+ 6.87%
+ </entry>
+ <entry>
+ 1.27%
+ </entry>
- </row>
- <row>
- <entry>
- 2
- </entry>
- <entry>
- 1754
- </entry>
- <entry>
- 0.64%
- </entry>
- <entry>
- 0.08%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 2
+ </entry>
+ <entry>
+ 1754
+ </entry>
+ <entry>
+ 0.64%
+ </entry>
+ <entry>
+ 0.08%
+ </entry>
- </row>
- <row>
- <entry>
- 3
- </entry>
- <entry>
- 2388
- </entry>
- <entry>
- 0.49%
- </entry>
- <entry>
- 0.09%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 3
+ </entry>
+ <entry>
+ 2388
+ </entry>
+ <entry>
+ 0.49%
+ </entry>
+ <entry>
+ 0.09%
+ </entry>
- </row>
- <row>
- <entry>
- 4
- </entry>
- <entry>
- 2706
- </entry>
- <entry>
- 0.46%
- </entry>
- <entry>
- 0.1%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 4
+ </entry>
+ <entry>
+ 2706
+ </entry>
+ <entry>
+ 0.46%
+ </entry>
+ <entry>
+ 0.1%
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
- <para>
- <citetitle>Read operaion with more threads</citetitle>:
- </para>
- <simplelist>
- <member>Warm-up iterations: 100</member>
- <member>Run iterations: 2000</member>
- <member>Background writing threads: 50</member>
- <member>Reading threads: 450</member>
+ </table>
+ <para>
+ <citetitle>Read operaion with more threads</citetitle>:
+ </para>
+ <simplelist>
+ <member>Warm-up iterations: 100</member>
+ <member>Run iterations: 2000</member>
+ <member>Background writing threads: 50</member>
+ <member>Reading threads: 450</member>
- </simplelist>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eXoJCR/perf_EC2_results_2.jpg" />
- </imageobject>
+ </simplelist>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eXoJCR/perf_EC2_results_2.jpg" />
+ </imageobject>
- </mediaobject>
- <table>
- <title></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>
- Nodes count
- </entry>
- <entry>
- tps
- </entry>
- <entry>
- Responses >2s
- </entry>
- <entry>
- Responses >4s
- </entry>
+ </mediaobject>
+ <table>
+ <title></title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>
+ Nodes count
+ </entry>
+ <entry>
+ tps
+ </entry>
+ <entry>
+ Responses >2s
+ </entry>
+ <entry>
+ Responses >4s
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- 1
- </entry>
- <entry>
- 116
- </entry>
- <entry>
- ?
- </entry>
- <entry>
- ?
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ 1
+ </entry>
+ <entry>
+ 116
+ </entry>
+ <entry>
+ ?
+ </entry>
+ <entry>
+ ?
+ </entry>
- </row>
- <row>
- <entry>
- 2
- </entry>
- <entry>
- 1558
- </entry>
- <entry>
- 6.1%
- </entry>
- <entry>
- 0.6%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 2
+ </entry>
+ <entry>
+ 1558
+ </entry>
+ <entry>
+ 6.1%
+ </entry>
+ <entry>
+ 0.6%
+ </entry>
- </row>
- <row>
- <entry>
- 3
- </entry>
- <entry>
- 2242
- </entry>
- <entry>
- 3.1%
- </entry>
- <entry>
- 0.38%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 3
+ </entry>
+ <entry>
+ 2242
+ </entry>
+ <entry>
+ 3.1%
+ </entry>
+ <entry>
+ 0.38%
+ </entry>
- </row>
- <row>
- <entry>
- 4
- </entry>
- <entry>
- 2756
- </entry>
- <entry>
- 2.2%
- </entry>
- <entry>
- 0.41%
- </entry>
+ </row>
+ <row>
+ <entry>
+ 4
+ </entry>
+ <entry>
+ 2756
+ </entry>
+ <entry>
+ 2.2%
+ </entry>
+ <entry>
+ 0.41%
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-Performance_Tuning_Guide">
- <title>Performance Tuning Guide</title>
- <section id="sect-Reference_Guide-Performance_Tuning_Guide-JBoss_AS_Tuning">
- <title>JBoss AS Tuning</title>
- <para>
- You can use <parameter>maxThreads</parameter> parameter to increase maximum amount of threads that can be launched in AS instance. This can improve performance if you need a high level of concurrency. also you can use <code>-XX:+UseParallelGC</code> java directory to use paralel garbage collector.
- </para>
- <note>
- <title>Note</title>
- <para>
- Beware of setting <parameter>maxThreads</parameter> too big, this can cause <exceptionname>OutOfMemoryError</exceptionname>. We've got it with <code>maxThreads=1250</code> on such machine:
- </para>
- <simplelist>
- <member>7.5 GB memory</member>
- <member>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)</member>
- <member>850 GB instance storage (2×420 GB plus 10 GB root partition)</member>
- <member>64-bit platform</member>
- <member>I/O Performance: High</member>
- <member>API name: m1.large</member>
- <member>java -Xmx 4g</member>
+ </section>
+
+ <section id="sect-Reference_Guide-JCR_Performance_Tuning_Guide-Performance_Tuning_Guide">
+ <title>Performance Tuning Guide</title>
+ <section id="sect-Reference_Guide-Performance_Tuning_Guide-JBoss_AS_Tuning">
+ <title>JBoss AS Tuning</title>
+ <para>
+ You can use <parameter>maxThreads</parameter> parameter to increase maximum amount of threads that can be launched in AS instance. This can improve performance if you need a high level of concurrency. also you can use <code>-XX:+UseParallelGC</code> java directory to use paralel garbage collector.
+ </para>
+ <note>
+ <title>Note</title>
+ <para>
+ Beware of setting <parameter>maxThreads</parameter> too big, this can cause <exceptionname>OutOfMemoryError</exceptionname>. We've got it with <code>maxThreads=1250</code> on such machine:
+ </para>
+ <simplelist>
+ <member>7.5 GB memory</member>
+ <member>4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)</member>
+ <member>850 GB instance storage (2×420 GB plus 10 GB root partition)</member>
+ <member>64-bit platform</member>
+ <member>I/O Performance: High</member>
+ <member>API name: m1.large</member>
+ <member>java -Xmx 4g</member>
- </simplelist>
+ </simplelist>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Performance_Tuning_Guide-JCR_Cache_Tuning">
- <title>JCR Cache Tuning</title>
- <para>
- <citetitle>Cache size</citetitle>
- </para>
- <para>
- JCR-cluster implementation is built using JBoss Cache as distributed, replicated cache. But there is one particularity related to remove action in it. Speed of this operation depends on the actual size of cache. As many nodes are currently in cache as much time is needed to remove one particular node (subtree) from it.
- </para>
- <para>
- <citetitle>Eviction</citetitle>
- </para>
- <para>
- Manipulations with eviction <parameter>wakeUpInterval</parameter> value doestn't affect on performance. Performance results with values from 500 up to 3000 are approximately equal.
- </para>
- <para>
- <citetitle>Transaction Timeout</citetitle>
- </para>
- <para>
- Using short timeout for long transactions such as Export/Import, removing huge subtree defined timeout may cause <exceptionname>TransactionTimeoutException</exceptionname>. [TODO] put recomended timeout value
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Performance_Tuning_Guide-JCR_Cache_Tuning">
+ <title>JCR Cache Tuning</title>
+ <para>
+ <citetitle>Cache size</citetitle>
+ </para>
+ <para>
+ JCR-cluster implementation is built using JBoss Cache as distributed, replicated cache. But there is one particularity related to remove action in it. Speed of this operation depends on the actual size of cache. As many nodes are currently in cache as much time is needed to remove one particular node (subtree) from it.
+ </para>
+ <para>
+ <citetitle>Eviction</citetitle>
+ </para>
+ <para>
+ Manipulations with eviction <parameter>wakeUpInterval</parameter> value doestn't affect on performance. Performance results with values from 500 up to 3000 are approximately equal.
+ </para>
+ <para>
+ <citetitle>Transaction Timeout</citetitle>
+ </para>
+ <para>
+ Using short timeout for long transactions such as Export/Import, removing huge subtree defined timeout may cause <exceptionname>TransactionTimeoutException</exceptionname>. [TODO] put recomended timeout value
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Performance_Tuning_Guide-Clustering">
- <title>Clustering</title>
- <para>
- For performance it is better to have loadbalacer, DB server and shared NFS on different computers. If in some reasons you see that one node gets more load than others you can decrease this load using load value in load balancer.
- </para>
- <para>
- <citetitle>JGroups configuration</citetitle>
- </para>
- <para>
- It's recommended to use "multiplexer stack" feature present in JGroups. It is set by default in eXo JCR and offers higher performance in cluster, using less network connections also. If there are two or more clusters in your network, please check that they use different ports and different cluster names.
- </para>
- <para>
- <citetitle>Write performance in cluster</citetitle>
- </para>
- <para>
- Exo JCR implementation uses Lucene indexing engine to provide search capabilities. But Lucene brings some limitations for write operations: it can perform indexing only in one thread. Thats why write performance in cluster is not higher than in singleton environment. Data is indexed on coordinator node, so increasing write-load on cluster may lead to ReplicationTimeout exception. It occurs because writing threads queue in the indexer and under high load timeout for replication to coordinator will be exceeded.
- </para>
- <para>
- Taking in consideration this fact, it is recommended to exceed <parameter>replTimeout</parameter> value in cache configurations in case of high write-load.
- </para>
- <para>
- <citetitle>Replication timeout</citetitle>
- </para>
- <para>
- Some operations may take too much time. So if you get <exceptionname>ReplicationTimeoutException</exceptionname> try increasing replication timeout:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Performance_Tuning_Guide-Clustering">
+ <title>Clustering</title>
+ <para>
+ For performance it is better to have loadbalacer, DB server and shared NFS on different computers. If in some reasons you see that one node gets more load than others you can decrease this load using load value in load balancer.
+ </para>
+ <para>
+ <citetitle>JGroups configuration</citetitle>
+ </para>
+ <para>
+ It's recommended to use "multiplexer stack" feature present in JGroups. It is set by default in eXo JCR and offers higher performance in cluster, using less network connections also. If there are two or more clusters in your network, please check that they use different ports and different cluster names.
+ </para>
+ <para>
+ <citetitle>Write performance in cluster</citetitle>
+ </para>
+ <para>
+ Exo JCR implementation uses Lucene indexing engine to provide search capabilities. But Lucene brings some limitations for write operations: it can perform indexing only in one thread. Thats why write performance in cluster is not higher than in singleton environment. Data is indexed on coordinator node, so increasing write-load on cluster may lead to ReplicationTimeout exception. It occurs because writing threads queue in the indexer and under high load timeout for replication to coordinator will be exceeded.
+ </para>
+ <para>
+ Taking in consideration this fact, it is recommended to exceed <parameter>replTimeout</parameter> value in cache configurations in case of high write-load.
+ </para>
+ <para>
+ <citetitle>Replication timeout</citetitle>
+ </para>
+ <para>
+ Some operations may take too much time. So if you get <exceptionname>ReplicationTimeoutException</exceptionname> try increasing replication timeout:
+ </para>
+
<programlisting language="XML" role="XML"> <clustering mode="replication" clusterName="${jbosscache-cluster-name}">
...
<sync replTimeout="60000" />
</clustering>
</programlisting>
- <para>
- value is set in miliseconds.
- </para>
+ <para>
+ value is set in miliseconds.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Performance_Tuning_Guide-JVM_parameters">
- <title>JVM parameters</title>
- <para>
- <citetitle>PermGen space size</citetitle>
- </para>
- <para>
- If you intend to use Infinispan, you will have to increase the PermGen size to at least 256 Mo due to the latest versions of JGroups that are needed by Infinispan (please note that Infinspan is only dedicated to the community for now, no support will be provided). In case, you intend to use JBoss Cache, you can keep on using JGroups 2.6.13.GA which means that you don't need to increase the PermGen size.
- </para>
+ </section>
+
+ <!-- <section id="sect-Reference_Guide-Performance_Tuning_Guide-JVM_parameters">
+ <title>JVM parameters</title>
+ <para>
+ <citetitle>PermGen space size</citetitle>
+ </para>
+ <para>
+ If you intend to use Infinispan, you will have to increase the PermGen size to at least 256 Mo due to the latest versions of JGroups that are needed by Infinispan (please note that Infinspan is only dedicated to the community for now, no support will be provided). In case, you intend to use JBoss Cache, you can keep on using JGroups 2.6.13.GA which means that you don't need to increase the PermGen size.
+ </para>
- </section>
-
+ </section>-->
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/query-handler-config.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/query-handler-config.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/query-handler-config.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,62 +4,50 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-QueryHandler_configuration">
- <title>QueryHandler configuration</title>
- <section id="sect-Reference_Guide-QueryHandler_configuration-Indexing_in_clustered_environment">
- <title>Indexing in clustered environment</title>
- <para>
- JCR offers multiple indexing strategies. They include both for standalone and clustered environments using the advantages of running in a single JVM or doing the best to use all resources available in cluster. JCR uses Lucene library as underlying search and indexing engine, but it has several limitations that greatly reduce possibilities and limits the usage of cluster advantages. That's why eXo JCR offers three strategies that are suitable for it's own usecases. They are standalone, clustered with shared index and clustered with local indexes. Each one has it's pros and cons.
- </para>
- <para>
- Stanadlone strategy provides a stack of indexes to achieve greater performance within single JVM.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/eXoJCR/diagram-standalone-index.png" />
- </imageobject>
+ <title>QueryHandler configuration</title>
+ <section id="sect-Reference_Guide-QueryHandler_configuration-Indexing_in_clustered_environment">
+ <title>Indexing in clustered environment</title>
+ <para>
+ JCR offers indexing strategies for clustered environments using the advantages of running in a single JVM or doing the best to use all resources available in cluster. JCR uses Lucene library as underlying search and indexing engine, but it has several limitations that greatly reduce possibilities and limits the usage of cluster advantages. That's why eXo JCR offers two strategies that are suitable for it's own usecases. They are clustered with shared index and clustered with local indexes. Each one has it's pros and cons.
+ </para>
+ <para>
+ Clustered implementation with local indexes combines in-memory buffer index directory with delayed file-system flushing. This index is called "Volatile" and it is invoked in searches also. Within some conditions volatile index is flushed to the persistent storage (file system) as new index directory. This allows to achieve great results for write operations.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/eXoJCR/diagram-local-index.png" width="444" />
+ </imageobject>
- </mediaobject>
- <para>
- It combines in-memory buffer index directory with delayed file-system flushing. This index is called "Volatile" and it is invoked in searches also. Within some conditions volatile index is flushed to the persistent storage (file system) as new index directory. This allows to achieve great results for write operations.
- </para>
- <para>
- Clustered implementation with local indexes is built upon same strategy with volatile in-memory index buffer along with delayed flushing on persistent storage.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/eXoJCR/diagram-local-index.png" width="444" />
- </imageobject>
+ </mediaobject>
+ <para>
+ As this implementation designed for clustered environment it has additional mechanisms for data delivery within cluster. Actual text extraction jobs done on the same node that does content operations (i.e. write operation). Prepared "documents" (Lucene term that means block of data ready for indexing) are replicated withing cluster nodes and processed by local indexes. So each cluster instance has the same index content. When new node joins the cluster it has no initial index, so it must be created. There are some supported ways of doing this operation. The simplest is to simply copy the index manually but this is not intended for use. If no initial index found JCR uses automated sceneries. They are controlled via configuration (see "index-recovery-mode" parameter) offering full re-indexing from database or copying from another cluster node.
+ </para>
+ <para>
+ For some reasons having a multiple index copies on each instance can be costly. So shared index can be used instead (see diagram below).
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" fileref="images/eXoJCR/diagram-shared-index.png" width="444" />
+ </imageobject>
- </mediaobject>
- <para>
- As this implementation designed for clustered environment it has additional mechanisms for data delivery within cluster. Actual text extraction jobs done on the same node that does content operations (i.e. write operation). Prepared "documents" (Lucene term that means block of data ready for indexing) are replicated withing cluster nodes and processed by local indexes. So each cluster instance has the same index content. When new node joins the cluster it has no initial index, so it must be created. There are some supported ways of doing this operation. The simplest is to simply copy the index manually but this is not intended for use. If no initial index found JCR uses automated sceneries. They are controlled via configuration (see "index-recovery-mode" parameter) offering full re-indexing from database or copying from another cluster node.
- </para>
- <para>
- For some reasons having a multiple index copies on each instance can be costly. So shared index can be used instead (see diagram below).
- </para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" fileref="images/eXoJCR/diagram-shared-index.png" width="444" />
- </imageobject>
+ </mediaobject>
+ <para>
+ This indexing strategy combines advantages of in-memory index along with shared persistent index offering "near" real time search capabilities. This means that newly added content is accessible via search practically immediately. This strategy allows nodes to index data in their own volatile (in-memory) indexes, but persistent indexes are managed by single "coordinator" node only. Each cluster instance has a read access for shared index to perform queries combining search results found in own in-memory index also. Take in account that shared folder must be configured in your system environment (i.e. mounted NFS folder). But this strategy in some extremely rare cases can have a bit different volatile indexes within cluster instances for a while. In a few seconds they will be up2date.
+ </para>
+ <para>
+ See more about <xref linkend="sect-Reference_Guide-Search_Configuration" />.
+ </para>
- </mediaobject>
- <para>
- This indexing strategy combines advantages of in-memory index along with shared persistent index offering "near" real time search capabilities. This means that newly added content is accessible via search practically immediately. This strategy allows nodes to index data in their own volatile (in-memory) indexes, but persistent indexes are managed by single "coordinator" node only. Each cluster instance has a read access for shared index to perform queries combining search results found in own in-memory index also. Take in account that shared folder must be configured in your system environment (i.e. mounted NFS folder). But this strategy in some extremely rare cases can have a bit different volatile indexes within cluster instances for a while. In a few seconds they will be up2date.
- </para>
- <para>
- See more about <xref linkend="sect-Reference_Guide-Search_Configuration" />.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-QueryHandler_configuration-Configuration">
- <title>Configuration</title>
- <section id="sect-Reference_Guide-Configuration-Query_handler_configuration_overview">
- <title>Query-handler configuration overview</title>
- <para>
- Configuration example:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-QueryHandler_configuration-Configuration">
+ <title>Configuration</title>
+ <section id="sect-Reference_Guide-Configuration-Query_handler_configuration_overview">
+ <title>Query-handler configuration overview</title>
+ <para>
+ Configuration example:
+ </para>
+
<programlisting language="XML" role="XML"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -78,150 +66,130 @@
</query-handler>
</workspace>
</programlisting>
- <table id="tabl-Reference_Guide-Query_handler_configuration_overview-Config_properties_description">
- <title>Config properties description</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>
- Property name
- </entry>
- <entry>
- Description
- </entry>
+ <table id="tabl-Reference_Guide-Query_handler_configuration_overview-Config_properties_description">
+ <title>Config properties description</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ Property name
+ </entry>
+ <entry>
+ Description
+ </entry>
- </row>
+ </row>
- </thead>
- <tbody>
- <row>
- <entry>
- index-dir
- </entry>
- <entry>
- path to index
- </entry>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ index-dir
+ </entry>
+ <entry>
+ path to index
+ </entry>
- </row>
- <row>
- <entry>
- changesfilter-class
- </entry>
- <entry>
- template of JBoss-cache configuration for all query-handlers in repository
- </entry>
+ </row>
+ <row>
+ <entry>
+ changesfilter-class
+ </entry>
+ <entry>
+ template of JBoss-cache configuration for all query-handlers in repository
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-configuration
- </entry>
- <entry>
- template of JBoss-cache configuration for all query-handlers in repository
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-configuration
+ </entry>
+ <entry>
+ template of JBoss-cache configuration for all query-handlers in repository
+ </entry>
- </row>
- <row>
- <entry>
- jgroups-configuration
- </entry>
- <entry>
- jgroups-configuration is template configuration for all components (search, cache, locks) [Add link to document describing template configurations]
- </entry>
+ </row>
+ <row>
+ <entry>
+ jgroups-configuration
+ </entry>
+ <entry>
+ jgroups-configuration is template configuration for all components (search, cache, locks) [Add link to document describing template configurations]
+ </entry>
- </row>
- <row>
- <entry>
- jgroups-multiplexer-stack
- </entry>
- <entry>
- [TODO about jgroups-multiplexer-stack - add link to JBoss doc]
- </entry>
+ </row>
+ <row>
+ <entry>
+ jgroups-multiplexer-stack
+ </entry>
+ <entry>
+ [TODO about jgroups-multiplexer-stack - add link to JBoss doc]
+ </entry>
- </row>
- <row>
- <entry>
- jbosscache-cluster-name
- </entry>
- <entry>
- cluster name (must be unique)
- </entry>
+ </row>
+ <row>
+ <entry>
+ jbosscache-cluster-name
+ </entry>
+ <entry>
+ cluster name (must be unique)
+ </entry>
- </row>
- <row>
- <entry>
- max-volatile-time
- </entry>
- <entry>
- max time to live for Volatile Index
- </entry>
+ </row>
+ <row>
+ <entry>
+ max-volatile-time
+ </entry>
+ <entry>
+ max time to live for Volatile Index
+ </entry>
- </row>
- <row>
- <entry>
- rdbms-reindexing
- </entry>
- <entry>
- indicate that need to use rdbms reindexing mechanism if possible, the default value is true
- </entry>
+ </row>
+ <row>
+ <entry>
+ rdbms-reindexing
+ </entry>
+ <entry>
+ indicate that need to use rdbms reindexing mechanism if possible, the default value is true
+ </entry>
- </row>
- <row>
- <entry>
- reindexing-page-size
- </entry>
- <entry>
- maximum amount of nodes which can be retrieved from storage for re-indexing purpose, the default value is 100
- </entry>
+ </row>
+ <row>
+ <entry>
+ reindexing-page-size
+ </entry>
+ <entry>
+ maximum amount of nodes which can be retrieved from storage for re-indexing purpose, the default value is 100
+ </entry>
- </row>
- <row>
- <entry>
- index-recovery-mode
- </entry>
- <entry>
- If the parameter has been set to <command>from-indexing</command>, so a full indexing will be automatically launched (default behavior), if the parameter has been set to <command>from-coordinator</command>, the index will be retrieved from coordinator
- </entry>
+ </row>
+ <row>
+ <entry>
+ index-recovery-mode
+ </entry>
+ <entry>
+ If the parameter has been set to <command>from-indexing</command>, so a full indexing will be automatically launched (default behavior), if the parameter has been set to <command>from-coordinator</command>, the index will be retrieved from coordinator
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
- <section id="sect-Reference_Guide-Configuration-Standalone_strategy">
- <title>Standalone strategy</title>
- <para>
- When running JCR in standalone usually standalone indexing is used also. Such parameters as "changesfilter-class", "jgroups-configuration" and all the "jbosscache-*" must be skipped and not defined. Like the configuration below.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration-Cluster_ready_indexing_strategies">
+ <title>Cluster-ready indexing strategies</title>
+ <para>
+ For both cluster-ready implementations JBoss Cache, JGroups and Changes Filter values must be defined. Shared index requires some kind of remote or shared file system to be attached in a system (i.e. NFS, SMB or etc). Indexing directory ("indexDir" value) must point to it. Setting "changesfilter-class" to "org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" will enable shared index implementation.
+ </para>
+
<programlisting language="XML" role="XML"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir" value="shareddir/index/db1/ws" />
- <property name="max-volatile-time" value="60" />
- <property name="rdbms-reindexing" value="true" />
- <property name="reindexing-page-size" value="1000" />
- <property name="index-recovery-mode" value="from-coordinator" />
- </properties>
- </query-handler>
-</workspace></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Configuration-Cluster_ready_indexing_strategies">
- <title>Cluster-ready indexing strategies</title>
- <para>
- For both cluster-ready implementations JBoss Cache, JGroups and Changes Filter values must be defined. Shared index requires some kind of remote or shared file system to be attached in a system (i.e. NFS, SMB or etc). Indexing directory ("indexDir" value) must point to it. Setting "changesfilter-class" to "org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" will enable shared index implementation.
- </para>
-
-<programlisting language="XML" role="XML"><workspace name="ws">
- <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- <properties>
<property name="index-dir" value="/mnt/nfs_drive/index/db1/ws" />
<property name="changesfilter-class"
value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
@@ -236,10 +204,10 @@
</properties>
</query-handler>
</workspace></programlisting>
- <para>
- In order to use cluster-ready strategy based on local indexes, when each node has own copy of index on local file system, the following configuration must be applied. Indexing directory must point to any folder on local file system and "changesfilter-class" must be set to "org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter".
- </para>
-
+ <para>
+ In order to use cluster-ready strategy based on local indexes, when each node has own copy of index on local file system, the following configuration must be applied. Indexing directory must point to any folder on local file system and "changesfilter-class" must be set to "org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter".
+ </para>
+
<programlisting language="XML" role="XML"><workspace name="ws">
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -259,24 +227,24 @@
</workspace>
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Configuration-JBoss_Cache_template_configuration">
- <title>JBoss-Cache template configuration</title>
- <para>
- JBoss-Cache template configuration for query handler is about the same for both clustered strategies.
- </para>
- <para>
- jbosscache-indexer.xml
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration-JBoss_Cache_template_configuration">
+ <title>JBoss-Cache template configuration</title>
+ <para>
+ JBoss-Cache template configuration for query handler is about the same for both clustered strategies.
+ </para>
+ <para>
+ jbosscache-indexer.xml
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
<locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false"
lockAcquisitionTimeout="20000" />
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />
+ <transaction transactionManagerLookupClass="org.jboss.cache.transaction.JBoss<remark>Standalone</remark>JTAManagerLookup" />
<clustering mode="replication" clusterName="${jbosscache-cluster-name}">
<stateRetrieval timeout="20000" fetchInMemoryState="false" />
@@ -292,14 +260,14 @@
</eviction>
</jbosscache></programlisting>
- <para>
- See more about template configurations <xref linkend="sect-Reference_Guide-JBoss_Cache_configuration" />.
- </para>
+ <para>
+ See more about template configurations <xref linkend="sect-Reference_Guide-JBoss_Cache_configuration" />.
+ </para>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/repository-creation-service.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,85 +4,79 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-RepositoryCreationService">
- <title>RepositoryCreationService</title>
- <section id="sect-Reference_Guide-RepositoryCreationService-Intro">
- <title>Intro</title>
- <para>
- RepositoryCreationService is the service for creation repositories in runtime. The service can be used in standalone or cluster environment.
- </para>
+ <title>RepositoryCreationService</title>
+ <section id="sect-Reference_Guide-RepositoryCreationService-Intro">
+ <title>Intro</title>
+ <para>
+ RepositoryCreationService is the service for creation repositories in runtime.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-RepositoryCreationService-Dependencies">
- <title>Dependencies</title>
- <para>
- RepositoryConfigurationService depends to next components:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Database_Creator" /> - DBCreator used to create new database for each unbinded datasource.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-RepositoryCreationService-Dependencies">
+ <title>Dependencies</title>
+ <para>
+ RepositoryConfigurationService depends to next components:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Database_Creator" /> - DBCreator used to create new database for each unbinded datasource.
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-eXo_JCR_Backup_Service" /> - BackupManager used to created repository from backup.
- </para>
+ </listitem>
+ <!--<listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-eXo_JCR_Backup_Service" /> - BackupManager used to created repository from backup.
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-RPC_Service" /> - RPCService used for communication between cluster-nodes
- </para>
- <note>
- <para>
- RPCService may not be configured - in this case, RepositoryService will work as standalone service.
- </para>
+ </listitem>-->
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-RPC_Service" /> - RPCService used for communication between cluster-nodes
+ </para>
- </note>
+ </listitem>
- </listitem>
+ </itemizedlist>
- </itemizedlist>
+ </section>
+
+ <section id="sect-Reference_Guide-RepositoryCreationService-How_it_works">
+ <title>How it works</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ User executes reserveRepositoryName(String repositoryName) - client-node calls coordinator-node to reserve repositoryName. If this name is already reserved or repository with this name exist, client-node will fetch RepositoryCreationException. If not Client will get token string.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-RepositoryCreationService-How_it_works">
- <title>How it works</title>
- <itemizedlist>
- <listitem>
- <para>
- User executes reserveRepositoryName(String repositoryName) - client-node calls coordinator-node to reserve repositoryName. If this name is already reserved or repository with this name exist, client-node will fetch RepositoryCreationException. If not Client will get token string.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ than user executes createRepository(String backupId, RepositoryEntry rEntry, String token). Coordinator-node checks the token, and creates Repository.
+ </para>
- </listitem>
- <listitem>
- <para>
- than user executes createRepository(String backupId, RepositoryEntry rEntry, String token). Coordinator-node checks the token, and creates Repository.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ whan repository become created - user-node broadcast message to all clusterNodes with RepositoryEntry, so each cluster node starts new Repository.
+ </para>
- </listitem>
- <listitem>
- <para>
- whan repository become created - user-node broadcast message to all clusterNodes with RepositoryEntry, so each cluster node starts new Repository.
- </para>
+ </listitem>
- </listitem>
+ </itemizedlist>
+ <para>
+ There is two ways to create repositry: make it in single step - just call createRepository(String backupId, RepositoryEntry); or reserve repositoryName at first (reserveRepositoryName(String repositoryName)), than create reserved repository (createRepository(String backupId, RepositoryEntry rEntry, String token)).
+ </para>
- </itemizedlist>
- <para>
- There is two ways to create repositry: make it in single step - just call createRepository(String backupId, RepositoryEntry); or reserve repositoryName at first (reserveRepositoryName(String repositoryName)), than create reserved repository (createRepository(String backupId, RepositoryEntry rEntry, String token)).
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-RepositoryCreationService-Configuration">
- <title>Configuration</title>
- <para>
- RepositoryCreationService configuration
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-RepositoryCreationService-Configuration">
+ <title>Configuration</title>
+ <para>
+ RepositoryCreationService configuration
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
<type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
@@ -125,7 +119,7 @@
<init-params>
<value-param>
<name>jgroups-configuration</name>
- <value>jar:/conf/standalone/udp-mux.xml</value>
+ <value>jar:/conf/cluster/udp-mux.xml</value>
</value-param>
<value-param>
<name>jgroups-cluster-name</name>
@@ -150,21 +144,21 @@
</value-param>
</init-params>
</component></programlisting>
- <itemizedlist>
- <listitem>
- <para>
- factory-class-name - is not mandatory parameter, indicates what the factory need to use to create DataSource objects
- </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ factory-class-name - is not mandatory parameter, indicates what the factory need to use to create DataSource objects
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-RepositoryCreationService-RepositoryCreationService_Interface">
- <title>RepositoryCreationService Interface</title>
-
+ </section>
+
+ <section id="sect-Reference_Guide-RepositoryCreationService-RepositoryCreationService_Interface">
+ <title>RepositoryCreationService Interface</title>
+
<programlisting language="Java" role="Java">public interface RepositoryCreationService
{
/**
@@ -247,28 +241,16 @@
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-RepositoryCreationService-Conclusions_and_restrictions">
- <title>Conclusions and restrictions</title>
- <itemizedlist>
- <listitem>
- <para>
- Each datasource in RepositoryEntry of new Repository must have unbinded datasources. Thats mean, such datasource must have not databases behind them. This restriction exists to avoid corruption of existing repositories data.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-RepositoryCreationService-Conclusions_and_restrictions">
+ <title>Conclusions and restrictions</title>
+ <para>
+ Each datasource in RepositoryEntry of new Repository must have unbinded datasources. Thats mean, such datasource must have not databases behind them. This restriction exists to avoid corruption of existing repositories data.
+ </para>
- </listitem>
- <listitem>
- <para>
- RPCService is optional component, but without it, RepositoryCreatorService can not communicate with other cluster-nodes and works as standalone.
- </para>
+ </section>
- </listitem>
-
- </itemizedlist>
-
- </section>
-
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/transaction-manager-lookup.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/transaction-manager-lookup.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr/transaction-manager-lookup.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,23 +4,19 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-TransactionManagerLookup">
- <title>TransactionManagerLookup</title>
- <section id="sect-Reference_Guide-TransactionManagerLookup-Configuration">
- <title>Configuration</title>
- <para>
- It's JBossCache class registered as eXo container component in configuration.xml file.
- </para>
-
+ <title>TransactionManagerLookup</title>
+ <section id="sect-Reference_Guide-TransactionManagerLookup-Configuration">
+ <title>Configuration</title>
+ <para>
+ It's JBossCache class registered as eXo container component in configuration.xml file.
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
- <type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
+ <type>org.jboss.cache.transaction.GenericTransactionManagerLookup</type>
</component></programlisting>
- <para>
- JBossStandaloneJTAManagerLookup used in standalone environment. Bur for Application Server environment use GenericTransactionManagerLookup.
- </para>
+ </section>
- </section>
-
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr-with-gtn/how-to-extend-my-gatein-instance.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,207 +4,207 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance">
- <title>How to extend my GateIn instance?</title>
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Introduction">
- <title>Introduction</title>
- <section id="sect-Reference_Guide-Introduction-Overview">
- <title>Overview</title>
- <para>
- Since GateIn beta 2, we added a set of features in order to customize a GateIn instance without modifying the GateIn binary, this usecase will be called <emphasis>portal extension</emphasis> in this documentation. Those features are also required to be able to launch several portal instances at the same time, in "eXo terminology" that means to have several "portal.war".
- </para>
+ <title>How to extend my GateIn instance?</title>
+ <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Introduction">
+ <title>Introduction</title>
+ <section id="sect-Reference_Guide-Introduction-Overview">
+ <title>Overview</title>
+ <para>
+ Since GateIn beta 2, we added a set of features in order to customize a GateIn instance without modifying the GateIn binary, this usecase will be called <emphasis>portal extension</emphasis> in this documentation. Those features are also required to be able to launch several portal instances at the same time, in "eXo terminology" that means to have several "portal.war".
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Introduction-Motivations">
- <title>Motivations</title>
- <para>
- Up to now, to create an application over an eXo portal such as DMS, WCM, CS and KS, we need to modify files into the "portal.war". This has many painful consequences, such as:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- It is quite hard to manage from the support point of view since we never know if or how the customer changed his eXo product.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Introduction-Motivations">
+ <title>Motivations</title>
+ <para>
+ Up to now, to create an application over an eXo portal such as DMS, WCM, CS and KS, we need to modify files into the "portal.war". This has many painful consequences, such as:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ It is quite hard to manage from the support point of view since we never know if or how the customer changed his eXo product.
+ </para>
- </listitem>
- <listitem>
- <para>
- It is hard to be able to package several eXo products (WCM, CS...) as we need to merge everything manually which is quite error prone.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ It is hard to be able to package several eXo products (WCM, CS...) as we need to merge everything manually which is quite error prone.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Finally, at the very beginning, eXo was developed to be able to support several portal instances (which also means several portal containers) but with the time several bad practices made it impossible. So it was important to review the whole code base in order to help/enforce all the GateIn developers to follow the "good practices".
- </para>
+ </itemizedlist>
+ <para>
+ Finally, at the very beginning, eXo was developed to be able to support several portal instances (which also means several portal containers) but with the time several bad practices made it impossible. So it was important to review the whole code base in order to help/enforce all the GateIn developers to follow the "good practices".
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Prerequisites">
- <title>Prerequisites</title>
- <para>
- To be able to migrate an application to GateIn, the first thing we need to do is to ensure that our application supports properly several portal container instances. The following section aims to help you to be compatible with GateIn.
- </para>
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_portal_container_name_i.e._portal">
- <title>Removing all the hard coded portal container name (i.e. "portal")</title>
- <para>
- Now if we need to get the portal container name (even in a standalone mode: in case of standalone mode the default value will be returned), we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getPortalContainerName()</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Prerequisites">
+ <title>Prerequisites</title>
+ <para>
+ To be able to migrate an application to GateIn, the first thing we need to do is to ensure that our application supports properly several portal container instances. The following section aims to help you to be compatible with GateIn.
+ </para>
+ <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_portal_container_name_i.e._portal">
+ <title>Removing all the hard coded portal container name (i.e. "portal")</title>
+ <para>
+ Now if we need to get the portal container name we can:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getPortalContainerName()</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentPortalContainerName()</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentPortalContainerName()</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- In js files, you can use the variable <emphasis>currentContext</emphasis> if your script must be loaded before the variable <emphasis>eXo.env.server.context</emphasis>, otherwise use <emphasis>eXo.env.server.context</emphasis> instead.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ In js files, you can use the variable <emphasis>currentContext</emphasis> if your script must be loaded before the variable <emphasis>eXo.env.server.context</emphasis>, otherwise use <emphasis>eXo.env.server.context</emphasis> instead.
+ </para>
- </listitem>
- <listitem>
- <para>
- In jsp files, you can use <emphasis>request.getContextPath()</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ In jsp files, you can use <emphasis>request.getContextPath()</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_rest_context_name_i.e._rest">
- <title>Removing all the hard coded rest context name (i.e. "rest")</title>
- <para>
- Now if we need to get the rest context name (even in a standalone mode: in case of standalone mode the default value will be returned), we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRestContextName()</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_rest_context_name_i.e._rest">
+ <title>Removing all the hard coded rest context name (i.e. "rest")</title>
+ <para>
+ Now if we need to get the rest context name we can:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRestContextName()</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRestContextName()</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRestContextName()</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_realm_name_i.e._exo_domain">
- <title>Removing all the hard coded realm name (i.e. "exo-domain")</title>
- <para>
- Now if we need to get the realm name (even in a standalone mode: in case of standalone mode the default value will be returned), we can:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRealmName()</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Removing_all_the_hard_coded_realm_name_i.e._exo_domain">
+ <title>Removing all the hard coded realm name (i.e. "exo-domain")</title>
+ <para>
+ Now if we need to get the realm name we can:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the component is instantiated by Pico container, you can add in the constructor of your component, the component <emphasis>ExoContainerContext</emphasis>, then call the method <emphasis>getRealmName()</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRealmName()</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the component is not instantiated by Pico container, you can call at runtime the static method <emphasis>PortalContainer.getCurrentRealmName()</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_Http_Filters_compatible">
- <title>Making your Http Filters compatible</title>
- <para>
- Now all your Http Filters that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractFilter</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Making_your_Http_Filters_compatible">
+ <title>Making your Http Filters compatible</title>
+ <para>
+ Now all your Http Filters that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractFilter</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpServlets_compatible">
- <title>Making your HttpServlets compatible</title>
- <para>
- Now all your HttpServlets that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis>. This abstract class will ensure that the environment has been properly set, so you will be able to call the usual methods such as <emphasis>ExoContainerContext.getCurrentContainer()</emphasis> (if it must also be compatible with the standalone mode) or <emphasis>PortalContainer.getInstance()</emphasis> (if it will only work on a portal environment mode).
- </para>
- <para>
- If you had to implement the method <emphasis>service(HttpServletRequest req, HttpServletResponse res)</emphasis>, now you will need to implement <emphasis>onService(ExoContainer container, HttpServletRequest req, HttpServletResponse res)</emphasis>, this method will directly give you the current <emphasis>ExoContainer</emphasis> in its signature.
- </para>
- <important>
- <title>Useful Information</title>
- <para>
- In the class <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis> you have a method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis>, <emphasis>ClassLoader</emphasis> and <emphasis>ServletContext</emphasis>) before executing the servlet. This value should return true when the servlet is executed within the web application of a portal container. By default, it checks if the name of the current <emphasis>ServletContext</emphasis> is a portal container name, it is sufficient in most of cases but you can still overload this method if you already know that the servlet will always been executed within the web application of portal container (i.e. the method always return true) or will never be executed within the web application of a portal container (i.e. the method always return false) .
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpServlets_compatible">
+ <title>Making your HttpServlets compatible</title>
+ <para>
+ Now all your HttpServlets that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis>. This abstract class will ensure that the environment has been properly set, so you will be able to call the usual methods such as <emphasis>PortalContainer.getInstance()</emphasis>.
+ </para>
+ <para>
+ If you had to implement the method <emphasis>service(HttpServletRequest req, HttpServletResponse res)</emphasis>, now you will need to implement <emphasis>onService(ExoContainer container, HttpServletRequest req, HttpServletResponse res)</emphasis>, this method will directly give you the current <emphasis>ExoContainer</emphasis> in its signature.
+ </para>
+ <important>
+ <title>Useful Information</title>
+ <para>
+ In the class <emphasis>org.exoplatform.container.web.AbstractHttpServlet</emphasis> you have a method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis>, <emphasis>ClassLoader</emphasis> and <emphasis>ServletContext</emphasis>) before executing the servlet. This value should return true when the servlet is executed within the web application of a portal container. By default, it checks if the name of the current <emphasis>ServletContext</emphasis> is a portal container name, it is sufficient in most of cases but you can still overload this method if you already know that the servlet will always been executed within the web application of portal container (i.e. the method always return true) or will never be executed within the web application of a portal container (i.e. the method always return false) .
+ </para>
- </important>
+ </important>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpSessionListeners_compatible">
- <title>Making your HttpSessionListeners compatible</title>
- <para>
- Now all your HttpSessionListeners that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpSessionListener</emphasis>. This abstract class will give you the current <emphasis>ExoContainer</emphasis> directly in the signature of the methods to implement which are _ onSessionCreated(ExoContainer container, HttpSessionEvent event)\_ and <emphasis>onSessionDestroyed(ExoContainer container, HttpSessionEvent event)</emphasis>
- </para>
- <para>
- You will also need to implement the method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis> and <emphasis>ClassLoader</emphasis>) before processing the event. This value should return true when the event is processed within the web application of a portal container.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Making_your_HttpSessionListeners_compatible">
+ <title>Making your HttpSessionListeners compatible</title>
+ <para>
+ Now all your HttpSessionListeners that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.container.web.AbstractHttpSessionListener</emphasis>. This abstract class will give you the current <emphasis>ExoContainer</emphasis> directly in the signature of the methods to implement which are _ onSessionCreated(ExoContainer container, HttpSessionEvent event)\_ and <emphasis>onSessionDestroyed(ExoContainer container, HttpSessionEvent event)</emphasis>
+ </para>
+ <para>
+ You will also need to implement the method called <emphasis>requirePortalEnvironment()</emphasis> that is used to indicate that we would like the abstract class to setup or not the full portal environment ( <emphasis>PortalContainer</emphasis> and <emphasis>ClassLoader</emphasis>) before processing the event. This value should return true when the event is processed within the web application of a portal container.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Use_init_tasks_if_you_need_a_PortalContainer_to_initialize_an_Http_Filter_or_an_HttpServlet">
- <title>Use init tasks if you need a PortalContainer to initialize an Http Filter or an HttpServlet</title>
- <para>
- If your Http <emphasis>Filter</emphasis> or your <emphasis>HttpServlet</emphasis> requires a PortalContainer to initialize, you need to convert your code in order to launch the code responsible for the initialization in the method <emphasis>onAlreadyExists</emphasis> of an <emphasis>org.exoplatform.container.RootContainer.PortalContainerInitTask</emphasis>.
- </para>
- <para>
- We need to rely on init tasks, in order to be sure that the portal container is at the right state when the task is executed, in other words the task could be delayed if you try to execute it too early. Each task is linked to a web application, so when we add a new task, we first retrieve all the portal containers that depend on this web application according to the <emphasis>PortalContainerDefinitions</emphasis>, and for each container we add the task in a sorted queue which order is in fact the order of the web applications dependencies defined in the <emphasis>PortalContainerDefinition</emphasis>. If no <emphasis>PortalContainerDefinition</emphasis> can be found we execute synchronously the task which is in fact the old behavior (i.e. without the starter).
- </para>
- <para>
- The supported init tasks are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPreInitTask</emphasis> which are executed before the portal container has been initialized
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Use_init_tasks_if_you_need_a_PortalContainer_to_initialize_an_Http_Filter_or_an_HttpServlet">
+ <title>Use init tasks if you need a PortalContainer to initialize an Http Filter or an HttpServlet</title>
+ <para>
+ If your Http <emphasis>Filter</emphasis> or your <emphasis>HttpServlet</emphasis> requires a PortalContainer to initialize, you need to convert your code in order to launch the code responsible for the initialization in the method <emphasis>onAlreadyExists</emphasis> of an <emphasis>org.exoplatform.container.RootContainer.PortalContainerInitTask</emphasis>.
+ </para>
+ <para>
+ We need to rely on init tasks, in order to be sure that the portal container is at the right state when the task is executed, in other words the task could be delayed if you try to execute it too early. Each task is linked to a web application, so when we add a new task, we first retrieve all the portal containers that depend on this web application according to the <emphasis>PortalContainerDefinitions</emphasis>, and for each container we add the task in a sorted queue which order is in fact the order of the web applications dependencies defined in the <emphasis>PortalContainerDefinition</emphasis>. If no <emphasis>PortalContainerDefinition</emphasis> can be found we execute synchronously the task which is in fact the old behavior (i.e. without the starter).
+ </para>
+ <para>
+ The supported init tasks are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPreInitTask</emphasis> which are executed before the portal container has been initialized
+ </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis> which are executed after the portal container has been initialized
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis> which are executed after the portal container has been initialized
+ </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostCreateTask</emphasis> which are executed after the portal container has been fully created (i.e. after all the post init tasks).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostCreateTask</emphasis> which are executed after the portal container has been fully created (i.e. after all the post init tasks).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- An init task is defined as below:
- </para>
- <note>
- <title>PortalContainerPreInitTask</title>
-
+ </itemizedlist>
+ <para>
+ An init task is defined as below:
+ </para>
+ <note>
+ <title>PortalContainerPreInitTask</title>
+
<programlisting language="Java" role="Java"> /**
* This interface is used to define a task that needs to be launched at a given state during the
* initialization of a portal container
@@ -244,40 +244,40 @@
public String getType();
}</programlisting>
- </note>
- <para>
- To add a task, you can either call:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on all the portal containers that depend on the given <emphasis>ServletContext</emphasis> according to the <emphasis>PortalContainerDefinitions</emphasis>.
- </para>
+ </note>
+ <para>
+ To add a task, you can either call:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on all the portal containers that depend on the given <emphasis>ServletContext</emphasis> according to the <emphasis>PortalContainerDefinitions</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task, String portalContainerName)</emphasis> in order to execute the task on a given portal container.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>PortalContainer.addInitTask(ServletContext context, PortalContainerInitTask task, String portalContainerName)</emphasis> in order to execute the task on a given portal container.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>RootContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on the portal container which name is the name of the given <emphasis>ServletContext</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>RootContainer.addInitTask(ServletContext context, PortalContainerInitTask task)</emphasis> in order to execute the task on the portal container which name is the name of the given <emphasis>ServletContext</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- We will take for example the class <emphasis>GadgetRegister</emphasis> that is used to register new google gadgets on a given portal container.
- </para>
- <para>
- <emphasis role="underline">The old code was:</emphasis>
- </para>
- <note>
- <title>Old GadgetRegister.java</title>
-
+ </itemizedlist>
+ <para>
+ We will take for example the class <emphasis>GadgetRegister</emphasis> that is used to register new google gadgets on a given portal container.
+ </para>
+ <para>
+ <emphasis role="underline">The old code was:</emphasis>
+ </para>
+ <note>
+ <title>Old GadgetRegister.java</title>
+
<programlisting language="Java" role="Java">...
public class GadgetRegister implements ServletContextListener
{
@@ -293,13 +293,13 @@
...
}</programlisting>
- </note>
- <para>
- The new code relies on a <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis>, as you can see below
- </para>
- <note>
- <title>New GadgetRegister.java</title>
-
+ </note>
+ <para>
+ The new code relies on a <emphasis>org.exoplatform.container.RootContainer.PortalContainerPostInitTask</emphasis>, as you can see below
+ </para>
+ <note>
+ <title>New GadgetRegister.java</title>
+
<programlisting language="Java" role="Java">...
public class GadgetRegister implements ServletContextListener {
...
@@ -328,155 +328,155 @@
...
}</programlisting>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Making_your_LoginModules_compatible">
- <title>Making your LoginModules compatible</title>
- <para>
- Now all your LoginModules that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
- </para>
- <important>
- <title>Useful Information</title>
- <para>
- The class <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis> supports 2 login module options which are <emphasis>portalContainerName</emphasis> and <emphasis>realmName</emphasis>, to allow you to indicate the realm name and the portal container name, if you want to change the default value.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Making_your_LoginModules_compatible">
+ <title>Making your LoginModules compatible</title>
+ <para>
+ Now all your LoginModules that need to get the current <emphasis>ExoContainer</emphasis> must extends <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis>. You just need to call the method <emphasis>getContainer()</emphasis> to get the current <emphasis>ExoContainer</emphasis>.
+ </para>
+ <important>
+ <title>Useful Information</title>
+ <para>
+ The class <emphasis>org.exoplatform.services.security.jaas.AbstractLoginModule</emphasis> supports 2 login module options which are <emphasis>portalContainerName</emphasis> and <emphasis>realmName</emphasis>, to allow you to indicate the realm name and the portal container name, if you want to change the default value.
+ </para>
- </important>
+ </important>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Avoiding_static_modifier_on_component_dependency">
- <title>Avoiding <emphasis>static</emphasis> modifier on component dependency</title>
- <para>
- A local variable that stores a component dependency must not be static. In other words, when you create a component A that depends on component B, we don't store B in a static variable of A otherwise we cannot have several different instances of A in the same JVM which is not compatible with a multi-portal instance.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Avoiding_static_modifier_on_component_dependency">
+ <title>Avoiding <emphasis>static</emphasis> modifier on component dependency</title>
+ <para>
+ A local variable that stores a component dependency must not be static. In other words, when you create a component A that depends on component B, we don't store B in a static variable of A otherwise we cannot have several different instances of A in the same JVM which is not compatible with a multi-portal instance.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Prerequisites-Avoid_component_initialization_based_on_component_dependency_in_the_constructor">
- <title>Avoid component initialization based on component dependency in the constructor</title>
- <para>
- We will have more and more extensible components (i.e. that can be extended thanks to an external plugin) which means that those components can only be initialized in the <emphasis>start</emphasis> method, thus it is not a good practice to initialize a component in its constructor if this initialization uses other components because those components may not be initialized. For example, now the ResourceBundleService is extensible, so if you create a component that depends on the ResourceBundleService and you need the ResourceBundleService to initialize your component, your component will need to be "Startable" and you will have to initialize your component in a <emphasis>start</emphasis> method.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Prerequisites-Avoid_component_initialization_based_on_component_dependency_in_the_constructor">
+ <title>Avoid component initialization based on component dependency in the constructor</title>
+ <para>
+ We will have more and more extensible components (i.e. that can be extended thanks to an external plugin) which means that those components can only be initialized in the <emphasis>start</emphasis> method, thus it is not a good practice to initialize a component in its constructor if this initialization uses other components because those components may not be initialized. For example, now the ResourceBundleService is extensible, so if you create a component that depends on the ResourceBundleService and you need the ResourceBundleService to initialize your component, your component will need to be "Startable" and you will have to initialize your component in a <emphasis>start</emphasis> method.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-FAQ">
- <title>FAQ</title>
- <section id="sect-Reference_Guide-FAQ-What_has_changed_since_the_previous_versions">
- <title>What has changed since the previous versions?</title>
- <para>
- The main difference with previous versions is the way to package your application, in the previous versions you had to change the content of the file <emphasis>portal.war</emphasis> in order to customize the portal. Now we more consider your application as an add-on that you can packaged in another ear/war file. You just need to follow some rules in order to notify the platform that it must take into account your add-on in order to customize the portal.
- </para>
- <para>
- Among other things, you will have to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Indicate the platform how to initialize and manage your application by defining and registering the <emphasis>PortalContainerDefinition</emphasis> related to your portal instance.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-FAQ">
+ <title>FAQ</title>
+ <section id="sect-Reference_Guide-FAQ-What_has_changed_since_the_previous_versions">
+ <title>What has changed since the previous versions?</title>
+ <para>
+ The main difference with previous versions is the way to package your application, in the previous versions you had to change the content of the file <emphasis>portal.war</emphasis> in order to customize the portal. Now we more consider your application as an add-on that you can packaged in another ear/war file. You just need to follow some rules in order to notify the platform that it must take into account your add-on in order to customize the portal.
+ </para>
+ <para>
+ Among other things, you will have to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Indicate the platform how to initialize and manage your application by defining and registering the <emphasis>PortalContainerDefinition</emphasis> related to your portal instance.
+ </para>
- </listitem>
- <listitem>
- <para>
- Deploy the <emphasis>starter</emphasis> ear/war file that is used to create and start all the portals (i.e. portal containers).
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Deploy the <emphasis>starter</emphasis> ear/war file that is used to create and start all the portals (i.e. portal containers).
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <warning>
- <title>Warning</title>
- <para>
- Please take into account, that you need to ensure that the <emphasis>starter</emphasis> is launched after all the other ear/war files.
- </para>
+ </itemizedlist>
+ <warning>
+ <title>Warning</title>
+ <para>
+ Please take into account, that you need to ensure that the <emphasis>starter</emphasis> is launched after all the other ear/war files.
+ </para>
- </warning>
- <important>
- <title>Nota Bene</title>
- <para>
- If you don't need to customize the portal, you don't have to deploy the starter. The old way to deploy an application is still compatible.
- </para>
+ </warning>
+ <important>
+ <title>Nota Bene</title>
+ <para>
+ If you don't need to customize the portal, you don't have to deploy the starter. The old way to deploy an application is still compatible.
+ </para>
- </important>
+ </important>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_a_portal_extension">
- <title>What is the main purpose of a <emphasis>portal extension</emphasis>?</title>
- <para>
- An <emphasis>extension</emphasis> is just a set of files that we use to customize or add new features to a given portal. An extension must be the least intrusive as possible, as we could potentially have several extensions for the same portal. In other words, we are supposed to only add what is missing in the portal and avoid changing or duplicated files that are in the portal.war.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_a_portal_extension">
+ <title>What is the main purpose of a <emphasis>portal extension</emphasis>?</title>
+ <para>
+ An <emphasis>extension</emphasis> is just a set of files that we use to customize or add new features to a given portal. An extension must be the least intrusive as possible, as we could potentially have several extensions for the same portal. In other words, we are supposed to only add what is missing in the portal and avoid changing or duplicated files that are in the portal.war.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_the_starter">
- <title>What is the main purpose of the <emphasis>starter</emphasis>?</title>
- <para>
- The <emphasis>sarter</emphasis> is a web application that has been added to create and start all the portals (i.e. portal containers) at the same time when all the other web applications have already been started. In fact all other web applications can potentially defined several things at startup such as skins, javascripts, google gadgets and configuration files, thus the loading order is important as we can redefine skins or configuration files or a javascript from a web application 1 could depend on another javascript from a web application 2 so if the web application 2 is loaded after the web application 1, we will get errors in the merged javascript file.
- </para>
- <para>
- If a <emphasis>PortalContainerDefinition</emphasis> has been defined, the loading order will be the order that has been used to define the list of dependency. And if you defined a <emphasis>PortalContainerDefinition</emphasis> you need to deploy the starter otherwise the loading order will be the default one (i.e. the loading order of the Application Server)
- </para>
- <para>
- So if you need to customize your portal by adding a new extension and/or a new portal, you need to defined the related <emphasis>PortalContainerDefinitions</emphasis> so you need to deploy also the starter. Otherwise, you don't need to define any <emphasis>PortalContainerDefinition</emphasis> and to deploy the <emphasis>starter</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-What_is_the_main_purpose_of_the_starter">
+ <title>What is the main purpose of the <emphasis>starter</emphasis>?</title>
+ <para>
+ The <emphasis>sarter</emphasis> is a web application that has been added to create and start all the portals (i.e. portal containers) at the same time when all the other web applications have already been started. In fact all other web applications can potentially defined several things at startup such as skins, javascripts, google gadgets and configuration files, thus the loading order is important as we can redefine skins or configuration files or a javascript from a web application 1 could depend on another javascript from a web application 2 so if the web application 2 is loaded after the web application 1, we will get errors in the merged javascript file.
+ </para>
+ <para>
+ If a <emphasis>PortalContainerDefinition</emphasis> has been defined, the loading order will be the order that has been used to define the list of dependency. And if you defined a <emphasis>PortalContainerDefinition</emphasis> you need to deploy the starter otherwise the loading order will be the default one (i.e. the loading order of the Application Server)
+ </para>
+ <para>
+ So if you need to customize your portal by adding a new extension and/or a new portal, you need to defined the related <emphasis>PortalContainerDefinitions</emphasis> so you need to deploy also the starter. Otherwise, you don't need to define any <emphasis>PortalContainerDefinition</emphasis> and to deploy the <emphasis>starter</emphasis>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_a_portal_and_a_portal_container_are_related">
- <title>How a portal and a portal container are related?</title>
- <para>
- Each portal instance has its own portal container which allows the portal to have its own set of components/services. It will ensure the isolation between the different portal instances.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_a_portal_and_a_portal_container_are_related">
+ <title>How a portal and a portal container are related?</title>
+ <para>
+ Each portal instance has its own portal container which allows the portal to have its own set of components/services. It will ensure the isolation between the different portal instances.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_define_and_register_a_PortalContainerDefinition">
- <title>How to define and register a <emphasis>PortalContainerDefinition</emphasis>?</title>
- <para>
- A <emphasis>PortalContainerDefinition</emphasis> allows you to indicate the platform how it must initialize and manage your portal. In a <emphasis>PortalContainerDefinition</emphasis>, you can define a set of properties, such as:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The name of the portal container
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_define_and_register_a_PortalContainerDefinition">
+ <title>How to define and register a <emphasis>PortalContainerDefinition</emphasis>?</title>
+ <para>
+ A <emphasis>PortalContainerDefinition</emphasis> allows you to indicate the platform how it must initialize and manage your portal. In a <emphasis>PortalContainerDefinition</emphasis>, you can define a set of properties, such as:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The name of the portal container
+ </para>
- </listitem>
- <listitem>
- <para>
- The name of the context name of the rest web application
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name of the context name of the rest web application
+ </para>
- </listitem>
- <listitem>
- <para>
- The name of the realm
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name of the realm
+ </para>
- </listitem>
- <listitem>
- <para>
- The list of all the dependencies of the portal container ordered by priority
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The list of all the dependencies of the portal container ordered by priority
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- You can define and register a <emphasis>PortalContainerDefinition</emphasis> thanks to an external plugin that has to be treated at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details, please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
- </para>
- <para>
- <emphasis role="underline">See below an example of configuration file that define and register a PortalContainerDefinition:</emphasis>
- </para>
-
+ </itemizedlist>
+ <para>
+ You can define and register a <emphasis>PortalContainerDefinition</emphasis> thanks to an external plugin that has to be treated at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details, please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
+ </para>
+ <para>
+ <emphasis role="underline">See below an example of configuration file that define and register a PortalContainerDefinition:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -543,89 +543,89 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <para>
- In the previous example, we define a portal container called "portal", which rest context name is "rest", which realm name is "exo-domain" and which dependencies are the web applications "eXoResources", "portal"... The platform will load first "eXoResources", then "portal" and so on.
- </para>
+ <para>
+ In the previous example, we define a portal container called "portal", which rest context name is "rest", which realm name is "exo-domain" and which dependencies are the web applications "eXoResources", "portal"... The platform will load first "eXoResources", then "portal" and so on.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_the_platform_interprets_the_dependency_order_defined_into_the_PortalContainerDefinition">
- <title>How the platform interprets the dependency order defined into the PortalContainerDefinition?</title>
- <para>
- The dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> is really crucial since it will be interpreted the same way by several components of the platform. All those components, will consider the 1st element in the list is less important than the second element and so on.
- </para>
- <para>
- <emphasis role="underline">So it is currently used to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Know loading order of all the dependencies
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_the_platform_interprets_the_dependency_order_defined_into_the_PortalContainerDefinition">
+ <title>How the platform interprets the dependency order defined into the PortalContainerDefinition?</title>
+ <para>
+ The dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> is really crucial since it will be interpreted the same way by several components of the platform. All those components, will consider the 1st element in the list is less important than the second element and so on.
+ </para>
+ <para>
+ <emphasis role="underline">So it is currently used to:</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Know loading order of all the dependencies
+ </para>
- </listitem>
- <listitem>
- <para>
- If we have several <emphasis>PortalContainerConfigOwner</emphasis> (see next section for more details about a PortalContainerConfigOwner)
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The ServletContext of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ServletContext (PortalContainer.getPortalContext()) to get a resource, it will try to get the resource in the ServletContext of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If we have several <emphasis>PortalContainerConfigOwner</emphasis> (see next section for more details about a PortalContainerConfigOwner)
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The ServletContext of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ServletContext (PortalContainer.getPortalContext()) to get a resource, it will try to get the resource in the ServletContext of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
+ </para>
- </listitem>
- <listitem>
- <para>
- The ClassLoader of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ClassLoader (PortalContainer.getPortalClassLoader()) to get a resource, it will try to get the resource in the ClassLoader of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The ClassLoader of all the <emphasis>PortalContainerConfigOwner</emphasis> will be unified, if we use the unified ClassLoader (PortalContainer.getPortalClassLoader()) to get a resource, it will try to get the resource in the ClassLoader of the most important <emphasis>PortalContainerConfigOwner</emphasis> (i.e. last in the dependency list) and if it cans find it, it will try with the second most important <emphasis>PortalContainerConfigOwner</emphasis> and so on.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition">
- <title>How to change the ServletContext name, the realm name and/or the rest context name of my portal without using a PortalContainerDefinition?</title>
- <para>
- To do that you need first to change the default values used by a PortalContainer that has not been defined thanks to a <emphasis>PortalContainerDefinition</emphasis>. Those default values can be modified thanks to a set of init parameters of the component <emphasis>PortalContainerConfig</emphasis>.
- </para>
- <para>
- The component <emphasis>PortalContainerConfig</emphasis> must be registered at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
- </para>
- <para>
- <emphasis role="underline">In the example below we will rename:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The portal name "portal" to "myPortal".
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition">
+ <title>How to change the ServletContext name, the realm name and/or the rest context name of my portal without using a PortalContainerDefinition?</title>
+ <para>
+ To do that you need first to change the default values used by a PortalContainer that has not been defined thanks to a <emphasis>PortalContainerDefinition</emphasis>. Those default values can be modified thanks to a set of init parameters of the component <emphasis>PortalContainerConfig</emphasis>.
+ </para>
+ <para>
+ The component <emphasis>PortalContainerConfig</emphasis> must be registered at the <emphasis>RootContainer</emphasis> level. In other words, your configuration file must be a file <emphasis>conf/configuration.xml</emphasis> packaged into a jar file or $AS_HOME/exo-conf/configuration.xml (for more details please have a look to the article <xref linkend="sect-Reference_Guide-Container_Configuration" />).
+ </para>
+ <para>
+ <emphasis role="underline">In the example below we will rename:</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The portal name "portal" to "myPortal".
+ </para>
- </listitem>
- <listitem>
- <para>
- The rest servlet context name "rest" to "myRest".
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The rest servlet context name "rest" to "myRest".
+ </para>
- </listitem>
- <listitem>
- <para>
- The realm name "exo-domain" to "my-exo-domain".
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The realm name "exo-domain" to "my-exo-domain".
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- <emphasis role="underline">See below an example</emphasis>
- </para>
-
+ </itemizedlist>
+ <para>
+ <emphasis role="underline">See below an example</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -653,150 +653,150 @@
</init-params>
</component>
</configuration></programlisting>
- <para>
- Once your configuration is ready, you need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "portal.war" by changing the "display-name" (the new value is "myPortal") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
- </para>
+ <para>
+ Once your configuration is ready, you need to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "portal.war" by changing the "display-name" (the new value is "myPortal") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "portal.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "portal.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the "portal.war" to "myPortal.war" (or "02portal.war" to "02myPortal.war")
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the "portal.war" to "myPortal.war" (or "02portal.war" to "02myPortal.war")
+ </para>
- </listitem>
- <listitem>
- <para>
- Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "rest.war" by changing the "display-name" (the new value is "myRest") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Update the file <emphasis>WEB-INF/web.xml</emphasis> of the file "rest.war" by changing the "display-name" (the new value is "myRest") and the "realm-name" in the "login-config" (the new value is "my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "rest.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If you use JBoss AS: Update the file <emphasis>WEB-INF/jboss-web.xml</emphasis> of the file "rest.war" by changing the "security-domain" (the new value is "java:/jaas/my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the "rest.war" to "myRest.war"
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the "rest.war" to "myRest.war"
+ </para>
- </listitem>
- <listitem>
- <para>
- If "portal.war" and "rest.war" were embedded into an ear file: Update the file <emphasis>META-INF/application.xml</emphasis> of the file "exoplatform.ear" by remaming "02portal.war" to "02myPortal.war", "portal" to "myPortal", "rest.war" to "myRest.war" and "rest" to "myRest".
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If "portal.war" and "rest.war" were embedded into an ear file: Update the file <emphasis>META-INF/application.xml</emphasis> of the file "exoplatform.ear" by remaming "02portal.war" to "02myPortal.war", "portal" to "myPortal", "rest.war" to "myRest.war" and "rest" to "myRest".
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- The end of the process depends on your application server
- </para>
- <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- You need to change the name of the application policy in your file <emphasis>conf/login-config.xml</emphasis> (the new name is "my-exo-domain").
- </para>
+ </itemizedlist>
+ <para>
+ The end of the process depends on your application server
+ </para>
+ <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_JBoss_tested_on_JBoss_5.1.0.GA">
+ <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
+ <para>
+ You need to change the name of the application policy in your file <emphasis>conf/login-config.xml</emphasis> (the new name is "my-exo-domain").
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Update the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> by changing the "path" (the new value is "/myPortal"), the "docBase" (the new value is "myPortal") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_change_the_ServletContext_name_the_realm_name_andor_the_rest_context_name_of_my_portal_without_using_a_PortalContainerDefinition-On_Tomcat_tested_on_Tomcat_6.0.20">
+ <title>On Tomcat (tested on Tomcat 6.0.20)</title>
+ <para>
+ <emphasis role="underline">You need to:</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Update the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> by changing the "path" (the new value is "/myPortal"), the "docBase" (the new value is "myPortal") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> to <emphasis>myPortal.xml</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the file <emphasis>tomcat/conf/Catalina/localhost/portal.xml</emphasis> to <emphasis>myPortal.xml</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Update the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> by changing the "path" (the new value is "/myRest"), the "docBase" (the new value is "myRest") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Update the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> by changing the "path" (the new value is "/myRest"), the "docBase" (the new value is "myRest") and the "appName" in the "Realm" definition (the new value is "my-exo-domain").
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> to <emphasis>myRest.xml</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the file <emphasis>tomcat/conf/Catalina/localhost/rest.xml</emphasis> to <emphasis>myRest.xml</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Change the realm name in the file <emphasis>tomcat/conf/jaas.conf</emphasis> (the new name is "my-exo-domain").
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change the realm name in the file <emphasis>tomcat/conf/jaas.conf</emphasis> (the new name is "my-exo-domain").
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_configuration_file_to_a_given_portal_from_a_war_file">
- <title>How to add new configuration file to a given portal from a war file?</title>
- <para>
- To indicate the platform that a given web application has configuration file to provide, you need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_configuration_file_to_a_given_portal_from_a_war_file">
+ <title>How to add new configuration file to a given portal from a war file?</title>
+ <para>
+ To indicate the platform that a given web application has configuration file to provide, you need to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the servlet context name of this web application as a new dependency in the <emphasis>PortalContainerDefinition</emphasis> of all the portal containers for which you want to share the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the servlet context name of this web application as a new dependency in the <emphasis>PortalContainerDefinition</emphasis> of all the portal containers for which you want to share the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- The simple fact to add this Servlet Context Listener, will add the Servlet Context of this web application to the Unified Servlet Context of all the <emphasis>PortalContainers</emphasis> that depend on this web application according to their <emphasis>PortalContainerDefinition</emphasis>.
- </para>
- <important>
- <title>Useful Information #1</title>
- <para>
- The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
+ </itemizedlist>
+ <para>
+ The simple fact to add this Servlet Context Listener, will add the Servlet Context of this web application to the Unified Servlet Context of all the <emphasis>PortalContainers</emphasis> that depend on this web application according to their <emphasis>PortalContainerDefinition</emphasis>.
+ </para>
+ <important>
+ <title>Useful Information #1</title>
+ <para>
+ The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
+ </para>
- </important>
- <important>
- <title>Useful Information #2</title>
- <para>
- A portal is implicitly considered as a <emphasis>PortalContainerConfigOwner</emphasis> without having to define the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
- </para>
+ </important>
+ <important>
+ <title>Useful Information #2</title>
+ <para>
+ A portal is implicitly considered as a <emphasis>PortalContainerConfigOwner</emphasis> without having to define the ServletContextListener <emphasis>org.exoplatform.container.web.PortalContainerConfigOwner</emphasis> in its web.xml.
+ </para>
- </important>
- <para>
- See an example of a web.xml below:
- </para>
-
+ </important>
+ <para>
+ See an example of a web.xml below:
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
@@ -856,17 +856,17 @@
</servlet-mapping>
</web-app></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_portal_extension">
- <title>How to create/define a portal extension?</title>
- <para>
- A portal extension is in fact a web application declared as a <emphasis>PortalContainerConfigOwner</emphasis> (see previous section for more details about a <emphasis>PortalContainerConfigOwner</emphasis>) that has been added to the dependency list of the <emphasis>PortalContainerDefinition</emphasis> of a given portal.
- </para>
- <para>
- <emphasis role="underline">See below an example of configuration file that add the portal extension "portal-ext" to the dependency list of the portal "portal":</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_portal_extension">
+ <title>How to create/define a portal extension?</title>
+ <para>
+ A portal extension is in fact a web application declared as a <emphasis>PortalContainerConfigOwner</emphasis> (see previous section for more details about a <emphasis>PortalContainerConfigOwner</emphasis>) that has been added to the dependency list of the <emphasis>PortalContainerDefinition</emphasis> of a given portal.
+ </para>
+ <para>
+ <emphasis role="underline">See below an example of configuration file that add the portal extension "portal-ext" to the dependency list of the portal "portal":</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -936,130 +936,130 @@
</external-component-plugins>
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_portal_extension">
- <title>How to deploy a portal extension?</title>
- <para>
- Refer to <emphasis>How to deploy the sample extension?</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_portal_extension">
+ <title>How to deploy a portal extension?</title>
+ <para>
+ Refer to <emphasis>How to deploy the sample extension?</emphasis>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_new_portal">
- <title>How to create/define a new portal?</title>
- <para>
- To duplicate the entire "portal.war" file to create a new portal, you just need to duplicate the following files from the original "portal.war":
- </para>
- <itemizedlist>
- <listitem>
- <para>
- login/jsp/login.jsp
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_createdefine_a_new_portal">
+ <title>How to create/define a new portal?</title>
+ <para>
+ To duplicate the entire "portal.war" file to create a new portal, you just need to duplicate the following files from the original "portal.war":
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ login/jsp/login.jsp
+ </para>
- </listitem>
- <listitem>
- <para>
- login/skin: You can customize the css files and pictures
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ login/skin: You can customize the css files and pictures
+ </para>
- </listitem>
- <listitem>
- <para>
- bookmark.jsp
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ bookmark.jsp
+ </para>
- </listitem>
- <listitem>
- <para>
- favicon.ico: You can replace it by your own logo
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ favicon.ico: You can replace it by your own logo
+ </para>
- </listitem>
- <listitem>
- <para>
- index.jsp
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ index.jsp
+ </para>
- </listitem>
- <listitem>
- <para>
- portal-unavailable.jsp
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ portal-unavailable.jsp
+ </para>
- </listitem>
- <listitem>
- <para>
- portal-warning.jsp
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ portal-warning.jsp
+ </para>
- </listitem>
- <listitem>
- <para>
- WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
+ </para>
- </listitem>
- <listitem>
- <para>
- WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- You need also to duplicate the "rest.war" file to create a dedicated rest web application for your portal as we must have one rest web application per portal, in fact you just need to duplicate the following files from the original "rest.war":
- </para>
- <itemizedlist>
- <listitem>
- <para>
- WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
- </para>
+ </itemizedlist>
+ <para>
+ You need also to duplicate the "rest.war" file to create a dedicated rest web application for your portal as we must have one rest web application per portal, in fact you just need to duplicate the following files from the original "rest.war":
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ WEB-INF/web.xml: You just need to change the "display-name" and set a different value for the "realm-name" in the "login-config". Indeed, we must have one realm name per portal.
+ </para>
- </listitem>
- <listitem>
- <para>
- WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ WEB-INF/jboss-web.xml: If you use JBoss AS, you need to duplicate also this file and set the new "security-domain" with the new realm name.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Finally, you need to register and define the corresponding <emphasis>PortalContainerDefinition</emphasis>. The <emphasis>PortalContainerDefinition</emphasis> of your portal will be composed of:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The name of new portal
- </para>
+ </itemizedlist>
+ <para>
+ Finally, you need to register and define the corresponding <emphasis>PortalContainerDefinition</emphasis>. The <emphasis>PortalContainerDefinition</emphasis> of your portal will be composed of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The name of new portal
+ </para>
- </listitem>
- <listitem>
- <para>
- The name of the context name of the new rest web application
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name of the context name of the new rest web application
+ </para>
- </listitem>
- <listitem>
- <para>
- The name of the new realm
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name of the new realm
+ </para>
- </listitem>
- <listitem>
- <para>
- The list of all the dependencies of the original portal, with the new name of the rest web application instead of the old name (i.e. "rest") and with a new dependency which is in fact the name of your portal. As we leave the dependency of the original portal in the list of dependencies, it will load the configuration files of original "portal.war" file.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The list of all the dependencies of the original portal, with the new name of the rest web application instead of the old name (i.e. "rest") and with a new dependency which is in fact the name of your portal. As we leave the dependency of the original portal in the list of dependencies, it will load the configuration files of original "portal.war" file.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
+ </itemizedlist>
+ <para>
+ <emphasis role="underline">See an example below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1126,58 +1126,58 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <important>
- <title>Useful Information #1</title>
- <para>
- A portal is implicitly a <emphasis>PortalContainerConfigOwner</emphasis> which means that it shares the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>
- </para>
+ <important>
+ <title>Useful Information #1</title>
+ <para>
+ A portal is implicitly a <emphasis>PortalContainerConfigOwner</emphasis> which means that it shares the configuration file embedded into the war file, located at <emphasis>WEB-INF/conf/configuration.xml</emphasis>
+ </para>
- </important>
- <important>
- <title>Useful Information #2</title>
- <para>
- The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
+ </important>
+ <important>
+ <title>Useful Information #2</title>
+ <para>
+ The position of the servlet context name of this web application in the dependency list is important since the last configuration file loaded has always right towards other configuration files. Each configuration file loaded, could potentially redefine a configuration file that has already been loaded. Moreover, as we now use a unified Servlet Context to load the configuration files, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
+ </para>
- </important>
+ </important>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_new_portal">
- <title>How to deploy a new portal?</title>
- <para>
- Refer to <emphasis>How to deploy the sample portal?</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_deploy_a_new_portal">
+ <title>How to deploy a new portal?</title>
+ <para>
+ Refer to <emphasis>How to deploy the sample portal?</emphasis>
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_import_properly_a_configuration_file_using_the_prefix_war">
- <title>How to import properly a configuration file using the prefix "war:"?</title>
- <para>
- Now, the <emphasis>ConfigurationManager</emphasis> uses by default the unified servlet context of the portal in order to get any resources in particular the configuration files. The unified servlet context is aware of the priorities that has been set in the <emphasis>PortalContainerDefinition</emphasis> of the portal. In other words, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
- </para>
- <para>
- So, in order to avoid issues when we would like to package several products at the same time (i.e. WCM, DMS, CS, KS), we need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Avoid the best you can to redefine a configuration file from the "portal.war" by using the exact same path (like the previous example)
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_import_properly_a_configuration_file_using_the_prefix_war">
+ <title>How to import properly a configuration file using the prefix "war:"?</title>
+ <para>
+ Now, the <emphasis>ConfigurationManager</emphasis> uses by default the unified servlet context of the portal in order to get any resources in particular the configuration files. The unified servlet context is aware of the priorities that has been set in the <emphasis>PortalContainerDefinition</emphasis> of the portal. In other words, if you want for instance to import the file <emphasis>war:/conf/database/database-configuration.xml</emphasis> and this file exists in 2 different web applications, the file from the last (according to the dependency order) web application will be loaded.
+ </para>
+ <para>
+ So, in order to avoid issues when we would like to package several products at the same time (i.e. WCM, DMS, CS, KS), we need to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Avoid the best you can to redefine a configuration file from the "portal.war" by using the exact same path (like the previous example)
+ </para>
- </listitem>
- <listitem>
- <para>
- Add your configuration files in a dedicated folder which name will be the name of the product, in oder to ensure that no other products will use the same path
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add your configuration files in a dedicated folder which name will be the name of the product, in oder to ensure that no other products will use the same path
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- The example below, is an the example of a file <emphasis>WEB-INF/conf/configuration.xml</emphasis> of the product "sample-ext".
- </para>
-
+ </itemizedlist>
+ <para>
+ The example below, is an the example of a file <emphasis>WEB-INF/conf/configuration.xml</emphasis> of the product "sample-ext".
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1189,14 +1189,14 @@
<import>war:/conf/sample-ext/web/web-inf-extension-configuration.xml</import>
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_avoid_duplicating_configuration_files_just_to_rename_a_simple_value">
- <title>How to avoid duplicating configuration files just to rename a simple value?</title>
- <para>
- In your configuration file, you can use a special variable called <emphasis>container.name.suffix</emphasis> in order to add a suffix to values that could change between portal containers. The value of this variable will be an empty sting if no <emphasis>PortalContainerDefinition</emphasis> has been defined otherwise the value will be <emphasis>\-$portal.container.name</emphasis>. <emphasis role="underline">See an example below:</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_avoid_duplicating_configuration_files_just_to_rename_a_simple_value">
+ <title>How to avoid duplicating configuration files just to rename a simple value?</title>
+ <para>
+ In your configuration file, you can use a special variable called <emphasis>container.name.suffix</emphasis> in order to add a suffix to values that could change between portal containers. The value of this variable will be an empty sting if no <emphasis>PortalContainerDefinition</emphasis> has been defined otherwise the value will be <emphasis>\-$portal.container.name</emphasis>. <emphasis role="underline">See an example below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1227,38 +1227,38 @@
</component>
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_or_change_a_Repository_andor_a_Workspace">
- <title>How to add or change a Repository and/or a Workspace?</title>
- <para>
- Now you can add new JCR repositories or workspaces thanks to an external plugin, the configuration of your JCR Repositories will be merged knowing that the merge algorithm will:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add missing Repository Definitions and/or Workspace Definitions.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_or_change_a_Repository_andor_a_Workspace">
+ <title>How to add or change a Repository and/or a Workspace?</title>
+ <para>
+ Now you can add new JCR repositories or workspaces thanks to an external plugin, the configuration of your JCR Repositories will be merged knowing that the merge algorithm will:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add missing Repository Definitions and/or Workspace Definitions.
+ </para>
- </listitem>
- <listitem>
- <para>
- Change the properties of a Repository Definition if it has already been defined.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change the properties of a Repository Definition if it has already been defined.
+ </para>
- </listitem>
- <listitem>
- <para>
- Replace the Workspace Definition if it has already been defined.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Replace the Workspace Definition if it has already been defined.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- <emphasis role="underline">See an example of jcr-configuration.xml below:</emphasis>
- </para>
-
+ </itemizedlist>
+ <para>
+ <emphasis role="underline">See an example of jcr-configuration.xml below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1284,10 +1284,10 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <para>
- See an example of repository-configuration.xml below:
- </para>
-
+ <para>
+ See an example of repository-configuration.xml below:
+ </para>
+
<programlisting language="XML" role="XML"><repository-service default-repository="repository">
<repositories>
<repository name="repository" system-workspace="system" default-workspace="portal-system">
@@ -1347,25 +1347,25 @@
</repository>
</repositories>
</repository-service></programlisting>
- <warning>
- <title>Warning</title>
- <para>
- If you have to change the default repository or the default workspace, please be careful since it could cause side effects as you could be incompatible with some portal configuration files that refer explicitly to <emphasis>portal-system</emphasis> and/or to <emphasis>repository</emphasis>. To solve this problem you can either redefine the configuration file in a portal extension to change the workspace name and/or the repository name or you could also add your own repository instead of your own workspace.
- </para>
+ <warning>
+ <title>Warning</title>
+ <para>
+ If you have to change the default repository or the default workspace, please be careful since it could cause side effects as you could be incompatible with some portal configuration files that refer explicitly to <emphasis>portal-system</emphasis> and/or to <emphasis>repository</emphasis>. To solve this problem you can either redefine the configuration file in a portal extension to change the workspace name and/or the repository name or you could also add your own repository instead of your own workspace.
+ </para>
- </warning>
+ </warning>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_ResourceBundles_to_my_portal">
- <title>How to add new ResourceBundles to my portal?</title>
- <para>
- Now you can add new Resource Bundles, thanks to an external plugin.
- </para>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_ResourceBundles_to_my_portal">
+ <title>How to add new ResourceBundles to my portal?</title>
+ <para>
+ Now you can add new Resource Bundles, thanks to an external plugin.
+ </para>
+ <para>
+ <emphasis role="underline">See an example below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1403,34 +1403,34 @@
</external-component-plugins>
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_overwrite_existing_ResourceBundles_in_my_portal">
- <title>How to overwrite existing ResourceBundles in my portal?</title>
- <para>
- Now each portal container has its own <emphasis>ClassLoader</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalClassLoader()</emphasis>). This <emphasis>ClassLoader</emphasis> is an unified <emphasis>ClassLoader</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis>, so to add new keys or update key values, you just need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the corresponding resource bundle with the same name, with <emphasis role="underline">the same extension</emphasis> (xml or properties) at the same location into the <emphasis>classpath</emphasis> of your Web application (i.e. directly into the <emphasis>WEB-INF/classes</emphasis> directory or into a jar file in the <emphasis>WEB-INF/lib</emphasis> directory)
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_overwrite_existing_ResourceBundles_in_my_portal">
+ <title>How to overwrite existing ResourceBundles in my portal?</title>
+ <para>
+ Now each portal container has its own <emphasis>ClassLoader</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalClassLoader()</emphasis>). This <emphasis>ClassLoader</emphasis> is an unified <emphasis>ClassLoader</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis>, so to add new keys or update key values, you just need to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the corresponding resource bundle with the same name, with <emphasis role="underline">the same extension</emphasis> (xml or properties) at the same location into the <emphasis>classpath</emphasis> of your Web application (i.e. directly into the <emphasis>WEB-INF/classes</emphasis> directory or into a jar file in the <emphasis>WEB-INF/lib</emphasis> directory)
+ </para>
- </listitem>
- <listitem>
- <para>
- Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- In the example below, we want to change the values of the keys <emphasis>UIHomePagePortlet.Label.Username</emphasis> and <emphasis>UIHomePagePortlet.Label.Password</emphasis>, and add the new key <emphasis>UIHomePagePortlet.Label.SampleKey</emphasis> into the Resource Bundle <emphasis>locale.portal.webui</emphasis>.
- </para>
- <note>
- <title>WEB-INF/classes/local/portal/webui_en.properties</title>
-
+ </itemizedlist>
+ <para>
+ In the example below, we want to change the values of the keys <emphasis>UIHomePagePortlet.Label.Username</emphasis> and <emphasis>UIHomePagePortlet.Label.Password</emphasis>, and add the new key <emphasis>UIHomePagePortlet.Label.SampleKey</emphasis> into the Resource Bundle <emphasis>locale.portal.webui</emphasis>.
+ </para>
+ <note>
+ <title>WEB-INF/classes/local/portal/webui_en.properties</title>
+
<programlisting>#############################################################################
#org.exoplatform.portal.webui.component.UIHomePagePortlet #
#############################################################################
@@ -1439,42 +1439,42 @@
UIHomePagePortlet.Label.Password=Pwd:
UIHomePagePortlet.Label.SampleKey=This is a new key that has been added to the Resource Bundle "locale.portal.webui" of "sample-ext"</programlisting>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_replace_a_groovy_template_of_my_portal">
- <title>How to replace a groovy template of my portal?</title>
- <para>
- Now each portal container has its own <emphasis>ServletContext</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalContext()</emphasis>). This <emphasis>ServletContext</emphasis> is an unified <emphasis>ServletContext</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> so to replace a groovy template of the portal, you just need to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the corresponding groovy template with the same name at the same location into your Web application
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_replace_a_groovy_template_of_my_portal">
+ <title>How to replace a groovy template of my portal?</title>
+ <para>
+ Now each portal container has its own <emphasis>ServletContext</emphasis> which is automatically set for you at runtime (FYI: it could be retrieved thanks to <emphasis>portalContainer.getPortalContext()</emphasis>). This <emphasis>ServletContext</emphasis> is an unified <emphasis>ServletContext</emphasis> that is also aware of the dependency order defined into the <emphasis>PortalContainerDefinition</emphasis> so to replace a groovy template of the portal, you just need to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the corresponding groovy template with the same name at the same location into your Web application
+ </para>
- </listitem>
- <listitem>
- <para>
- Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Ensure that your web application is defined after the web application of the portal in the dependency list of the related <emphasis>PortalContainerDefinition</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_Portal_Configurations_Navigations_Pages_or_Portlet_Preferences_to_my_portal">
- <title>How to add new Portal Configurations, Navigations, Pages or Portlet Preferences to my portal?</title>
- <para>
- Now you can add new Portal Configurations, Navigations, Pages or Portlet Preferences thanks to an external plugin.
- </para>
- <para>
- <emphasis role="underline">See an example below:</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_Portal_Configurations_Navigations_Pages_or_Portlet_Preferences_to_my_portal">
+ <title>How to add new Portal Configurations, Navigations, Pages or Portlet Preferences to my portal?</title>
+ <para>
+ Now you can add new Portal Configurations, Navigations, Pages or Portlet Preferences thanks to an external plugin.
+ </para>
+ <para>
+ <emphasis role="underline">See an example below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1554,17 +1554,17 @@
</external-component-plugins>
</configuration></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_Http_Filters_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new Http Filters to my portal without modifying the portal binary?</title>
- <para>
- We added a <emphasis>GenericFilter</emphasis> that allows you to define new Http Filters thanks to an external plugin. Your filter will need to implement the interface <emphasis>org.exoplatform.web.filter.Filter</emphasis>.
- </para>
- <para>
- <emphasis role="underline">See an example of configuration below:</emphasis>
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_Http_Filters_to_my_portal_without_modifying_the_portal_binary">
+ <title>How to add new Http Filters to my portal without modifying the portal binary?</title>
+ <para>
+ We added a <emphasis>GenericFilter</emphasis> that allows you to define new Http Filters thanks to an external plugin. Your filter will need to implement the interface <emphasis>org.exoplatform.web.filter.Filter</emphasis>.
+ </para>
+ <para>
+ <emphasis role="underline">See an example of configuration below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1601,12 +1601,12 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <para>
- See an example of Filter below:
- </para>
- <note>
- <title>SampleFilter.java</title>
-
+ <para>
+ See an example of Filter below:
+ </para>
+ <note>
+ <title>SampleFilter.java</title>
+
<programlisting language="Java" role="Java">...
import org.exoplatform.web.filter.Filter;
@@ -1635,49 +1635,49 @@
}
}</programlisting>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpSessionListeners_andor_ServletContextListeners_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> to my portal without modifying the portal binary?</title>
- <para>
- We added a <emphasis>GenericHttpListener</emphasis> that allows you to define new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> thanks to an external plugin. Actually, the <emphasis>GenericHttpListener</emphasis> will broadcast events thanks to the <emphasis>ListenerService</emphasis> that you can easily capture. The events that it broadcasts are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>: When a new session is created in the portal.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpSessionListeners_andor_ServletContextListeners_to_my_portal_without_modifying_the_portal_binary">
+ <title>How to add new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> to my portal without modifying the portal binary?</title>
+ <para>
+ We added a <emphasis>GenericHttpListener</emphasis> that allows you to define new <emphasis>HttpSessionListeners</emphasis> and/or <emphasis>ServletContextListeners</emphasis> thanks to an external plugin. Actually, the <emphasis>GenericHttpListener</emphasis> will broadcast events thanks to the <emphasis>ListenerService</emphasis> that you can easily capture. The events that it broadcasts are:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>: When a new session is created in the portal.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.sessionDestroyed</emphasis>: When a session is destroyed in the portal.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>org.exoplatform.web.GenericHttpListener.sessionDestroyed</emphasis>: When a session is destroyed in the portal.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.contextInitialized</emphasis>: When the servlet context of the portal is initialized.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>org.exoplatform.web.GenericHttpListener.contextInitialized</emphasis>: When the servlet context of the portal is initialized.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>org.exoplatform.web.GenericHttpListener.contextDestroyed</emphasis>: When the servlet context of the portal is destroyed.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>org.exoplatform.web.GenericHttpListener.contextDestroyed</emphasis>: When the servlet context of the portal is destroyed.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- If you want to listen to <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.sessionDestroyed_, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextInitialized_, you will need to create a Listener that extends _Listener<PortalContainer, ServletContextEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextDestroyed_, you will need to create a Listener that extends <emphasis>Listener<PortalContainer, ServletContextEvent></emphasis>
- </para>
- <para>
- <emphasis role="underline">See an example of configuration below:</emphasis>
- </para>
-
+ </itemizedlist>
+ <para>
+ If you want to listen to <emphasis>org.exoplatform.web.GenericHttpListener.sessionCreated</emphasis>, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.sessionDestroyed_, you will need to create a Listener that extends _Listener<PortalContainer, HttpSessionEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextInitialized_, you will need to create a Listener that extends _Listener<PortalContainer, ServletContextEvent>_If you want to listen to \_org.exoplatform.web.GenericHttpListener.contextDestroyed_, you will need to create a Listener that extends <emphasis>Listener<PortalContainer, ServletContextEvent></emphasis>
+ </para>
+ <para>
+ <emphasis role="underline">See an example of configuration below:</emphasis>
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -1720,12 +1720,12 @@
</component-plugin>
</external-component-plugins>
</configuration></programlisting>
- <para>
- See an example of Session Listener below:
- </para>
- <note>
- <title>SampleHttpSessionCreatedListener.java</title>
-
+ <para>
+ See an example of Session Listener below:
+ </para>
+ <note>
+ <title>SampleHttpSessionCreatedListener.java</title>
+
<programlisting language="Java" role="Java">..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
@@ -1743,13 +1743,13 @@
}
}</programlisting>
- </note>
- <para>
- See an example of Context Listener below:
- </para>
- <note>
- <title>SampleContextInitializedListener.java</title>
-
+ </note>
+ <para>
+ See an example of Context Listener below:
+ </para>
+ <note>
+ <title>SampleContextInitializedListener.java</title>
+
<programlisting language="Java" role="Java">..
import org.exoplatform.container.PortalContainer;
import org.exoplatform.services.listener.Event;
@@ -1767,233 +1767,233 @@
}
}</programlisting>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpServlet_to_my_portal_without_modifying_the_portal_binary">
- <title>How to add new <emphasis>HttpServlet</emphasis> to my portal without modifying the portal binary?</title>
- <para>
- Actually, it is not possible but you can create a rest component instead. For more details about rest, please refer to the following article <xref linkend="sect-Reference_Guide-eXo_Web_Services" />.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_add_new_HttpServlet_to_my_portal_without_modifying_the_portal_binary">
+ <title>How to add new <emphasis>HttpServlet</emphasis> to my portal without modifying the portal binary?</title>
+ <para>
+ Actually, it is not possible but you can create a rest component instead. For more details about rest, please refer to the following article <xref linkend="sect-Reference_Guide-eXo_Web_Services" />.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_override_or_add_a_Context_Parameter_to_my_portal_without_modifying_the_portal_binary">
- <title>How to override or add a Context Parameter to my portal without modifying the portal binary?</title>
- <para>
- Actually, you have nothing to do, you just need to ensure that you get the context parameter value from the unified servlet context of the portal, that should be set for you but you can still get it from <emphasis>portalContainer.getPortalContext()</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_override_or_add_a_Context_Parameter_to_my_portal_without_modifying_the_portal_binary">
+ <title>How to override or add a Context Parameter to my portal without modifying the portal binary?</title>
+ <para>
+ Actually, you have nothing to do, you just need to ensure that you get the context parameter value from the unified servlet context of the portal, that should be set for you but you can still get it from <emphasis>portalContainer.getPortalContext()</emphasis>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-Where_can_I_found_an_example_of_how_to_extend_my_portal">
- <title>Where can I found an example of how to extend my portal?</title>
- <para>
- We added an example of portal extension (i.e. ability to customize a portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/extension.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-Where_can_I_found_an_example_of_how_to_extend_my_portal">
+ <title>Where can I found an example of how to extend my portal?</title>
+ <para>
+ We added an example of portal extension (i.e. ability to customize a portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/extension.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_extension">
- <title>How to deploy the sample extension?</title>
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
- </para>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-ext.ear</emphasis> from sample/extension/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>sample-ext.war</emphasis> which is the web application that contains (potentially) configuration files, groovy templates, resource bundles, skins and javascript files, that will extend the portal.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_extension">
+ <title>How to deploy the sample extension?</title>
+ <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_JBoss_tested_on_JBoss_5.1.0.GA">
+ <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
+ <para>
+ We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
+ </para>
+ <para>
+ <emphasis role="underline">You need to:</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the file <emphasis>sample-ext.ear</emphasis> from sample/extension/ear/target/ to the deploy directory of JBoss, this file contains:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The file <emphasis>sample-ext.war</emphasis> which is the web application that contains (potentially) configuration files, groovy templates, resource bundles, skins and javascript files, that will extend the portal.
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of the original portal in which we added <emphasis>sample-ext</emphasis> at the end of dependency list.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of the original portal in which we added <emphasis>sample-ext</emphasis> at the end of dependency list.
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
+ </listitem>
- </itemizedlist>
- <warning>
- <title>Warning #1</title>
- <para>
- This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-ext.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
- </para>
+ </itemizedlist>
+ <warning>
+ <title>Warning #1</title>
+ <para>
+ This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-ext.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
+ </para>
- </warning>
- <warning>
- <title>Warning #2</title>
- <para>
- The file <emphasis>starter.ear</emphasis> must always been started last.
- </para>
+ </warning>
+ <warning>
+ <title>Warning #2</title>
+ <para>
+ The file <emphasis>starter.ear</emphasis> must always been started last.
+ </para>
- </warning>
+ </warning>
- </section>
-
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-ext.war</emphasis> from sample/extension/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_deploy_the_sample_extension-On_Tomcat_tested_on_Tomcat_6.0.20">
+ <title>On Tomcat (tested on Tomcat 6.0.20)</title>
+ <para>
+ We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the file <emphasis>sample-ext.war</emphasis> from sample/extension/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> (for more details see the warning below)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> (for more details see the warning below)
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> from sample/extension/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the jar file <emphasis>exo.portal.sample.extension.config-X.Y.Z.jar</emphasis> from sample/extension/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> from sample/extension/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the jar file <emphasis>exo.portal.sample.extension.jar-X.Y.Z.jar</emphasis> from sample/extension/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <warning>
- <title>Warning</title>
- <para>
- This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
- </para>
+ </itemizedlist>
+ <warning>
+ <title>Warning</title>
+ <para>
+ This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
+ </para>
- </warning>
+ </warning>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-FAQ-Where_can_I_find_an_example_of_how_to_create_a_new_portal">
- <title>Where can I find an example of how to create a new portal?</title>
- <para>
- We added an example of new portal (i.e. ability to create a new portal from another portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/portal.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-Where_can_I_find_an_example_of_how_to_create_a_new_portal">
+ <title>Where can I find an example of how to create a new portal?</title>
+ <para>
+ We added an example of new portal (i.e. ability to create a new portal from another portal without changing anything in the portal.ear) that you can find in the svn of gatein at gatein/sample/portal.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_portal">
- <title>How to deploy the sample portal?</title>
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_JBoss_tested_on_JBoss_5.1.0.GA">
- <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
- <para>
- We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
- </para>
- <para>
- <emphasis role="underline">You need to:</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-portal.ear</emphasis> from <emphasis>sample/portal/ear/target/</emphasis> to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>sample-portal.war</emphasis> which is the entry point of the new portal
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-How_to_deploy_the_sample_portal">
+ <title>How to deploy the sample portal?</title>
+ <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_JBoss_tested_on_JBoss_5.1.0.GA">
+ <title>On JBoss (tested on JBoss 5.1.0.GA)</title>
+ <para>
+ We assume that you have a clean JBoss version of GateIn, in other words, we assume that you have already the file <emphasis>exoplatform.ear</emphasis> in the <emphasis>deploy</emphasis> directory of JBoss and you have the related application policy in your <emphasis>conf/login-config.xml</emphasis>.
+ </para>
+ <para>
+ <emphasis role="underline">You need to:</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the file <emphasis>sample-portal.ear</emphasis> from <emphasis>sample/portal/ear/target/</emphasis> to the deploy directory of JBoss, this file contains:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The file <emphasis>sample-portal.war</emphasis> which is the entry point of the new portal
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>rest-sample-portal.war</emphasis> which is the entry point for <emphasis>rest</emphasis> outside the portal (in the portal you can access to <emphasis>rest</emphasis> thanks to path prefix <emphasis>/sample-portal/rest</emphasis>)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>rest-sample-portal.war</emphasis> which is the entry point for <emphasis>rest</emphasis> outside the portal (in the portal you can access to <emphasis>rest</emphasis> thanks to path prefix <emphasis>/sample-portal/rest</emphasis>)
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of this portal
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> which is the file in which we defined the <emphasis>PortalContainerDefinition</emphasis> of this portal
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> which is the file in which we have internal classes that are actualy a set of sample classes <emphasis>(SampleFilter, SampleContextInitializedListener, SampleContextDestroyedListener, SampleHttpSessionCreatedListener and SampleHttpSessionDestroyedListener)</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the file <emphasis>starter.ear</emphasis> from starter/ear/target/ to the deploy directory of JBoss, this file contains:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The file <emphasis>starter.war</emphasis> which is the web application that will create and start all the portal containers, that is why it must be launched after all the other web applications.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </listitem>
- <listitem>
- <para>
- Define the related application policy in your file <emphasis>conf/login-config.xml</emphasis>, as below:
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Define the related application policy in your file <emphasis>conf/login-config.xml</emphasis>, as below:
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<programlisting language="XML" role="XML"> <application-policy name="exo-domain-sample-portal">
<authentication>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
@@ -2010,76 +2010,76 @@
</login-module>
</authentication>
</application-policy></programlisting>
- <warning>
- <title>Warning #1</title>
- <para>
- This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-portal.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
- </para>
+ <warning>
+ <title>Warning #1</title>
+ <para>
+ This can only work if a Unified ClassLoader has been configured on your JBoss (default behavior) and the load order is first the <emphasis>exoplatform.ear</emphasis> then the <emphasis>sample-portal.ear</emphasis> and finally the <emphasis>starter.ear</emphasis>.
+ </para>
- </warning>
- <warning>
- <title>Warning #2</title>
- <para>
- The file <emphasis>starter.ear</emphasis> must always been started last.
- </para>
+ </warning>
+ <warning>
+ <title>Warning #2</title>
+ <para>
+ The file <emphasis>starter.ear</emphasis> must always been started last.
+ </para>
- </warning>
+ </warning>
- </section>
-
- <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_Tomcat_tested_on_Tomcat_6.0.20">
- <title>On Tomcat (tested on Tomcat 6.0.20)</title>
- <para>
- We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Add the file <emphasis>sample-portal.war</emphasis> from sample/portal/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_deploy_the_sample_portal-On_Tomcat_tested_on_Tomcat_6.0.20">
+ <title>On Tomcat (tested on Tomcat 6.0.20)</title>
+ <para>
+ We assume that you have a clean Tomcat version of GateIn, in other words, we assume that you have already all the jar files of GateIn and their dependencies into <emphasis>tomcat/lib</emphasis>, you have all the war files of GateIn into <emphasis>tomcat/webapps</emphasis> and you have the realm name "exo-domain" defined into the file <emphasis>tomcat/conf/jaas.conf</emphasis>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the file <emphasis>sample-portal.war</emphasis> from sample/portal/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the file <emphasis>rest-sample-portal.war</emphasis> from sample/portal/rest-war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the file <emphasis>rest-sample-portal.war</emphasis> from sample/portal/rest-war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the folder <emphasis>starter</emphasis> from starter/war/target/ to the <emphasis>tomcat/webapps</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> <emphasis>(for more details see the warning below)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the directory (unzipped folder) <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis> <emphasis>(for more details see the warning below)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> from sample/portal/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the jar file <emphasis>exo.portal.sample.portal.config-X.Y.Z.jar</emphasis> from sample/portal/config/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Add the jar file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> from sample/portal/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the jar file <emphasis>exo.portal.sample.portal.jar-X.Y.Z.jar</emphasis> from sample/portal/jar/target/ to the <emphasis>tomcat/lib</emphasis> directory. <emphasis>(See the purpose of this file in the JBoss section)</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- Define the related realm in your file <emphasis>tomcat/conf/jaas.conf</emphasis>, as below:
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Define the related realm in your file <emphasis>tomcat/conf/jaas.conf</emphasis>, as below:
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <note>
- <title>tomcat/conf/jaas.conf</title>
-
+ </itemizedlist>
+ <note>
+ <title>tomcat/conf/jaas.conf</title>
+
<programlisting>...
exo-domain-sample-portal {
org.exoplatform.web.security.PortalLoginModule required
@@ -2093,19 +2093,19 @@
realmName="exo-domain-sample-portal";
};</programlisting>
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Define the context of <emphasis>sample-portal</emphasis> by creating a file called <emphasis>sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
- </para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Define the context of <emphasis>sample-portal</emphasis> by creating a file called <emphasis>sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <note>
- <title>tomcat/conf/Catalina/localhost/sample-portal.xml</title>
-
+ </itemizedlist>
+ <note>
+ <title>tomcat/conf/Catalina/localhost/sample-portal.xml</title>
+
<programlisting language="XML" role="XML"><Context path='/sample-portal' docBase='sample-portal' debug='0' reloadable='true' crossContext='true' privileged='true'>
<Logger className='org.apache.catalina.logger.SystemOutLogger'
prefix='localhost_portal_log.' suffix='.txt' timestamp='true'/>
@@ -2117,19 +2117,19 @@
debug='0' cache='false'/>
<Valve className='org.apache.catalina.authenticator.FormAuthenticator' characterEncoding='UTF-8'/></Context></programlisting>
- </note>
- <itemizedlist>
- <listitem>
- <para>
- Define the context of <emphasis>rest-sample-portal</emphasis> by creating a file called <emphasis>rest-sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
- </para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Define the context of <emphasis>rest-sample-portal</emphasis> by creating a file called <emphasis>rest-sample-portal.xml</emphasis> into <emphasis>tomcat/conf/Catalina/localhost/</emphasis> with the following content:
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <note>
- <title>tomcat/conf/Catalina/localhost/rest-sample-portal.xml</title>
-
+ </itemizedlist>
+ <note>
+ <title>tomcat/conf/Catalina/localhost/rest-sample-portal.xml</title>
+
<programlisting language="XML" role="XML"><Context path="/rest-sample-portal" docBase="rest-sample-portal" reloadable="true" crossContext="false">
<Logger className='org.apache.catalina.logger.SystemOutLogger'
@@ -2142,100 +2142,100 @@
debug='0' cache='false'/>
</Context></programlisting>
- </note>
- <warning>
- <title>Warning</title>
- <para>
- This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
- </para>
+ </note>
+ <warning>
+ <title>Warning</title>
+ <para>
+ This can only work if the <emphasis>starter.war</emphasis> is the last war file to be loaded, so don't hesitate to rename it if your war files are loaded following to the alphabetic order.
+ </para>
- </warning>
+ </warning>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-FAQ-I_get_java.lang.IllegalStateException_No_pre_init_tasks_can_be_added_to_the_portal_container_portal_because_it_has_already_been_initialized._what_can_I_do_to_fix_it">
- <title>I get "java.lang.IllegalStateException: No pre init tasks can be added to the portal container 'portal', because it has already been initialized." what can I do to fix it?</title>
- <para>
- To fix this issue you need to check if:
- </para>
- <orderedlist>
- <listitem>
- <para>
- The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) has been deployed
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-FAQ-I_get_java.lang.IllegalStateException_No_pre_init_tasks_can_be_added_to_the_portal_container_portal_because_it_has_already_been_initialized._what_can_I_do_to_fix_it">
+ <title>I get "java.lang.IllegalStateException: No pre init tasks can be added to the portal container 'portal', because it has already been initialized." what can I do to fix it?</title>
+ <para>
+ To fix this issue you need to check if:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) has been deployed
+ </para>
- </listitem>
- <listitem>
- <para>
- The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) is the last ear file to be launched
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The file <emphasis>starter-gatein.ear</emphasis> (which will be <emphasis>starter.war</emphasis> for Tomcat) is the last ear file to be launched
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- <note>
- <title>Note</title>
- <para>
- With Tomcat to prevent any alphabetic issue, the good way to solve this problem is to:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Unzip the archive <emphasis>starter.war</emphasis> into a directory called <emphasis>starter</emphasis>
- </para>
+ </orderedlist>
+ <note>
+ <title>Note</title>
+ <para>
+ With Tomcat to prevent any alphabetic issue, the good way to solve this problem is to:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Unzip the archive <emphasis>starter.war</emphasis> into a directory called <emphasis>starter</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Remove the archive <emphasis>starter.war</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Remove the archive <emphasis>starter.war</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- Rename the folder <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename the folder <emphasis>starter</emphasis> to <emphasis>starter.war</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- This tip works because folders corresponding to unzipped wars are launched after war files.
- </para>
+ </itemizedlist>
+ <para>
+ This tip works because folders corresponding to unzipped wars are launched after war files.
+ </para>
- </note>
+ </note>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Recommendations">
- <title>Recommendations</title>
- <section id="sect-Reference_Guide-Recommendations-Dont_ship_your_configuration_files_with_your_jar_files">
- <title>Don't ship your configuration files with your jar files?</title>
- <para>
- Remove all the configuration files from the jar files ( <emphasis>conf/configuration.xml</emphasis> and <emphasis>conf/portal/configuration.xml</emphasis>) and move them to the war file of your extension, otherwise your configuration files will be loaded for all the portal containers which could cause incompatibility issues with other portals.
- </para>
- <para>
- Each extension should manage independently, its css files, js files, google gadgets and configuration files. If you add configuration files into the jar files of your extension, you brake this law.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-How_to_extend_my_GateIn_instance-Recommendations">
+ <title>Recommendations</title>
+ <section id="sect-Reference_Guide-Recommendations-Dont_ship_your_configuration_files_with_your_jar_files">
+ <title>Don't ship your configuration files with your jar files?</title>
+ <para>
+ Remove all the configuration files from the jar files ( <emphasis>conf/configuration.xml</emphasis> and <emphasis>conf/portal/configuration.xml</emphasis>) and move them to the war file of your extension, otherwise your configuration files will be loaded for all the portal containers which could cause incompatibility issues with other portals.
+ </para>
+ <para>
+ Each extension should manage independently, its css files, js files, google gadgets and configuration files. If you add configuration files into the jar files of your extension, you brake this law.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Recommendations-Using_a_dedicated_workspacerepository_for_your_extension">
- <title>Using a dedicated workspace/repository for your extension?</title>
- <para>
- In order to avoid conflicts with other extensions and to manage each extension independently, it is highly recommended to use a dedicated workspace or repository per extension.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Recommendations-Using_a_dedicated_workspacerepository_for_your_extension">
+ <title>Using a dedicated workspace/repository for your extension?</title>
+ <para>
+ In order to avoid conflicts with other extensions and to manage each extension independently, it is highly recommended to use a dedicated workspace or repository per extension.
+ </para>
- </section>
-
+ </section>
+
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/jcr.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -48,10 +48,10 @@
<xi:include href="jcr/protocols/webdav.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="jcr/protocols/ftp.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- backup -->
+ <!-- backup
<xi:include href="jcr/backup/exojcr-backup-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="jcr/backup/backup-client.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="jcr/backup/use-external-backup-tool.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="jcr/backup/use-external-backup-tool.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
<!-- other -->
<xi:include href="jcr/statistics.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/cache.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -1340,453 +1340,6 @@
</section>
-
- <section id="sect-Reference_Guide-eXo_Cache-eXo_Cache_based_on_Infinispan">
- <title>eXo Cache based on Infinispan</title>
- <section id="sect-Reference_Guide-eXo_Cache_based_on_Infinispan-Configure_the_ExoCacheFactory">
- <title>Configure the ExoCacheFactory</title>
- <para>
- When you add the related jar file in your classpath, the eXo service container will use the default configuration provided in the library itself but of course you can still redefined the configuration if you wish as you can do with any components.
- </para>
- <para>
- The default configuration of the factory is:
- </para>
-
-<programlisting language="XML" role="XML"><configuration>
- <component>
- <key>org.exoplatform.services.cache.ExoCacheFactory</key>
- <type>org.exoplatform.services.cache.impl.infinispan.ExoCacheFactoryImpl</type>
- <init-params>
- <value-param>
- <name>cache.config.template</name>
- <value>jar:/conf/portal/cache-configuration-template.xml</value>
- </value-param>
- </init-params>
- </component>
-</configuration></programlisting>
- <para>
- As you can see the factory requires one single parameter which is <emphasis>cache.config.template</emphasis>, this parameter allows you to define the location of the default configuration template of your infinispan. In the default configuration, we ask the eXo container to get the file shipped into the jar at <emphasis>/conf/portal/cache-configuration-template.xml</emphasis>.
- </para>
- <para>
- The default configuration template aims to be the skeleton from which we will create any type of infinispan cache instance, thus it must be very generic.
- </para>
- <note>
- <para>
- All the cache instances that will rely on this cache configuration will share the same <envar>EmbeddedCacheManager.</envar>
- </para>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-eXo_Cache_based_on_Infinispan-Add_specific_configuration_for_a_cache">
- <title>Add specific configuration for a cache</title>
- <para>
- If for a given reason, you need to use a specific configuration for a cache, you can register one thanks to an "<emphasis>external plugin</emphasis>", see an example below:
- </para>
-
-<programlisting language="XML" role="XML"><configuration>
- ...
- <external-component-plugins>
- <target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
- <component-plugin>
- <name>addConfig</name>
- <set-method>addConfig</set-method>
- <type>org.exoplatform.services.cache.impl.infinispan.ExoCacheFactoryConfigPlugin</type>
- <description>add Custom Configurations</description>
- <init-params>
- <value-param>
- <name>myCustomCache</name>
- <value>jar:/conf/portal/custom-cache-configuration.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
- ...
-</configuration></programlisting>
- <para>
- In the example above, I call the method <emphasis>addConfig(ExoCacheFactoryConfigPlugin plugin)</emphasis> on the current implementation of <envar>ExoCacheFactory</envar> which is actually the infinispan implementation.
- </para>
- <para>
- In the <emphasis>init-params</emphasis> block, you can define a set of <emphasis>value-param</emphasis> blocks and for each <emphasis>value-param</emphasis>, we expect the name of cache that needs a specific configuration as name and the location of your custom configuration as <emphasis>value</emphasis>.
- </para>
- <para>
- In this example, we indicates to the factory that we would like that the cache <emphasis>myCustomCache</emphasis> use the configuration available at <emphasis>jar:/conf/portal/custom-cache-configuration.xml</emphasis>.
- </para>
- <note>
- <para>
- All the cache instances that will rely on the cache configuration located at the same location will share the same <envar>EmbeddedCacheManager</envar>.
- </para>
-
- </note>
-
- </section>
-
- <section id="sect-Reference_Guide-eXo_Cache_based_on_Infinispan-Add_a_cache_creator">
- <title>Add a cache creator</title>
- <section id="sect-Reference_Guide-Add_a_cache_creator-Understanding_a_cache_creator">
- <title>Understanding a cache creator</title>
- <para>
- The factory for infinispan, delegates the cache creation to <envar>ExoCacheCreator</envar> that is defined as below:
- </para>
-
-<programlisting language="Java" role="Java">package org.exoplatform.services.cache.impl.infinispan;
-...
-public interface ExoCacheCreator {
-
- /**
- * Creates an eXo cache according to the given configuration {@link org.exoplatform.services.cache.ExoCacheConfig}
- * @param config the configuration of the cache to apply
- * @param cacheConfig the configuration of the infinispan cache
- * @param cacheGetter a {@link Callable} instance from which we can get the cache
- * @exception ExoCacheInitException if an exception happens while initializing the cache
- */
- public ExoCache<Serializable, Object> create(ExoCacheConfig config, Configuration cacheConfig, Callable<Cache<Serializable, Object>> cacheGetter) throws ExoCacheInitException;
-
- /**
- * Returns the type of {@link org.exoplatform.services.cache.ExoCacheConfig} expected by the creator
- * @return the expected type
- */
- public Class<? extends ExoCacheConfig> getExpectedConfigType();
-
- /**
- * Returns a set of all the implementations expected by the creator. This is mainly used to be backward compatible
- * @return the expected by the creator
- */
- public Set<String> getExpectedImplementations();
-}</programlisting>
- <para>
- The <envar>ExoCacheCreator</envar> allows you to define any kind of infinispan cache instance that you would like to have. It has been designed to give you the ability to have your own type of configuration and to always be backward compatible.
- </para>
- <para>
- In an <envar>ExoCacheCreator</envar>, you need to implement 3 methods which are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>create</emphasis> - this method is used to create a new <envar>ExoCache</envar> from the <envar>ExoCacheConfig</envar>, an inifinispan cache configuration and a Callable object to allow you to get the cache instance.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>getExpectedConfigType</emphasis> - this method is used to indicate the factory the subtype of <envar>ExoCacheConfig</envar> supported by the creator.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <emphasis>getExpectedImplementation</emphasis>s - this method is used to indicate the factory the values of the field <emphasis>implementation</emphasis> of <envar>ExoCacheConfig</envar> that is supported by the creator. This is used for backward compatibility, in other words you can still configure your cache with an instance of <envar>ExoCacheConfig</envar>.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-Add_a_cache_creator-Register_a_cache_creator">
- <title>Register a cache creator</title>
- <para>
- You can register any cache creator you want thanks to an <emphasis>"external plugin"</emphasis>, see an example below:
- </para>
-
-<programlisting language="XML" role="XML"> <external-component-plugins>
- <target-component>org.exoplatform.services.cache.ExoCacheFactory</target-component>
- <component-plugin>
- <name>addCreator</name>
- <set-method>addCreator</set-method>
- <type>org.exoplatform.services.cache.impl.infinispan.ExoCacheCreatorPlugin</type>
- <description>add Exo Cache Creator</description>
- <init-params>
- <object-param>
- <name>Test</name>
- <description>The cache creator for testing purpose</description>
- <object type="org.exoplatform.services.cache.impl.infinispan.TestExoCacheCreator"></object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins></programlisting>
- <para>
- In the example above, I call the method <emphasis>addCreator(ExoCacheCreatorPlugin plugin)</emphasis> on the current implementation of <envar>ExoCacheFactory</envar> which is actually the infinispan implementation.
- </para>
- <para>
- In the <emphasis>init-params</emphasis> block, you can define a set of <emphasis>object-param</emphasis> blocks and for each <emphasis>object-param</emphasis>, we expect any object definition of type <envar>ExoCacheCreator</envar>.
- </para>
- <para>
- In this example, we register the cache creator related to the eviction policy <emphasis>Test</emphasis>.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Add_a_cache_creator-The_cache_creators_available">
- <title>The cache creators available</title>
- <para>
- By default, no cache creator are defined, so you need to define them yourself by adding them in your configuration files.
- </para>
- <section id="sect-Reference_Guide-The_cache_creators_available-Generic_Cache_Creator">
- <title>Generic Cache Creator</title>
- <para>
- This is the generic cache creator that allows you to use any eviction strategies defined by default in Infinispan.
- </para>
-
-<programlisting language="XML" role="XML">..
-<object-param>
- <name>GENERIC</name>
- <description>The generic cache creator</description>
- <object type="org.exoplatform.services.cache.impl.infinispan.generic.GenericExoCacheCreator">
- <field name="implementations">
- <collection type="java.util.HashSet">
- <value>
- <string>NONE</string>
- </value>
- <value>
- <string>FIFO</string>
- </value>
- <value>
- <string>LRU</string>
- </value>
- <value>
- <string>UNORDERED</string>
- </value>
- <value>
- <string>LIRS</string>
- </value>
- </collection>
- </field>
- <field name="defaultStrategy"><string>${my-value}</string></field>
- <field name="defaultMaxIdle"><long>${my-value}</long></field>
- <field name="defaultWakeUpInterval"><long>${my-value}</long></field>
- </object>
-</object-param>
-...</programlisting>
- <table id="tabl-Reference_Guide-Generic_Cache_Creator-Fields_description">
- <title>Fields description</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- implementations
- </entry>
- <entry>
- This is the list of all the <emphasis>implementations</emphasis> supported by the cache creator. Actualy, it is a subset of the full list of the eviction strategies supported by infinispan to which you want to give access to. In the configuraton above, you have the full list of all the eviction strategies currently supported by infinispan 4.1. This field is used to manage the backward compatibility.
- </entry>
-
- </row>
- <row>
- <entry>
- defaultStrategy
- </entry>
- <entry>
- This is the name of the default eviction strategy to use. By default the value is <emphasis>LRU</emphasis>. This value is only use when we define a cache of this type with the old configuration.
- </entry>
-
- </row>
- <row>
- <entry>
- defaultMaxIdle
- </entry>
- <entry>
- This is the default value of the field <emphasis>maxIdle</emphasis> described in the section dedicated to this cache type. By default the value is <emphasis>-1</emphasis>.This value is only use when we define a cache of this type with the old configuration.
- </entry>
-
- </row>
- <row>
- <entry>
- defaultWakeUpInterval
- </entry>
- <entry>
- his is the default value of the field <emphasis>wakeUpInterval</emphasis> described in the section dedicated to this cache type. By default the value is <emphasis>5000</emphasis>.This value is only use when we define a cache of this type with the old configuration
- </entry>
-
- </row>
-
- </tbody>
-
- </tgroup>
-
- </table>
-
- </section>
-
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-eXo_Cache_based_on_Infinispan-Define_an_infinispan_cache_instance">
- <title>Define an infinispan cache instance</title>
- <section id="sect-Reference_Guide-Define_an_infinispan_cache_instance-How_to_define_a_distributed_or_a_local_cache">
- <title>How to define a distributed or a local cache?</title>
- <para>
- Actually, if you use a custom configuration for your cache as described in a previous section, we will use the cache mode define in your configuration file.
- </para>
- <para>
- In case, you decide to use the default configuration template, we use the field <emphasis>distributed</emphasis> of your <envar>ExoCacheConfig</envar> to decide. In other words, if the value of this field is false (the default value), the cache will be a local cache otherwise it will be the cache mode defined in your default configuration template that should be distributed.
- </para>
-
- </section>
-
- <section id="sect-Reference_Guide-Define_an_infinispan_cache_instance-How_to_define_an_infinispan_cache_instance">
- <title>How to define an infinispan cache instance</title>
- <para>
- All the eviction strategies proposed by default in infinispan rely on the generic cache creator.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- New configuration
- </para>
-
- </listitem>
-
- </itemizedlist>
-
-<programlisting language="XML" role="XML">...
- <object-param>
- <name>myCache</name>
- <description>My cache configuration</description>
- <object type="org.exoplatform.services.cache.impl.infinispan.generic.GenericExoCacheConfig">
- <field name="name"><string>myCacheName</string></field>
- <field name="strategy"><int>${my-value}</int></field>
- <field name="maxEntries"><long>${my-value}</long></field>
- <field name="lifespan"><long>${my-value}</long></field>
- <field name="maxIdle"><long>${my-value}</long></field>
- <field name="wakeUpInterval"><long>${my-value}</long></field>
- </object>
- </object-param>
-...</programlisting>
- <table id="tabl-Reference_Guide-How_to_define_an_infinispan_cache_instance-Fields_description-1">
- <title>Fields description</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- strategy
- </entry>
- <entry>
- The name of the strategy to use such as 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
- </entry>
-
- </row>
- <row>
- <entry>
- maxEntries
- </entry>
- <entry>
- Maximum number of entries in a cache instance. If selected value is not a power of two the actual value will default to the least power of two larger than selected value. -1 means no limit which is also the default value.
- </entry>
-
- </row>
- <row>
- <entry>
- lifespan
- </entry>
- <entry>
- Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire which is also the default value.
- </entry>
-
- </row>
- <row>
- <entry>
- maxIdle
- </entry>
- <entry>
- Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire which is also the default value.
- </entry>
-
- </row>
- <row>
- <entry>
- wakeUpInterval
- </entry>
- <entry>
- Interval between subsequent eviction runs, in milliseconds. If you wish to disable the periodic eviction process altogether, set wakeupInterval to -1. The default value is 5000.
- </entry>
-
- </row>
-
- </tbody>
-
- </tgroup>
-
- </table>
- <itemizedlist>
- <listitem>
- <para>
- Old configuration
- </para>
-
- </listitem>
-
- </itemizedlist>
-
-<programlisting language="XML" role="XML">...
- <object-param>
- <name>myCache</name>
- <description>My cache configuration</description>
- <field name="name"><string>lru-with-old-config</string></field>
- <field name="maxSize"><int>${my-value}</int></field>
- <field name="liveTime"><long>${my-value}</long></field>
- <field name="implementation"><string>${my-value}</string></field>
- </object>
- </object-param>
-...</programlisting>
- <table id="tabl-Reference_Guide-How_to_define_an_infinispan_cache_instance-Fields_description-2">
- <title>Fields description</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- maxSize
- </entry>
- <entry>
- Maximum number of entries in a cache instance. If selected value is not a power of two the actual value will default to the least power of two larger than selected value. -1 means no limit which is also the default value.
- </entry>
-
- </row>
- <row>
- <entry>
- liveTime
- </entry>
- <entry>
- Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire which is also the default value.
- </entry>
-
- </row>
- <row>
- <entry>
- implementation
- </entry>
- <entry>
- The name of the implementation to use the expected value is one of the eviction strategies defined in the field <emphasis>implementations</emphasis> of the generic cache creator.
- </entry>
-
- </row>
-
- </tbody>
-
- </tgroup>
-
- </table>
- <para>
- <note>
- <para>
- For the fields <emphasis>maxIdle</emphasis> and <emphasis>wakeUpInterval</emphasis> needed by infinispan, we will use the default values provided by the creator.
- </para>
-
- </note>
- </para>
-
- </section>
-
-
- </section>
-
-
- </section>
-
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/rpc-service.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -96,7 +96,7 @@
</para>
<note>
<para>
- We expect to have one <emphasis>RPCService</emphasis> instance per <emphasis>PortalContainer</emphasis> in a portal mode and only one <emphasis>RPCService</emphasis> instance in a standalone mode
+ We expect to have one <emphasis>RPCService</emphasis> instance per <emphasis>PortalContainer</emphasis> in a portal.
</para>
</note>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-for-beginners.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,568 +4,455 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Service_Configuration_for_Beginners">
- <title>Service Configuration for Beginners</title>
- <para>
- <emphasis role="bold">Related documents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />
- </para>
+ <title>Service Configuration for Beginners</title>
+ <para>
+ <emphasis role="bold">Related documents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Services_Wiring" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Services_Wiring" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Container_Configuration" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Container_Configuration" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Objective">
- <title>Objective</title>
- <para>
- We are going to talk about service configuration. You will learn about modes, services and containers, you will find out where the service configuration files have to be placed and you will also see the overriding mechanism of configurations. Finally you will understand how the container creates the services one after the other and what <emphasis>Inversion of Control</emphasis> really means.
- </para>
+ </itemizedlist>
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Objective">
+ <title>Objective</title>
+ <para>
+ We are going to talk about service configuration. You will learn about modes, services and containers, you will find out where the service configuration files have to be placed and you will also see the overriding mechanism of configurations. Finally you will understand how the container creates the services one after the other and what <emphasis>Inversion of Control</emphasis> really means.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Requirements">
- <title>Requirements</title>
- <para>
- By reading this article you are already glancing at the heart of eXo Kernel.
- </para>
- <para>
- Even you will read in this article to open the directory "exo-tomcat", you may have installed eXo Portal on any application server, just replace "exo-tomcat" by your folder name.
- </para>
- <note>
- <para>
- If you only installed the all-in-one package for the eXo Portal, the folder paths are a slightly different. You have to replace <emphasis>exo-tomcat</emphasis> by <emphasis>exo-eXoPortal-2.5.1-tomcat</emphasis> (obviously depending on your version). Furthermore the webapps are delivered as war files.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Requirements">
+ <title>Requirements</title>
+ <para>
+ By reading this article you are already glancing at the heart of eXo Kernel.
+ </para>
+ <para>
+ Even you will read in this article to open the directory "exo-tomcat", you may have installed eXo Portal on any application server, just replace "exo-tomcat" by your folder name.
+ </para>
+ <note>
+ <para>
+ If you only installed the all-in-one package for the eXo Portal, the folder paths are a slightly different. You have to replace <emphasis>exo-tomcat</emphasis> by <emphasis>exo-eXoPortal-2.5.1-tomcat</emphasis> (obviously depending on your version). Furthermore the webapps are delivered as war files.
+ </para>
- </note>
- <para>
- You certainly already discovered eXo's fisheye URL (eXo is open source!) - <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/">https://anonsvn.jboss.org/repos/exo-jcr/</ulink> - which allows you to surf in the source code of all classes, if you wish to do so.
- </para>
+ </note>
+ <para>
+ You certainly already discovered eXo's fisheye URL (eXo is open source!) - <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/">https://anonsvn.jboss.org/repos/exo-jcr/</ulink> - which allows you to surf in the source code of all classes, if you wish to do so.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Services">
- <title>Services</title>
- <para>
- Nearly everything could be considered a service! To get a better idea, let's look into the <emphasis>exo-tomcat/lib</emphasis> folder where you find all deployed jar files.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/eXoJCR/TomcatLibFolder.png" width="444" />
- </imageobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Services">
+ <title>Services</title>
+ <para>
+ Nearly everything could be considered a service! To get a better idea, let's look into the <emphasis>exo-tomcat/lib</emphasis> folder where you find all deployed jar files.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eXoJCR/TomcatLibFolder.png" width="444" />
+ </imageobject>
- </mediaobject>
- <para>
- For example you find services for databases, caching, ldap and ftp:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- exo.core.component.database-2.1.3.jar
- </para>
+ </mediaobject>
+ <para>
+ For example you find services for databases, caching, ldap and ftp:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ exo.core.component.database-2.1.3.jar
+ </para>
- </listitem>
- <listitem>
- <para>
- exo.kernel.component.cache-2.0.5.jar
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ exo.kernel.component.cache-2.0.5.jar
+ </para>
- </listitem>
- <listitem>
- <para>
- exo.core.component.organization.ldap-2.1.3.jar
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ exo.core.component.organization.ldap-2.1.3.jar
+ </para>
- </listitem>
- <listitem>
- <para>
- exo.jcr.component.ftp-1.10.1.jar
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ exo.jcr.component.ftp-1.10.1.jar
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Of course, there are many more services, in fact a lot of these jar files are services. To find out you have to open the jar file and then look into its <emphasis>/conf</emphasis> or <emphasis>/conf/portal</emphasis> directory. Only if there is a file named <emphasis>configuration.xml</emphasis>, you are sure to have found a service.
- </para>
- <note>
- <para>
- Why are there 2 different places to look for the configuration.xml? Because the <emphasis>/conf</emphasis> directory is used by the <classname>RootContainer</classname> and the /<emphasis>conf/portal</emphasis> directory is used by the <classname>PortalContainer</classname>. Later you will see more details about these containers.
- </para>
+ </itemizedlist>
+ <para>
+ Of course, there are many more services, in fact a lot of these jar files are services. To find out you have to open the jar file and then look into its <emphasis>/conf</emphasis> or <emphasis>/conf/portal</emphasis> directory. Only if there is a file named <emphasis>configuration.xml</emphasis>, you are sure to have found a service.
+ </para>
+ <note>
+ <para>
+ Why are there 2 different places to look for the configuration.xml? Because the <emphasis>/conf</emphasis> directory is used by the <classname>RootContainer</classname> and the /<emphasis>conf/portal</emphasis> directory is used by the <classname>PortalContainer</classname>. Later you will see more details about these containers.
+ </para>
- </note>
- <para>
- <emphasis role="bold">Interface - Implementation</emphasis> It's important to get the idea that you separate the interface and implementation for a service. That is a good concept to reduce dependencies on specific implementations. This concept is well known for JDBC. If you use standard JDBC (=interface), you can connect any database (=implementation) to your application. In a similar way any service in eXo is defined by a java interface and may have many different implementations. The service implementation is then <emphasis>injected</emphasis> by a <emphasis>container</emphasis> into the application.
- </para>
- <para>
- <emphasis role="bold">Singleton</emphasis> Each service has to be implemented as a <ulink url="http://en.wikipedia.org/wiki/Singleton_pattern">singleton</ulink>, which means that each service is created only once - in one single instance.
- </para>
- <para>
- <emphasis role="bold">Service = Component</emphasis> You always read about services, and you imagine a service as a large application which does big things, but that's not true, a service can be just a little <emphasis>component</emphasis> that reads or transforms a document, therefore the term component is often used instead of service - so bear in mind: <emphasis>a service and a component can safely be considered to be the same thing</emphasis>.
- </para>
+ </note>
+ <para>
+ <emphasis role="bold">Interface - Implementation</emphasis> It's important to get the idea that you separate the interface and implementation for a service. That is a good concept to reduce dependencies on specific implementations. This concept is well known for JDBC. If you use standard JDBC (=interface), you can connect any database (=implementation) to your application. In a similar way any service in eXo is defined by a java interface and may have many different implementations. The service implementation is then <emphasis>injected</emphasis> by a <emphasis>container</emphasis> into the application.
+ </para>
+ <para>
+ <emphasis role="bold">Singleton</emphasis> Each service has to be implemented as a <ulink url="http://en.wikipedia.org/wiki/Singleton_pattern">singleton</ulink>, which means that each service is created only once - in one single instance.
+ </para>
+ <para>
+ <emphasis role="bold">Service = Component</emphasis> You always read about services, and you imagine a service as a large application which does big things, but that's not true, a service can be just a little <emphasis>component</emphasis> that reads or transforms a document, therefore the term component is often used instead of service - so bear in mind: <emphasis>a service and a component can safely be considered to be the same thing</emphasis>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Configuration_File">
- <title>Configuration File</title>
- <para>
- The jar file of a service should contain a default configuration, you find this configuration in the configuration.xml file which comes with the jar. A configuration file can specify several services, as well as there can be several services in one jar file.
- </para>
- <para>
- For example open the <package>exo.kernel.component.cache-2.0.5.jar</package> file and inside this jar open /conf/portal/configuration.xml. You will see:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Configuration_File">
+ <title>Configuration File</title>
+ <para>
+ The jar file of a service should contain a default configuration, you find this configuration in the configuration.xml file which comes with the jar. A configuration file can specify several services, as well as there can be several services in one jar file.
+ </para>
+ <para>
+ For example open the <package>exo.kernel.component.cache-2.0.5.jar</package> file and inside this jar open /conf/portal/configuration.xml. You will see:
+ </para>
+
<programlisting language="XML" role="XML">
<component>
<key>org.exoplatform.services.cache.CacheService</key>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
...</programlisting>
- <para>
- Here you will note that a service is specified between the <parameter><component></parameter> tags. Each service has got a key, which defines the kind of service. As you imagine the content of the <parameter><key></parameter> tag matches the <emphasis>qualified java interface name</emphasis> (<classname>org.exoplatform.services.cache.CacheService</classname>) of the service. The specific implementation class of the <classname>CacheService</classname> is defined in the <parameter><type></parameter> tag.
- </para>
- <para>
- <emphasis role="bold">Parameters</emphasis> You have already opened some configuration files and seen that there are more than just <parameter><key></parameter> and <parameter><type></parameter> tags. You can provide your service with init parameters. The parameters can be simple parameters, properties, or object-params. There are also <emphasis>plugins</emphasis> and they are special because the container calls the setters of your service in order to <emphasis>inject</emphasis> your plugin in your service (called <emphasis>setter injection</emphasis>) see <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />. In general your service is free to use init parameters, they are not required.
- </para>
- <para>
- If you ever need to create your own service, the minimum is to create an empty interface, an empty class and a constructor for your class - that's all. Ok, you also should put your class and the interface in a jar file and add a default configuration file.
- </para>
+ <para>
+ Here you will note that a service is specified between the <parameter><component></parameter> tags. Each service has got a key, which defines the kind of service. As you imagine the content of the <parameter><key></parameter> tag matches the <emphasis>qualified java interface name</emphasis> (<classname>org.exoplatform.services.cache.CacheService</classname>) of the service. The specific implementation class of the <classname>CacheService</classname> is defined in the <parameter><type></parameter> tag.
+ </para>
+ <para>
+ <emphasis role="bold">Parameters</emphasis> You have already opened some configuration files and seen that there are more than just <parameter><key></parameter> and <parameter><type></parameter> tags. You can provide your service with init parameters. The parameters can be simple parameters, properties, or object-params. There are also <emphasis>plugins</emphasis> and they are special because the container calls the setters of your service in order to <emphasis>inject</emphasis> your plugin in your service (called <emphasis>setter injection</emphasis>) see <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />. In general your service is free to use init parameters, they are not required.
+ </para>
+ <para>
+ If you ever need to create your own service, the minimum is to create an empty interface, an empty class and a constructor for your class - that's all. Ok, you also should put your class and the interface in a jar file and add a default configuration file.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Execution_Modes">
- <title>Execution Modes</title>
- <para>
- One important thing to understand concerns execution modes. There are only two modes:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Portal mode: The service runs embedded in the eXo Portal. In this mode a <classname>PortalContainer</classname> is used.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Execution_Modes">
+ <title>Execution Modes</title>
+ <para>
+ One important thing to understand concerns execution modes. There are only two modes:
+ </para>
- </listitem>
- <listitem>
- <para>
- Standalone mode: The service runs without the portal. For example, the JCR service can run standalone, and also the eXo Portlet Container. This mode is used by eXo developers for unit tests. As the name suggests a <classname>StandaloneContainer</classname> is used.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Containers">
+ <title>Containers</title>
+ <para>
+ In order to access to a service you need to use a Container. Just open <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...">https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...</ulink>.
+ </para>
+ <para>
+ Among the classes you see in this directory, you only will be interested in these two container types:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ RootContainer: This is a base container. This container plays an important role during startup, but you should not use it directly.
+ </para>
- </listitem>
+ </listitem>
+ <listitem>
+ <para>
+ PortalContainer: Created at the startup of the portal web application (in the init() method of the PortalController servlet)
+ </para>
- </itemizedlist>
-
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Containers">
- <title>Containers</title>
- <para>
- In order to access to a service you need to use a Container. Just open <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...">https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...</ulink>.
- </para>
- <para>
- Among the classes you see in this directory, you only will be interested in these three container types:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- RootContainer: This is a base container. This container plays an important role during startup, but you should not use it directly.
- </para>
-
- </listitem>
- <listitem>
- <para>
- PortalContainer: Created at the startup of the portal web application (in the init() method of the PortalController servlet)
- </para>
-
- </listitem>
- <listitem>
- <para>
- StandaloneContainer: A context independent eXo Container. The <classname>StandaloneContainer</classname> is also used for unit tests.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- <emphasis role="bold">Use only one container</emphasis> Even if there are several container types you always use exactly one. The RootContainer is never directly used and it depends on the execution mode if you use the PortalContainer or the StandaloneContainer. You will ask how to find out the execution mode in my application and how to manage these two modes. It's easy, you don't have to worry about it because the ExoContainerContext class provides a static method that allows you to get the right container from anywhere (see info box).
- </para>
- <para>
- <emphasis role="bold">PicoContainer</emphasis> All containers inherit from the ExoContainer class which itself inherits from a <classname>PicoContainer</classname>. <ulink url="http://www.picocontainer.org/">PicoContainer</ulink> is a framework which allows eXo to apply the IoC (<xref linkend="sect-Reference_Guide-Inversion_Of_Control" />) principles. The precise implementations of any service is unknown at compile time. Various implementations can be used, eXo supplies different implementations but they also may be delivered by other vendors. The decision which service to use during runtime is made in configuration files.
- </para>
- <para>
- These configuration files are read by the container, the container adds all services to a list or more exactly a java HashTable. It's completely correct to suppose that the configuration.xml you already saw plays an important role. But there are more places where a configuration for a service can be defined as you see in the next section.
- </para>
- <note>
- <para>
- "In your java code you have to use
- </para>
-
+ </listitem>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">Use only one container</emphasis> Even if there are several container types you always use exactly one. The RootContainer is never directly used and it depends on the execution mode if you use the PortalContainer. You will ask how to find out the execution mode in my application and how to manage these two modes. It's easy, you don't have to worry about it because the ExoContainerContext class provides a static method that allows you to get the right container from anywhere (see info box).
+ </para>
+ <para>
+ <emphasis role="bold">PicoContainer</emphasis> All containers inherit from the ExoContainer class which itself inherits from a <classname>PicoContainer</classname>. <ulink url="http://www.picocontainer.org/">PicoContainer</ulink> is a framework which allows eXo to apply the IoC (<xref linkend="sect-Reference_Guide-Inversion_Of_Control" />) principles. The precise implementations of any service is unknown at compile time. Various implementations can be used, eXo supplies different implementations but they also may be delivered by other vendors. The decision which service to use during runtime is made in configuration files.
+ </para>
+ <para>
+ These configuration files are read by the container, the container adds all services to a list or more exactly a java HashTable. It's completely correct to suppose that the configuration.xml you already saw plays an important role. But there are more places where a configuration for a service can be defined as you see in the next section.
+ </para>
+ <note>
+ <para>
+ "In your java code you have to use
+ </para>
+
<programlisting language="Java" role="Java">ExoContainer myContainer = ExoContainerContext.getCurrentContainer();</programlisting>
- <para>
- in order to access to the current container. It doesn't greatly matter to your application if the current container is a <classname>PortalContainer</classname> or a <classname>StandaloneContainer</classname>. Once you have your container you may access to any service registered in this container using
- </para>
-
+ <para>
+ in order to access to the current container. Once you have your container you may access to any service registered in this container using
+ </para>
+
<programlisting language="Java" role="Java">MyService myService = (MyService) myContainer.getComponentInstance(MyService.class);</programlisting>
- <para>
- You easily realize that <classname>MyService.class</classname> is the name of the service interface.
- </para>
+ <para>
+ You easily realize that <classname>MyService.class</classname> is the name of the service interface.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Configuration_Retrieval">
- <title>Configuration Retrieval</title>
- <para>
- The configuration you find inside the jar file is considered as the default configuration. If you want to override this default configuration you can do it in different places outside the jar. When the container finds several configurations for the same service, the configuration which is found later replaces completely the one found previously. Let's call this the <emphasis>configuration override mechanism</emphasis>.
- </para>
- <section id="sect-Reference_Guide-Configuration_Retrieval-RootContainer">
- <title>RootContainer</title>
- <para>
- As both containers, PortalContainer and StandaloneContainer, depend on the RootContainer, we will start by looking into this one.
- </para>
- <para>
- The retrieval sequence in short:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Services default <classname>RootContainer</classname> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Configuration_Retrieval">
+ <title>Configuration Retrieval</title>
+ <para>
+ The configuration you find inside the jar file is considered as the default configuration. If you want to override this default configuration you can do it in different places outside the jar. When the container finds several configurations for the same service, the configuration which is found later replaces completely the one found previously. Let's call this the <emphasis>configuration override mechanism</emphasis>.
+ </para>
+ <section id="sect-Reference_Guide-Configuration_Retrieval-RootContainer">
+ <title>RootContainer</title>
+ <para>
+ As PortalContainer depends on the RootContainer, we will start by looking into this one.
+ </para>
+ <para>
+ The retrieval sequence in short:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Services default <classname>RootContainer</classname> configurations from JAR files <emphasis>/conf/configuration.xml</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- External <classname>RootContainer</classname> configuration, to be found at <emphasis>exo-tomcat/exo-conf/configuration.xml</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ External <classname>RootContainer</classname> configuration, to be found at <emphasis>exo-tomcat/exo-conf/configuration.xml</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- <note>
- <para>
- Naturally you always have to replace <parameter>exo-tomcat</parameter> by your own folder name. In case of a Java Standalone application you have to use the <parameter>user.dir</parameter> JVM system property value.
- </para>
+ </orderedlist>
+ <note>
+ <para>
+ Naturally you always have to replace <parameter>exo-tomcat</parameter> by your own folder name.
+ </para>
- </note>
- <para>
- <emphasis role="bold">HashTable</emphasis> The <classname>RootContainer</classname> creates a java <classname>HashTable</classname> which contains key-value pairs for the services. The qualified interface name of each service is used as key for the hashtable. Hopefully you still remember that the <parameter><key></parameter> tag of the configuration file contains the interface name? The value of each hashtable pair is an object that contains the service configuration (yes, this means the whole structure between the <parameter><component></parameter> tags of your <filename>configuration.xml</filename> file).
- </para>
- <para>
- The <classname>RootContainer</classname> runs over all jar files you find in <emphasis>exo-tomcat/lib</emphasis> and looks if there is a configuration file at <emphasis>/conf/configuration.xml</emphasis>, the services configured in this file are added to the hashtable. That way - at the end of this process - the default configurations for all services are stored in the hashtable.
- </para>
- <note>
- <para>
- What happens if the same service - recognized by the same qualified interface name - is configured in different jars? As the service only can exist one time the configuration of the jar found later overrides the previous configuration. You know that the loading <emphasis role="bold">order of the jars is unpredictable</emphasis> you <emphasis role="bold">must not depend on this</emphasis>.
- </para>
+ </note>
+ <para>
+ <emphasis role="bold">HashTable</emphasis> The <classname>RootContainer</classname> creates a java <classname>HashTable</classname> which contains key-value pairs for the services. The qualified interface name of each service is used as key for the hashtable. Hopefully you still remember that the <parameter><key></parameter> tag of the configuration file contains the interface name? The value of each hashtable pair is an object that contains the service configuration (yes, this means the whole structure between the <parameter><component></parameter> tags of your <filename>configuration.xml</filename> file).
+ </para>
+ <para>
+ The <classname>RootContainer</classname> runs over all jar files you find in <emphasis>exo-tomcat/lib</emphasis> and looks if there is a configuration file at <emphasis>/conf/configuration.xml</emphasis>, the services configured in this file are added to the hashtable. That way - at the end of this process - the default configurations for all services are stored in the hashtable.
+ </para>
+ <note>
+ <para>
+ What happens if the same service - recognized by the same qualified interface name - is configured in different jars? As the service only can exist one time the configuration of the jar found later overrides the previous configuration. You know that the loading <emphasis role="bold">order of the jars is unpredictable</emphasis> you <emphasis role="bold">must not depend on this</emphasis>.
+ </para>
- </note>
- <para>
- If you wish to provide your own configurations for one or several services, you can do it in a general configuration file that has to be placed at <emphasis>exo-tomcat/exo-conf/configuration.xml</emphasis>. Do not search for such a file on your computer - you won't find one, because this option is not used in the default installation. Here again the same rule applies: <emphasis>The posterior configuration replaces the previous one</emphasis>.
- </para>
- <para>
- The further configuration retrieval depends on the container type.
- </para>
+ </note>
+ <para>
+ If you wish to provide your own configurations for one or several services, you can do it in a general configuration file that has to be placed at <emphasis>exo-tomcat/exo-conf/configuration.xml</emphasis>. Do not search for such a file on your computer - you won't find one, because this option is not used in the default installation. Here again the same rule applies: <emphasis>The posterior configuration replaces the previous one</emphasis>.
+ </para>
+ <para>
+ The further configuration retrieval depends on the container type.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-PortalContainer">
- <title>PortalContainer</title>
- <para>
- The PortalContainer takes the hashtable filled by the RootContainer and continues to look in some more places. Here you get the opportunity to replace RootContainer configurations by those which are specific to your portal. Again, the configurations are overridden whenever necessary.
- </para>
- <para>
- In short PortalContainer configurations are retrieved in the following lookup sequence :
- </para>
- <orderedlist>
- <listitem>
- <para>
- Take over the configurations of the RootContainer
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration_Retrieval-PortalContainer">
+ <title>PortalContainer</title>
+ <para>
+ The PortalContainer takes the hashtable filled by the RootContainer and continues to look in some more places. Here you get the opportunity to replace RootContainer configurations by those which are specific to your portal. Again, the configurations are overridden whenever necessary.
+ </para>
+ <para>
+ In short PortalContainer configurations are retrieved in the following lookup sequence :
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Take over the configurations of the RootContainer
+ </para>
- </listitem>
- <listitem>
- <para>
- Default PortalContainer configurations from all JAR files (folder <emphasis>/conf/portal/configuration.xml</emphasis>)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Default PortalContainer configurations from all JAR files (folder <emphasis>/conf/portal/configuration.xml</emphasis>)
+ </para>
- </listitem>
- <listitem>
- <para>
- Web application configurations from the portal.war file - or the <emphasis>portal</emphasis> weppapp (folder <emphasis>/WEB-INF/conf/configuration.xml</emphasis>)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Web application configurations from the portal.war file - or the <emphasis>portal</emphasis> weppapp (folder <emphasis>/WEB-INF/conf/configuration.xml</emphasis>)
+ </para>
- </listitem>
- <listitem>
- <para>
- External configuration for services of a named portal, it will be found at <emphasis>exo-tomcat/exo-conf/portal/$portal_name/configuration.xml</emphasis> (as of Portal 2.5)
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ External configuration for services of a named portal, it will be found at <emphasis>exo-tomcat/exo-conf/portal/$portal_name/configuration.xml</emphasis> (as of Portal 2.5)
+ </para>
- </listitem>
+ </listitem>
- </orderedlist>
- <para>
- You see, here the <emphasis>/conf/portal/configuration.xml</emphasis> file of each jar enters the game, they are searched at first. Next, there is nearly always a configuration.xml in the portal.war file (or in the portal webapp folder), you find this file at <emphasis>/WEB-INF/conf/configuration.xml</emphasis>. If you open it, you will find a lot of import statements that point to other configuration files in the same portal.war (or portal webapp).
- </para>
- <para>
- <emphasis role="bold">Multiple Portals</emphasis> Be aware that you might set up several different portals ("admin", "mexico", etc.), and each of these portals will use a different PortalContainer. And each of these PortalContainers can be configured separately. As of eXo Portal 2.5 you also will be able to provide configurations from outside the jars and wars or webapps. Put a configuration file in <emphasis>exo-tomcat/exo-conf/portal/$portal_name/configuration.xml</emphasis> where <parameter>$portal_name</parameter> is the name of the portal you want to configure for . But normally you only have one portal which is called "portal" so you use <emphasis>exo-tomcat/exo-conf/portal/portal/configuration.xml</emphasis>.
- </para>
- <note>
- <para>
- As of eXo Portal 2.5 you can override the external configuration location with the system property <emphasis>exo.conf.dir</emphasis>. If the property exists its value will be used as path to the eXo configuration directory, that means this is an alternative to <emphasis>exo-tomcat/exo-conf</emphasis>. Just put this property in the command line: <emphasis>java -Dexo.conf.dir=/path/to/exo/conf</emphasis> or use eXo.bat or eXo.sh. In this particular use case, you have no need to use any prefixes in your configuration file to import other files. For example, if your configuration file is <emphasis>exo-tomcat/exo-conf/portal/PORTAL_NAME/configuration.xml</emphasis> and you want to import the configuration file <emphasis>exo-tomcat/exo-conf/portal/PORTAL_NAME/mySubConfDir/myConfig.xml</emphasis>, you can do it by adding <emphasis><import>mySubConfDir/myConfig.xml</import></emphasis> to your configuration file.
- </para>
+ </orderedlist>
+ <para>
+ You see, here the <emphasis>/conf/portal/configuration.xml</emphasis> file of each jar enters the game, they are searched at first. Next, there is nearly always a configuration.xml in the portal.war file (or in the portal webapp folder), you find this file at <emphasis>/WEB-INF/conf/configuration.xml</emphasis>. If you open it, you will find a lot of import statements that point to other configuration files in the same portal.war (or portal webapp).
+ </para>
+ <para>
+ <emphasis role="bold">Multiple Portals</emphasis> Be aware that you might set up several different portals ("admin", "mexico", etc.), and each of these portals will use a different PortalContainer. And each of these PortalContainers can be configured separately. As of eXo Portal 2.5 you also will be able to provide configurations from outside the jars and wars or webapps. Put a configuration file in <emphasis>exo-tomcat/exo-conf/portal/$portal_name/configuration.xml</emphasis> where <parameter>$portal_name</parameter> is the name of the portal you want to configure for . But normally you only have one portal which is called "portal" so you use <emphasis>exo-tomcat/exo-conf/portal/portal/configuration.xml</emphasis>.
+ </para>
+ <note>
+ <para>
+ As of eXo Portal 2.5 you can override the external configuration location with the system property <emphasis>exo.conf.dir</emphasis>. If the property exists its value will be used as path to the eXo configuration directory, that means this is an alternative to <emphasis>exo-tomcat/exo-conf</emphasis>. Just put this property in the command line: <emphasis>java -Dexo.conf.dir=/path/to/exo/conf</emphasis> or use eXo.bat or eXo.sh. In this particular use case, you have no need to use any prefixes in your configuration file to import other files. For example, if your configuration file is <emphasis>exo-tomcat/exo-conf/portal/PORTAL_NAME/configuration.xml</emphasis> and you want to import the configuration file <emphasis>exo-tomcat/exo-conf/portal/PORTAL_NAME/mySubConfDir/myConfig.xml</emphasis>, you can do it by adding <emphasis><import>mySubConfDir/myConfig.xml</import></emphasis> to your configuration file.
+ </para>
- </note>
- <note>
- <para>
- Under <emphasis role="bold">JBoss</emphasis> application server <emphasis>exo-conf</emphasis> will be looked up in directory described by JBoss System property <emphasis>jboss.server.config.url</emphasis>. If the property is not found or empty <emphasis>exo-jboss/exo-conf</emphasis> will be asked (since kernel 2.0.4).
- </para>
+ </note>
+ <note>
+ <para>
+ Under <emphasis role="bold">JBoss</emphasis> application server <emphasis>exo-conf</emphasis> will be looked up in directory described by JBoss System property <emphasis>jboss.server.config.url</emphasis>. If the property is not found or empty <emphasis>exo-jboss/exo-conf</emphasis> will be asked (since kernel 2.0.4).
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Configuration_Retrieval-StandaloneContainer">
- <title>StandaloneContainer</title>
- <para>
- In the same way as the PortalContainer the StandaloneContainer <emphasis>takes over the configuration of the RootContainer</emphasis>. After that our configuration gets a little bit more tricky because standalone containers can be initialized using an URL. This URL contains a link to an external configuration. As you probably never need a standalone configuration you can safely jump over the remaining confusing words of this section.
- </para>
- <para>
- After taking over RootContainer's configuration, there are three cases which depend on the URL initialization, :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">Independent configuration by URL</emphasis> No other configuration file is taken in consideration. The configuration provided by the URL is used without any default configs. That means that the container creates a new empty hashtable and not any bit of previous configuration is used. Apply the following code to do this:
- </para>
-
-<programlisting language="Java" role="Java">StandaloneContainer.setConfigurationURL(containerConf);</programlisting>
-
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">Additional configuration by URL</emphasis> The StandaloneContainer is initialized very similar to the PortalContainer, but the last step is slightly different. A configuration file that is provided by the URL is used to replace some of the service configurations.The code looks like this:
- </para>
-
-<programlisting language="Java" role="Java">StandaloneContainer.addConfigurationURL(containerConf);</programlisting>
- <orderedlist>
- <listitem>
- <para>
- Take over the configurations of the RootContainer
- </para>
-
- </listitem>
- <listitem>
- <para>
- Default <emphasis>StandaloneContainer</emphasis> configurations from JAR files (folder <emphasis>/conf/portal/configuration.xml</emphasis>)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Web application configurations from WAR files (folder <emphasis>/WEB-INF/conf/configuration.xml</emphasis>)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Configuration from added URL <emphasis>containerConf</emphasis> overrides only services configured in the file
- </para>
-
- </listitem>
-
- </orderedlist>
-
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">File based configuration</emphasis> No URL is involved, in this case the sequence is:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Take over the configurations of the RootContainer
- </para>
-
- </listitem>
- <listitem>
- <para>
- Default <emphasis>StandaloneContainer</emphasis> configurations from JAR files (folder <emphasis>/conf/portal/configuration.xml</emphasis>)
- </para>
-
- </listitem>
- <listitem>
- <para>
- Web applications configurations from WAR files (folder <emphasis>/WEB-INF/conf/configuration.xml</emphasis>)
- </para>
-
- </listitem>
- <listitem>
- <para>
- External configuration for <emphasis>StandaloneContainer</emphasis> services, it will be found at <emphasis>$user_home/exo-configuration.xml</emphasis>. If <emphasis>$user_home/exo-configuration.xml</emphasis> doesn't exist and the <emphasis>StandaloneContainer</emphasis> instance obtained with the dedicated configuration classloader the container will try to retrieve the resource <emphasis>conf/exo-configuration.xml</emphasis> within the given classloader (user_home is your home directory like "C:/Documents and Settings/Smith").
- </para>
-
- </listitem>
-
- </orderedlist>
-
- </listitem>
-
- </itemizedlist>
-
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Service_instantiation">
- <title>Service instantiation</title>
- <para>
- As you have already learned the services are all singletons, so that the container creates only one single instance of each container. The services are created by calling the constructors (called <emphasis>constructor injection</emphasis>). If there are only zero-arguments constructors (<code>Foo public Foo(){}</code>) there are no problems to be expected. That's easy.
- </para>
- <para>
- But now look at <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/core/trunk/exo.core.component.org...">https://anonsvn.jboss.org/repos/exo-jcr/core/trunk/exo.core.component.org...</ulink>
- </para>
- <para>
- This JDBC implementation of BaseOrganizationService interface has only one constructor:
- </para>
-
+ </section>
+
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Service_instantiation">
+ <title>Service instantiation</title>
+ <para>
+ As you have already learned the services are all singletons, so that the container creates only one single instance of each container. The services are created by calling the constructors (called <emphasis>constructor injection</emphasis>). If there are only zero-arguments constructors (<code>Foo public Foo(){}</code>) there are no problems to be expected. That's easy.
+ </para>
+ <para>
+ But now look at <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/core/trunk/exo.core.component.org...">https://anonsvn.jboss.org/repos/exo-jcr/core/trunk/exo.core.component.org...</ulink>
+ </para>
+ <para>
+ This JDBC implementation of BaseOrganizationService interface has only one constructor:
+ </para>
+
<programlisting language="Java" role="Java">public OrganizationServiceImpl(ListenerService listenerService, DatabaseService dbService);</programlisting>
- <para>
- You see this service depends on two other services. In order to be able to call this constructor the container first needs a <classname>ListenerService</classname> and a <classname>DatabaseService</classname>. Therefore these services must be instantiated before <classname>BaseOrganizationService</classname>, because <classname>BaseOrganizationService</classname> depends on them.
- </para>
- <para>
- For this purpose the container first looks at the constructors of all services and creates a matrix of service dependencies in order to call the services in a proper order. If for any reason there are interdependencies or circular dependencies you will get a java <classname>Exception</classname>. <emphasis>In this way the dependencies are injected by the container</emphasis>.
- </para>
- <note>
- <para>
- What happens if one service has more than one constructor? The container always tries first to use the constructor with a maximum of arguments, if this is not possible the container continues step by step with constructors that have less arguments until arriving at the zero-argument constructor (if there is one).
- </para>
+ <para>
+ You see this service depends on two other services. In order to be able to call this constructor the container first needs a <classname>ListenerService</classname> and a <classname>DatabaseService</classname>. Therefore these services must be instantiated before <classname>BaseOrganizationService</classname>, because <classname>BaseOrganizationService</classname> depends on them.
+ </para>
+ <para>
+ For this purpose the container first looks at the constructors of all services and creates a matrix of service dependencies in order to call the services in a proper order. If for any reason there are interdependencies or circular dependencies you will get a java <classname>Exception</classname>. <emphasis>In this way the dependencies are injected by the container</emphasis>.
+ </para>
+ <note>
+ <para>
+ What happens if one service has more than one constructor? The container always tries first to use the constructor with a maximum of arguments, if this is not possible the container continues step by step with constructors that have less arguments until arriving at the zero-argument constructor (if there is one).
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Miscellaneous">
- <title>Miscellaneous</title>
- <section id="sect-Reference_Guide-Miscellaneous-Startable_interface">
- <title>Startable interface</title>
- <para>
- Your service can implement the <emphasis>startable</emphasis> interface which defines a <emphasis>start()</emphasis> and a <emphasis>stop()</emphasis> method. These methods are called by the container at the beginning and the end of the container's lifecycle. This way the lifecycle of your service is managed by the container.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Miscellaneous">
+ <title>Miscellaneous</title>
+ <section id="sect-Reference_Guide-Miscellaneous-Startable_interface">
+ <title>Startable interface</title>
+ <para>
+ Your service can implement the <emphasis>startable</emphasis> interface which defines a <emphasis>start()</emphasis> and a <emphasis>stop()</emphasis> method. These methods are called by the container at the beginning and the end of the container's lifecycle. This way the lifecycle of your service is managed by the container.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Miscellaneous-Inversion_of_Control">
- <title>Inversion of Control</title>
- <para>
- <emphasis role="bold">Retrospection</emphasis> Do you remember your last project where you had some small components and several larger services? How was this organized? Some services had their own configuration files, others had static values in the source code. Most components were probably tightly coupled to the main application, or you called static methods whenever you needed a service in your java class. Presumably you even copied the source code of an earlier project in order to adapt the implementation to your needs. In short:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Each of your service had a proprietary configuration mechanism.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Miscellaneous-Inversion_of_Control">
+ <title>Inversion of Control</title>
+ <para>
+ <emphasis role="bold">Retrospection</emphasis> Do you remember your last project where you had some small components and several larger services? How was this organized? Some services had their own configuration files, others had static values in the source code. Most components were probably tightly coupled to the main application, or you called static methods whenever you needed a service in your java class. Presumably you even copied the source code of an earlier project in order to adapt the implementation to your needs. In short:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Each of your service had a proprietary configuration mechanism.
+ </para>
- </listitem>
- <listitem>
- <para>
- The service lifecycles were managed inside of each service or were arbitrary.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The service lifecycles were managed inside of each service or were arbitrary.
+ </para>
- </listitem>
- <listitem>
- <para>
- The dependencies between your services were implementation-dependent and tightly coupled in your source code.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The dependencies between your services were implementation-dependent and tightly coupled in your source code.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">New Approach</emphasis> You have seen that eXo uses the <emphasis>Inversion of Control</emphasis> (IoC) pattern which means that the control of the services is given to an independent outside entity, in this case a <emphasis>container</emphasis>. Now the container takes care of everything:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <emphasis>configuration is injected</emphasis> by external configuration files.
- </para>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">New Approach</emphasis> You have seen that eXo uses the <emphasis>Inversion of Control</emphasis> (IoC) pattern which means that the control of the services is given to an independent outside entity, in this case a <emphasis>container</emphasis>. Now the container takes care of everything:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <emphasis>configuration is injected</emphasis> by external configuration files.
+ </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis>lifecycle is managed from outside</emphasis>, because the constructors are called by the container. You can achieve an even finer lifecycle management if you use the startable interface.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <emphasis>lifecycle is managed from outside</emphasis>, because the constructors are called by the container. You can achieve an even finer lifecycle management if you use the startable interface.
+ </para>
- </listitem>
- <listitem>
- <para>
- The <emphasis>dependencies are injected</emphasis> by the service instantiation process.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <emphasis>dependencies are injected</emphasis> by the service instantiation process.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Dependency Injection</emphasis> You also saw two types of dependency injections:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Constructor injection: The constructor is called by the container.
- </para>
+ </itemizedlist>
+ <para>
+ <emphasis role="bold">Dependency Injection</emphasis> You also saw two types of dependency injections:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Constructor injection: The constructor is called by the container.
+ </para>
- </listitem>
- <listitem>
- <para>
- Setter injection: Whenever you use <emphasis>external-plugins</emphasis> to provide your service with plugins (see <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ Setter injection: Whenever you use <emphasis>external-plugins</emphasis> to provide your service with plugins (see <xref linkend="sect-Reference_Guide-Service_Configuration_in_Detail" />.
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
+ </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Miscellaneous-More_Containers">
- <title>More Containers</title>
- <para>
- There are two more Containers called <classname>RepositoryContainer</classname> and <classname>WorkspaceContainer</classname>. These are specificities of eXo JCR, for the sake of simplicity. You don't need them.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Miscellaneous-More_Containers">
+ <title>More Containers</title>
+ <para>
+ There are two more Containers called <classname>RepositoryContainer</classname> and <classname>WorkspaceContainer</classname>. These are specificities of eXo JCR, for the sake of simplicity. You don't need them.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Miscellaneous-Single_Implementation_Services">
- <title>Single Implementation Services</title>
- <para>
- In some case the developer of a service does not expect that there will be several implementations for his service. Therefore he does not create an interface. In this case the configuration looks like this:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Miscellaneous-Single_Implementation_Services">
+ <title>Single Implementation Services</title>
+ <para>
+ In some case the developer of a service does not expect that there will be several implementations for his service. Therefore he does not create an interface. In this case the configuration looks like this:
+ </para>
+
<programlisting language="XML" role="XML"><key>org.exoplatform.services.database.jdbc.DBSchemaCreator</key>
<type>org.exoplatform.services.database.jdbc.DBSchemaCreator</type></programlisting>
- <para>
- The key and type tags contain equally the qualified class name.
- </para>
+ <para>
+ The key and type tags contain equally the qualified class name.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Miscellaneous-Configuration_properties">
- <title>Configuration properties</title>
- <para>
- Since kernel 2.0.7 and 2.1, it is possible to use system properties in literal values of component configuration meta data. Thus it is possible to resolve properties at runtime instead of providing a value at packaging time.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Miscellaneous-Configuration_properties">
+ <title>Configuration properties</title>
+ <para>
+ Since kernel 2.0.7 and 2.1, it is possible to use system properties in literal values of component configuration meta data. Thus it is possible to resolve properties at runtime instead of providing a value at packaging time.
+ </para>
+
<programlisting language="XML" role="XML"><component>
...
<init-params>
@@ -590,19 +477,19 @@
</init-params>
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Miscellaneous-Configuration_Logging">
- <title>Configuration Logging</title>
- <para>
- In case you need to solve problems with your service configuration, you have to know from which JAR/WAR causes your troubles. Add the JVM system property <parameter>org.exoplatform.container.configuration.debug</parameter> to your eXo.bat or eXo.sh file (exo-tomcat/bin/).
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Miscellaneous-Configuration_Logging">
+ <title>Configuration Logging</title>
+ <para>
+ In case you need to solve problems with your service configuration, you have to know from which JAR/WAR causes your troubles. Add the JVM system property <parameter>org.exoplatform.container.configuration.debug</parameter> to your eXo.bat or eXo.sh file (exo-tomcat/bin/).
+ </para>
+
<programlisting>set EXO_CONFIG_OPTS="-Dorg.exoplatform.container.configuration.debug"</programlisting>
- <para>
- If this property is set the container configuration manager reports during startup the configuration retrieval process to the standard output (System.out).
- </para>
-
+ <para>
+ If this property is set the container configuration manager reports during startup the configuration retrieval process to the standard output (System.out).
+ </para>
+
<programlisting>......
Add configuration jar:file:/D:/Projects/eXo/dev/exo-working/exo-tomcat/lib/exo.kernel.container-trunk.jar!/conf/portal/configuration.xml
Add configuration jar:file:/D:/Projects/eXo/dev/exo-working/exo-tomcat/lib/exo.kernel.component.cache-trunk.jar!/conf/portal/configuration.xml
@@ -611,21 +498,21 @@
import jndi:/localhost/portal/WEB-INF/conf/jcr/jcr-configuration.xml
......</programlisting>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Further_Reading">
- <title>Further Reading</title>
- <para>
- Do you feel an expert now? Not yet. Get a deeper look and read this <xref linkend="sect-Reference_Guide-Services_Wiring" /> article. You read so much about configuration, that you should wonder what the <xref linkend="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace" /> looks like.
- </para>
- <para>
- If you wish to see a examples of service configurations you should study the <xref linkend="sect-Reference_Guide-eXo_Core" /> Where you find descriptions of some eXo's core services. Finally you might wish to read more about <ulink url="http://www.picocontainer.org/">PicoContainer</ulink>.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_for_Beginners-Further_Reading">
+ <title>Further Reading</title>
+ <para>
+ Do you feel an expert now? Not yet. Get a deeper look and read this <xref linkend="sect-Reference_Guide-Services_Wiring" /> article. You read so much about configuration, that you should wonder what the <xref linkend="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace" /> looks like.
+ </para>
+ <para>
+ If you wish to see a examples of service configurations you should study the <xref linkend="sect-Reference_Guide-eXo_Core" /> Where you find descriptions of some eXo's core services. Finally you might wish to read more about <ulink url="http://www.picocontainer.org/">PicoContainer</ulink>.
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/service-configuration-in-detail.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,86 +4,86 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Service_Configuration_in_Detail">
- <title>Service Configuration in Detail</title>
- <para>
- <emphasis role="bold">Related documents</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" />
- </para>
+ <title>Service Configuration in Detail</title>
+ <para>
+ <emphasis role="bold">Related documents</emphasis>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Services_Wiring" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Services_Wiring" />
+ </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace" />
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Container_Configuration-Kernel_configuration_namespace" />
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Objectives">
- <title>Objectives</title>
- <para>
- This article shows how to setup a sample service with some configurations and how to access to the configuration parameters. The later sections describe all details of the configuration file (parameters, object-params, plugins, imports, etc.), it also shows how to access the configuration values. You may consider this article as a <emphasis role="bold">reference</emphasis>, but you can also use this article as a <emphasis role="bold">tutorial</emphasis> and read it from the beginning to the end.
- </para>
+ </itemizedlist>
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Objectives">
+ <title>Objectives</title>
+ <para>
+ This article shows how to setup a sample service with some configurations and how to access to the configuration parameters. The later sections describe all details of the configuration file (parameters, object-params, plugins, imports, etc.), it also shows how to access the configuration values. You may consider this article as a <emphasis role="bold">reference</emphasis>, but you can also use this article as a <emphasis role="bold">tutorial</emphasis> and read it from the beginning to the end.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Requirements">
- <title>Requirements</title>
- <para>
- You should have read and understood <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" />. Obviously you should know java and xml. We are working with examples that are created for teaching reasons only and you will see extracts from the eXo Products default installation. When reading this article, you do not forget that the terms service and component are interchangeable in eXo Products.
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Requirements">
+ <title>Requirements</title>
+ <para>
+ You should have read and understood <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" />. Obviously you should know java and xml. We are working with examples that are created for teaching reasons only and you will see extracts from the eXo Products default installation. When reading this article, you do not forget that the terms service and component are interchangeable in eXo Products.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Sample_Service">
- <title>Sample Service</title>
- <section id="sect-Reference_Guide-Sample_Service-Java_Class">
- <title>Java Class</title>
- <para>
- Imagine that you are working for a publishing company called "La Verdad" that is going to use eXo platform. Your boss asks you be able to calculate the number of sentences of an article.
- </para>
- <para>
- You remember in eXo product everything is a <emphasis role="bold">service</emphasis> so you decide to create a simple class. In the future, you want to be able to plug different implementations of your service, so that you should define an <emphasis role="bold">interface</emphasis> that defines your service.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Sample_Service">
+ <title>Sample Service</title>
+ <section id="sect-Reference_Guide-Sample_Service-Java_Class">
+ <title>Java Class</title>
+ <para>
+ Imagine that you are working for a publishing company called "La Verdad" that is going to use eXo platform. Your boss asks you be able to calculate the number of sentences of an article.
+ </para>
+ <para>
+ You remember in eXo product everything is a <emphasis role="bold">service</emphasis> so you decide to create a simple class. In the future, you want to be able to plug different implementations of your service, so that you should define an <emphasis role="bold">interface</emphasis> that defines your service.
+ </para>
+
<programlisting language="Java" role="Java">package com.laverdad.services;
public interface ArticleStatsService {
public abstract int calcSentences(String article);
}</programlisting>
- <para>
- A very simple implementation:
- </para>
-
+ <para>
+ A very simple implementation:
+ </para>
+
<programlisting language="Java" role="Java">public class ArticleStatsServiceImpl implements ArticleStatsService {
public int calcSentences(String article) {
throw new RuntimeException("Not implemented");
}
}</programlisting>
- <para>
- That's it! You see there are no special prerequisites for a service.
- </para>
- <para>
- You should already have prepared your working environment, where you have a base folder (let's call it our service base folder). If you wish to try out this example create this class in the com/laverdad/services/ArticleStatsService subfolder.
- </para>
+ <para>
+ That's it! You see there are no special prerequisites for a service.
+ </para>
+ <para>
+ You should already have prepared your working environment, where you have a base folder (let's call it our service base folder). If you wish to try out this example create this class in the com/laverdad/services/ArticleStatsService subfolder.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Sample_Service-First_configuration_file">
- <title>First configuration file</title>
- <para>
- When creating a service, you also should declare its existence to the <emphasis role="bold">Container</emphasis>, therefore you create a first simple configuration file. Copy the following code to a file called "configuration.xml" and place this file in a /conf subdirectory of your service base folder. As you already know the container looks for a "/conf/configuration.xml" file in each jar-file.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Sample_Service-First_configuration_file">
+ <title>First configuration file</title>
+ <para>
+ When creating a service, you also should declare its existence to the <emphasis role="bold">Container</emphasis>, therefore you create a first simple configuration file. Copy the following code to a file called "configuration.xml" and place this file in a /conf subdirectory of your service base folder. As you already know the container looks for a "/conf/configuration.xml" file in each jar-file.
+ </para>
+
<programlisting language="XML" role="XML"><?xml version="1.0" encoding="UTF8"?>
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -94,27 +94,27 @@
<type>com.laverdad.services.ArticleStatsServiceImpl</type>
</component>
</configuration></programlisting>
- <note>
- <para>
- You are correctly using the namespace of the configuration schema ( <uri>http://www.exoplaform.org/xml/ns/kernel_1_1.xsd</uri>). Most of the configuration schema is explained in this article, therefore you do not need to open and understand the schema. For backward compatibility it is not necessary to declare the schema.
- </para>
- <para>
- When eXo kernel reads a configuration, it loads the file from the kernel jar using the classloader and does not use an internet connection to resolve the file.
- </para>
+ <note>
+ <para>
+ You are correctly using the namespace of the configuration schema ( <uri>http://www.exoplaform.org/xml/ns/kernel_1_1.xsd</uri>). Most of the configuration schema is explained in this article, therefore you do not need to open and understand the schema. For backward compatibility it is not necessary to declare the schema.
+ </para>
+ <para>
+ When eXo kernel reads a configuration, it loads the file from the kernel jar using the classloader and does not use an internet connection to resolve the file.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Sample_Service-Init_Parameters">
- <title>Init Parameters</title>
- <para>
- You see your service has a configuration file, but you wonder how the file could possibly access to its configuration. Imagine that you are asked to implement two different calculation methods: fast and exact.
- </para>
- <para>
- You create one init parameter containing the calculation methods. For the exact method, you wish to configure more details for the service. Let's enhance the word service configuration file:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Sample_Service-Init_Parameters">
+ <title>Init Parameters</title>
+ <para>
+ You see your service has a configuration file, but you wonder how the file could possibly access to its configuration. Imagine that you are asked to implement two different calculation methods: fast and exact.
+ </para>
+ <para>
+ You create one init parameter containing the calculation methods. For the exact method, you wish to configure more details for the service. Let's enhance the word service configuration file:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>com.laverdad.services.ArticleStatsService</key>
<type>com.laverdad.services.ArticleStatsServiceImpl</type>
@@ -132,16 +132,16 @@
</properties-param>
</init-params>
</component></programlisting>
- <note>
- <para>
- When configuring your service, you are <emphasis role="bold">totally free</emphasis>. You can provide as many <emphasis role="bold">value-param</emphasis>, <emphasis role="bold">property-param</emphasis>, and <emphasis role="bold">properties</emphasis> you wish and you can give them any names or values. You only must respect the xml structure.
- </para>
+ <note>
+ <para>
+ When configuring your service, you are <emphasis role="bold">totally free</emphasis>. You can provide as many <emphasis role="bold">value-param</emphasis>, <emphasis role="bold">property-param</emphasis>, and <emphasis role="bold">properties</emphasis> you wish and you can give them any names or values. You only must respect the xml structure.
+ </para>
- </note>
- <para>
- Now let's see how our service can read this configuration. The implementation of the calcSentences() method serves just as a simple example. It's up to your imagination to implement the exact method.
- </para>
-
+ </note>
+ <para>
+ Now let's see how our service can read this configuration. The implementation of the calcSentences() method serves just as a simple example. It's up to your imagination to implement the exact method.
+ </para>
+
<programlisting language="Java" role="Java">public class ArticleStatsServiceImpl implements ArticleStatsService {
private String calcMethod = "fast";
@@ -173,60 +173,57 @@
throw new RuntimeException("Not implemented");
}
}</programlisting>
- <para>
- You see you just have to declare a parameter of org.exoplatform.container.xml.InitParams in your constructor. The container provides an InitParams object that correspond to the xml tree of init-param.
- </para>
+ <para>
+ You see you just have to declare a parameter of org.exoplatform.container.xml.InitParams in your constructor. The container provides an InitParams object that correspond to the xml tree of init-param.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Sample_Service-Service_Access">
- <title>Service Access</title>
- <para>
- As you want to follow the principle of <emphasis role="bold">Inversion of Control,</emphasis> you <emphasis role="bold">must not</emphasis> access the service directly. You need a <emphasis role="bold">Container</emphasis> to access the service.
- </para>
- <para>
- With this command you get your current container:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">ExoContainer myContainer = ExoContainerContext.getCurrentContainer();</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Sample_Service-Service_Access">
+ <title>Service Access</title>
+ <para>
+ As you want to follow the principle of <emphasis role="bold">Inversion of Control,</emphasis> you <emphasis role="bold">must not</emphasis> access the service directly. You need a <emphasis role="bold">Container</emphasis> to access the service.
+ </para>
+ <para>
+ With this command you get your current container:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">ExoContainer myContainer = ExoContainerContext.getCurrentContainer();</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- This might be a PortalContainer or a StandaloneContainer, dependant on the <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners-Execution_Modes" /> in which you are running your application.
- </para>
- <para>
- Whenever you need one of the services that you have configured use the method:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">myContainer.getComponentInstance(class)</emphasis>
- </para>
+ </itemizedlist>
+ <para>
+ Whenever you need one of the services that you have configured use the method:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">myContainer.getComponentInstance(class)</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- In our case:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">ArticleStatsService statsService = (ArticleStatsService) myContainer.getComponentInstance(ArticleStatsService.class);</emphasis>
- </para>
+ </itemizedlist>
+ <para>
+ In our case:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">ArticleStatsService statsService = (ArticleStatsService) myContainer.getComponentInstance(ArticleStatsService.class);</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Recapitulation:
- </para>
-
+ </itemizedlist>
+ <para>
+ Recapitulation:
+ </para>
+
<programlisting language="Java" role="Java">package com.laverdad.common;
import org.exoplatform.container.ExoContainer;
@@ -251,23 +248,20 @@
System.out.println("Number of sentences: " + stats.makeStatistics(newText));
}
}</programlisting>
- <para>
- If you test this sample in standalone mode, you need to put all jars of eXo Kernel in your buildpath, furthermore picoContainer is needed.
- </para>
+
+ </section>
+
- </section>
-
-
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Parameters">
- <title>Parameters</title>
- <section id="sect-Reference_Guide-Parameters-Value_Param">
- <title>Value-Param</title>
- <para>
- There is an value-param example:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Parameters">
+ <title>Parameters</title>
+ <section id="sect-Reference_Guide-Parameters-Value_Param">
+ <title>Value-Param</title>
+ <para>
+ There is an value-param example:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>org.exoplatform.portal.config.UserACL</key>
<type>org.exoplatform.portal.config.UserACL</type>
@@ -280,10 +274,10 @@
</value-param>
...
</component></programlisting>
- <para>
- The UserACL class accesses to the <emphasis role="bold">value-param</emphasis> in its constructor.
- </para>
-
+ <para>
+ The UserACL class accesses to the <emphasis role="bold">value-param</emphasis> in its constructor.
+ </para>
+
<programlisting language="Java" role="Java">package org.exoplatform.portal.config;
public class UserACL {
@@ -293,17 +287,17 @@
if(accessControlWorkspaceParam != null) md.setAccessControlWorkspace(accessControlWorkspaceParam.getValue());
...</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Parameters-Properties_Param">
- <title>Properties-Param</title>
- <para>
- Properties are name-value pairs. Both the name and the value are Java Strings.
- </para>
- <para>
- Here you see the hibernate configuration example:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Parameters-Properties_Param">
+ <title>Properties-Param</title>
+ <para>
+ Properties are name-value pairs. Both the name and the value are Java Strings.
+ </para>
+ <para>
+ Here you see the hibernate configuration example:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>org.exoplatform.services.database.HibernateService</key>
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
@@ -319,10 +313,10 @@
</properties-param>
</init-params>
</component></programlisting>
- <para>
- In the org.exoplatform.services.database.impl.HibernateServiceImpl you will find that the name "hibernate.properties" of the properties-param is used to access the properties.
- </para>
-
+ <para>
+ In the org.exoplatform.services.database.impl.HibernateServiceImpl you will find that the name "hibernate.properties" of the properties-param is used to access the properties.
+ </para>
+
<programlisting language="Java" role="Java">package org.exoplatform.services.database.impl;
public class HibernateServiceImpl implements HibernateService, ComponentRequestLifecycle {
@@ -331,14 +325,14 @@
...
}</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Parameters-Object_Param">
- <title>Object-Param</title>
- <para>
- Let's have a look at the configuration of the LDAPService. It's not important to know LDAP, we only discuss the parameters.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Parameters-Object_Param">
+ <title>Object-Param</title>
+ <para>
+ Let's have a look at the configuration of the LDAPService. It's not important to know LDAP, we only discuss the parameters.
+ </para>
+
<programlisting language="XML" role="XML"><component>
<key>org.exoplatform.services.ldap.LDAPService</key>
<type>org.exoplatform.services.ldap.impl.LDAPServiceImpl</type>
@@ -359,13 +353,13 @@
</object-param>
</init-params>
</component></programlisting>
- <para>
- You see here an <emphasis role="bold">object-param</emphasis> is being used to pass the parameters inside an object (actually a java bean). It consists of a <emphasis role="bold">name</emphasis>, a <emphasis role="bold">description</emphasis> and exactly one <emphasis role="bold">object</emphasis>. The object defines the <emphasis role="bold">type</emphasis> and a number of <emphasis role="bold">fields</emphasis>.
- </para>
- <para>
- Here you see how the service accesses the object:
- </para>
-
+ <para>
+ You see here an <emphasis role="bold">object-param</emphasis> is being used to pass the parameters inside an object (actually a java bean). It consists of a <emphasis role="bold">name</emphasis>, a <emphasis role="bold">description</emphasis> and exactly one <emphasis role="bold">object</emphasis>. The object defines the <emphasis role="bold">type</emphasis> and a number of <emphasis role="bold">fields</emphasis>.
+ </para>
+ <para>
+ Here you see how the service accesses the object:
+ </para>
+
<programlisting language="Java" role="Java">package org.exoplatform.services.ldap.impl;
public class LDAPServiceImpl implements LDAPService {
@@ -374,10 +368,10 @@
LDAPConnectionConfig config = (LDAPConnectionConfig) params.getObjectParam("ldap.config")
.getObject();
...</programlisting>
- <para>
- The passed object is LDAPConnectionConfig which is a classic <emphasis role="bold">java bean</emphasis>. It contains all fields and also the appropriate getters and setters (not listed here). You also can provide default values. The container creates a new instance of your bean and calls all setters whose values are configured in the configuration file.
- </para>
-
+ <para>
+ The passed object is LDAPConnectionConfig which is a classic <emphasis role="bold">java bean</emphasis>. It contains all fields and also the appropriate getters and setters (not listed here). You also can provide default values. The container creates a new instance of your bean and calls all setters whose values are configured in the configuration file.
+ </para>
+
<programlisting language="Java" role="Java">package org.exoplatform.services.ldap.impl;
public class LDAPConnectionConfig {
@@ -391,36 +385,36 @@
private int maxConnection;
private String referralMode = "follow";
...</programlisting>
- <para>
- You see that the types (String, int) of the fields in the configuration correspond with the bean. A short glance in the kernel_1_0.xsd file let us discover more simple types:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">string, int, long, boolean, date, double</emphasis>
- </para>
+ <para>
+ You see that the types (String, int) of the fields in the configuration correspond with the bean. A short glance in the kernel_1_0.xsd file let us discover more simple types:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">string, int, long, boolean, date, double</emphasis>
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- Have a look on this type test xml file: <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...">https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...</ulink>.
- </para>
+ </itemizedlist>
+ <para>
+ Have a look on this type test xml file: <ulink url="https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...">https://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk/exo.kernel.container...</ulink>.
+ </para>
- </section>
-
- <section id="sect-Reference_Guide-Parameters-Collection">
- <title>Collection</title>
- <para>
- You also can use java collections to configure your service. In order to see an example, let's open the database-organization-configuration.xml file. This file defines a default user organization (users, groups, memberships/roles) of your portal. They use component-plugins which are explained later. You wil see that object-param is used again.
- </para>
- <para>
- There are two collections: The first collection is an <emphasis role="bold">ArrayList</emphasis>. This ArrayList contains only one value, but there could be more. The only value is an object which defines the field of the NewUserConfig$JoinGroup bean.
- </para>
- <para>
- The second collection is a <emphasis role="bold">HashSet</emphasis> that is a set of strings.
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Parameters-Collection">
+ <title>Collection</title>
+ <para>
+ You also can use java collections to configure your service. In order to see an example, let's open the database-organization-configuration.xml file. This file defines a default user organization (users, groups, memberships/roles) of your portal. They use component-plugins which are explained later. You wil see that object-param is used again.
+ </para>
+ <para>
+ There are two collections: The first collection is an <emphasis role="bold">ArrayList</emphasis>. This ArrayList contains only one value, but there could be more. The only value is an object which defines the field of the NewUserConfig$JoinGroup bean.
+ </para>
+ <para>
+ The second collection is a <emphasis role="bold">HashSet</emphasis> that is a set of strings.
+ </para>
+
<programlisting language="XML" role="XML"> <component-plugin>
<name>new.user.event.listener</name>
<set-method>addListenerPlugin</set-method>
@@ -454,10 +448,10 @@
</object-param>
</init-params>
</component-plugin></programlisting>
- <para>
- Let's look at the org.exoplatform.services.organization.impl.NewUserConfig bean:
- </para>
-
+ <para>
+ Let's look at the org.exoplatform.services.organization.impl.NewUserConfig bean:
+ </para>
+
<programlisting language="Java" role="Java">public class NewUserConfig {
private List role;
private List group;
@@ -475,33 +469,33 @@
public String membership;
...
}</programlisting>
- <para>
- You see the values of the HashSet are set one by one by the container, and it's the responsibility of the bean to add these values to its HashSet.
- </para>
- <para>
- The JoinGroup object is just an inner class and implements a bean of its own. It can be accessed like any other inner class using NewUserConfig.JoinGroup.
- </para>
+ <para>
+ You see the values of the HashSet are set one by one by the container, and it's the responsibility of the bean to add these values to its HashSet.
+ </para>
+ <para>
+ The JoinGroup object is just an inner class and implements a bean of its own. It can be accessed like any other inner class using NewUserConfig.JoinGroup.
+ </para>
- </section>
-
+ </section>
+
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-External_Plugin">
- <title>External Plugin</title>
- <para>
- The External Plugin allows you to add configuration on the fly.
- </para>
- <para>
- As you have carefully read <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" /> you know that <emphasis role="bold">normally</emphasis> newer configurations always <emphasis role="bold">replaces</emphasis> previous configurations. An external plugin allows you to <emphasis role="bold">add</emphasis> configuration without replacing previous configurations.
- </para>
- <para>
- That can be interesting if you adapt a service configuration for your project-specific needs (country, language, branch, project, etc.).
- </para>
- <para>
- Let's have a look at the configuration of the TaxonomyPlugin of the CategoriesService:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-External_Plugin">
+ <title>External Plugin</title>
+ <para>
+ The External Plugin allows you to add configuration on the fly.
+ </para>
+ <para>
+ As you have carefully read <xref linkend="sect-Reference_Guide-Service_Configuration_for_Beginners" /> you know that <emphasis role="bold">normally</emphasis> newer configurations always <emphasis role="bold">replaces</emphasis> previous configurations. An external plugin allows you to <emphasis role="bold">add</emphasis> configuration without replacing previous configurations.
+ </para>
+ <para>
+ That can be interesting if you adapt a service configuration for your project-specific needs (country, language, branch, project, etc.).
+ </para>
+ <para>
+ Let's have a look at the configuration of the TaxonomyPlugin of the CategoriesService:
+ </para>
+
<programlisting language="XML" role="XML"> <external-component-plugins>
<target-component>org.exoplatform.services.cms.categories.CategoriesService</target-component>
<component-plugin>
@@ -542,81 +536,65 @@
</init-params>
</component-plugin>
<external-component-plugins></programlisting>
- <para>
- The <emphasis role="bold"><target-component></emphasis> defines the service for which the plugin is defined. The configuration is injected by the container using a method that is defined in <emphasis role="bold"><set-method></emphasis>. The method has exactly one argument of the type org.exoplatform.services.cms.categories.impl.TaxonomyPlugin:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- addTaxonomyPlugin(org.exoplatform.services.cms.categories.impl.TaxonomyPlugin plugin)
- </para>
+ <para>
+ The <emphasis role="bold"><target-component></emphasis> defines the service for which the plugin is defined. The configuration is injected by the container using a method that is defined in <emphasis role="bold"><set-method></emphasis>. The method has exactly one argument of the type org.exoplatform.services.cms.categories.impl.TaxonomyPlugin:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ addTaxonomyPlugin(org.exoplatform.services.cms.categories.impl.TaxonomyPlugin plugin)
+ </para>
- </listitem>
+ </listitem>
- </itemizedlist>
- <para>
- The content of <emphasis role="bold"><init-params></emphasis> corresponds to the structure of the TaxonomyPlugin object.
- </para>
- <note>
- <para>
- You can configure the component CategoriesService using the addTaxonomyPlugin as often as you wish, you can also call addTaxonomyPlugin in different configuration files. The method addTaxonomyPlugin is then called several times, everything else depends on the implementation of the method.
- </para>
+ </itemizedlist>
+ <para>
+ The content of <emphasis role="bold"><init-params></emphasis> corresponds to the structure of the TaxonomyPlugin object.
+ </para>
+ <note>
+ <para>
+ You can configure the component CategoriesService using the addTaxonomyPlugin as often as you wish, you can also call addTaxonomyPlugin in different configuration files. The method addTaxonomyPlugin is then called several times, everything else depends on the implementation of the method.
+ </para>
- </note>
+ </note>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Import">
- <title>Import</title>
- <para>
- The import tag allows to link to other configuration files. These imported files can be placed anywhere. If you write a default configuration which is part of your jar file you should not import files from outside your jar.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">war</emphasis>: Imports from <emphasis role="bold">portal.war/WEB-INF</emphasis>
- </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-Import">
+ <title>Import</title>
+ <para>
+ The import tag allows to link to other configuration files. These imported files can be placed anywhere. If you write a default configuration which is part of your jar file you should not import files from outside your jar.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">war</emphasis>: Imports from <emphasis role="bold">portal.war/WEB-INF</emphasis>
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">jar</emphasis> or <emphasis role="bold">classpath</emphasis>: Uses the <emphasis role="bold">classloader</emphasis>, you can use this prefix in the default configuration for importing an other configuration file which is accessible by the classloader.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">jar</emphasis> or <emphasis role="bold">classpath</emphasis>: Uses the <emphasis role="bold">classloader</emphasis>, you can use this prefix in the default configuration for importing an other configuration file which is accessible by the classloader.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">file</emphasis>: Uses an <emphasis role="bold">absolute path</emphasis>, you also can put a <emphasis role="bold">URL</emphasis>.
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">file</emphasis>: Uses an <emphasis role="bold">absolute path</emphasis>, you also can put a <emphasis role="bold">URL</emphasis>.
+ </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">without any prefix</emphasis>:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Standalone mode: <emphasis role="bold">user directory</emphasis>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">without any prefix</emphasis>:
+ </para>
+ </listitem>
- </listitem>
- <listitem>
- <para>
- Portal mode: $AS-HOME, that means the application server home, for example " <emphasis role="bold">exo-tomcat</emphasis>".
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </listitem>
-
- </itemizedlist>
- <para>
- If you open the "portal/trunk/web/portal/src/main/webapp/WEB-INF/conf.configuration.xml" you will see that it consists only of imports:
- </para>
-
+ </itemizedlist>
+ <para>
+ If you open the "portal/trunk/web/portal/src/main/webapp/WEB-INF/conf.configuration.xml" you will see that it consists only of imports:
+ </para>
+
<programlisting language="XML" role="XML"><import>war:/conf/common/common-configuration.xml</import>
<import>war:/conf/common/logs-configuration.xml</import>
<import>war:/conf/database/database-configuration.xml</import>
@@ -624,17 +602,17 @@
<import>war:/conf/common/portlet-container-configuration.xml</import>
...</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Service_Configuration_in_Detail-System_properties">
- <title>System properties</title>
- <para>
- Since kernel 2.0.7 and 2.1, it is possible to use system properties in literal values of component configuration meta data. This makes it possible to resolve properties at runtime instead of providing a value at packaging time.
- </para>
- <para>
- In portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.tmpl.xml you find an example for system properties:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Service_Configuration_in_Detail-System_properties">
+ <title>System properties</title>
+ <para>
+ Since kernel 2.0.7 and 2.1, it is possible to use system properties in literal values of component configuration meta data. This makes it possible to resolve properties at runtime instead of providing a value at packaging time.
+ </para>
+ <para>
+ In portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.tmpl.xml you find an example for system properties:
+ </para>
+
<programlisting language="XML" role="XML"> <component>
<key>org.exoplatform.services.database.HibernateService</key>
<jmx-name>database:type=HibernateService</jmx-name>
@@ -653,11 +631,11 @@
</properties-param>
</init-params>
</component></programlisting>
- <para>
- As these are system properties you use the -D command: <emphasis role="bold">java -DconnectionUrl=jdbc:hsqldb:file:../temp/data/exodb -DdriverClass=org.hsqldb.jdbcDriver</emphasis> Or better use the parameters of eXo.bat / eXo.sh when you start eXo Portal: <emphasis role="bold">set EXO_OPTS="-DconnectionUrl=jdbc:hsqldb:file:../temp/data/exodb -DdriverClass=org.hsqldb.jdbcDriver"</emphasis>
- </para>
+ <para>
+ As these are system properties you use the -D command: <emphasis role="bold">java -DconnectionUrl=jdbc:hsqldb:file:../temp/data/exodb -DdriverClass=org.hsqldb.jdbcDriver</emphasis> Or better use the parameters of eXo.bat / eXo.sh when you start eXo Portal: <emphasis role="bold">set EXO_OPTS="-DconnectionUrl=jdbc:hsqldb:file:../temp/data/exodb -DdriverClass=org.hsqldb.jdbcDriver"</emphasis>
+ </para>
- </section>
+ </section>
</section>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/transaction-service.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/transaction-service.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/kernel/transaction-service.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,111 +4,92 @@
%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-TransactionService">
- <title>TransactionService</title>
- <section id="sect-Reference_Guide-TransactionService-Base_information">
- <title>Base information</title>
- <para>
- TransactionServices provides access to the TransactionManager and the UserTransaction (See JTA specification for details).
- </para>
- <table id="tabl-Reference_Guide-Base_information-List_methods">
- <title>List methods</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- getTransactionManager()
- </entry>
- <entry>
- Get used TransactionManager
- </entry>
+ <title>TransactionService</title>
+ <section id="sect-Reference_Guide-TransactionService-Base_information">
+ <title>Base information</title>
+ <para>
+ TransactionServices provides access to the TransactionManager and the UserTransaction (See JTA specification for details).
+ </para>
+ <table id="tabl-Reference_Guide-Base_information-List_methods">
+ <title>List methods</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ getTransactionManager()
+ </entry>
+ <entry>
+ Get used TransactionManager
+ </entry>
- </row>
- <row>
- <entry>
- getUserTransaction()
- </entry>
- <entry>
- Get UserTransaction on TransactionManager
- </entry>
+ </row>
+ <row>
+ <entry>
+ getUserTransaction()
+ </entry>
+ <entry>
+ Get UserTransaction on TransactionManager
+ </entry>
- </row>
- <row>
- <entry>
- getDefaultTimeout()
- </entry>
- <entry>
- Return default TimeOut
- </entry>
+ </row>
+ <row>
+ <entry>
+ getDefaultTimeout()
+ </entry>
+ <entry>
+ Return default TimeOut
+ </entry>
- </row>
- <row>
- <entry>
- setTransactionTimeout(int seconds)
- </entry>
- <entry>
- Set TimeOut in second
- </entry>
+ </row>
+ <row>
+ <entry>
+ setTransactionTimeout(int seconds)
+ </entry>
+ <entry>
+ Set TimeOut in second
+ </entry>
- </row>
- <row>
- <entry>
- enlistResource(XAResource xares)
- </entry>
- <entry>
- Enlist XA resource in TransactionManager
- </entry>
+ </row>
+ <row>
+ <entry>
+ enlistResource(XAResource xares)
+ </entry>
+ <entry>
+ Enlist XA resource in TransactionManager
+ </entry>
- </row>
- <row>
- <entry>
- delistResource(XAResource xares)
- </entry>
- <entry>
- Delist XA resource from TransactionManager
- </entry>
+ </row>
+ <row>
+ <entry>
+ delistResource(XAResource xares)
+ </entry>
+ <entry>
+ Delist XA resource from TransactionManager
+ </entry>
- </row>
+ </row>
- </tbody>
+ </tbody>
- </tgroup>
+ </tgroup>
- </table>
+ </table>
- </section>
-
- <section id="sect-Reference_Guide-TransactionService-Existing_TransactionService_implementations">
- <title>Existing TransactionService implementations</title>
- <para>
- eXo JCR proposes out of the box several implementations, they all implement the abstract class <emphasis>org.exoplatform.services.transaction.impl.AbstractTransactionService</emphasis>. This main class implement the biggest part of all the methods proposed by the <emphasis>TransactionService</emphasis>. For each sub-class of <emphasis>AbstractTransactionService</emphasis>, you can set the transaction timeout by configuration using the value parameter <emphasis>timeout</emphasis> that is expressed in seconds.
- </para>
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-JOTM_in_standalone_mode">
- <title>JOTM in standalone mode</title>
- <para>
- To use JOTM as TransactionManager in standalone mode, simply add the following component configuration:
- </para>
-
-<programlisting> <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.jotm.TransactionServiceJotmImpl</type>
- <!-- Uncomment the lines below if you want to set default transaction timeout that is expressed in seconds -->
- <!--init-params>
- <value-param>
- <name>timeout</name>
- <value>60</value>
- </value-param>
- </init-params-->
- </component></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-Generic_TransactionService_based_on_the_TransactionManagerLookup_of_JBoss_Cache">
- <title>Generic TransactionService based on the TransactionManagerLookup of JBoss Cache</title>
- <para>
- If you intend to use JBoss Cache, you can use a generic TransactionService based on its TransactionManagerLookup which is able to automatically find the TransactionManager of several Application Servers thanks to a set of JNDI lookups. This generic TransactionService covers mainly the TransactionManager lookups, the UserTransaction is actually simply the TransactionManager instance that has been wrapped. See below an example of configuration:
- </para>
-
-<programlisting> <!-- Configuration of the TransactionManagerLookup -->
+ </section>
+
+ <section id="sect-Reference_Guide-TransactionService-Existing_TransactionService_implementations">
+ <title>Existing TransactionService implementations</title>
+ <para>
+ eXo JCR proposes out of the box several implementations, they all implement the abstract class <emphasis>org.exoplatform.services.transaction.impl.AbstractTransactionService</emphasis>. This main class implement the biggest part of all the methods proposed by the <emphasis>TransactionService</emphasis>. For each sub-class of <emphasis>AbstractTransactionService</emphasis>, you can set the transaction timeout by configuration using the value parameter <emphasis>timeout</emphasis> that is expressed in seconds.
+ </para>
+
+ <section id="sect-Reference_Guide-Existing_TransactionService_implementations-Generic_TransactionService_based_on_the_TransactionManagerLookup_of_JBoss_Cache">
+ <title>Generic TransactionService based on the TransactionManagerLookup of JBoss Cache</title>
+ <para>
+ If you intend to use JBoss Cache, you can use a generic TransactionService based on its TransactionManagerLookup which is able to automatically find the TransactionManager of several Application Servers thanks to a set of JNDI lookups. This generic TransactionService covers mainly the TransactionManager lookups, the UserTransaction is actually simply the TransactionManager instance that has been wrapped. See below an example of configuration:
+ </para>
+
+<programlisting> <![CDATA[ <!-- Configuration of the TransactionManagerLookup -->
<component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.transaction.GenericTransactionManagerLookup</type>
@@ -124,94 +105,17 @@
<value>60</value>
</value-param>
</init-params-->
- </component></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-Specific_GenericTransactionService_for_JBoss_Cache_and_Arjuna">
- <title>Specific GenericTransactionService for JBoss Cache and Arjuna</title>
- <para>
- If you intend to use JBoss Cache with Arjuna, you can use a more specific GenericTransactionService, it is mostly interesting in case you want to use the real UserTransaction. See below an example of configuration:
- </para>
-
-<programlisting> <!-- Configuration of the TransactionManagerLookup -->
- <component>
- <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
- <type>org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup</type>
</component>
- <!-- Configuration of the TransactionService -->
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
- <!-- Uncomment the lines below if you want to set default transaction timeout that is expressed in seconds -->
- <!--init-params>
- <value-param>
- <name>timeout</name>
- <value>60</value>
- </value-param>
- </init-params-->
- </component></programlisting>
+]]></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-Generic_TransactionService_based_on_the_TransactionManagerLookup_of_Infinispan">
- <title>Generic TransactionService based on the TransactionManagerLookup of Infinispan</title>
- <para>
- If you intend to use Infinispan, you can use a generic TransactionService based on its TransactionManagerLookup which is able to automatically find the TransactionManager of several Application Servers thanks to a set of JNDI lookups. This generic TransactionService covers mainly the TransactionManager lookups, the UserTransaction is actually simply the TransactionManager instance that has been wrapped. See below an example of configuration:
- </para>
-
-<programlisting> <!-- Configuration of the TransactionManagerLookup -->
- <component>
- <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
- <type>org.infinispan.transaction.lookup.GenericTransactionManagerLookup</type>
- </component>
- <!-- Configuration of the TransactionService -->
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.infinispan.GenericTransactionService</type>
- <!-- Uncomment the lines below if you want to set default transaction timeout that is expressed in seconds -->
- <!--init-params>
- <value-param>
- <name>timeout</name>
- <value>60</value>
- </value-param>
- </init-params-->
- </component></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-Specific_GenericTransactionService_for_Infinispan_and_Arjuna">
- <title>Specific GenericTransactionService for Infinispan and Arjuna</title>
- <para>
- If you intend to use Infinispan with Arjuna, you can use a more specific GenericTransactionService, it is mostly interesting in case you want to use the real UserTransaction. See below an example of configuration:
- </para>
-
-<programlisting> <!-- Configuration of the TransactionManagerLookup -->
- <component>
- <key>org.infinispan.transaction.lookup.TransactionManagerLookup</key>
- <type>org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup</type>
- </component>
- <!-- Configuration of the TransactionService -->
- <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.infinispan.JBossTransactionsService</type>
- <!-- Uncomment the lines below if you want to set default transaction timeout that is expressed in seconds -->
- <!--init-params>
- <value-param>
- <name>timeout</name>
- <value>60</value>
- </value-param>
- </init-params-->
- </component></programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-A_very_specific_TransactionService_for_JBoss_AS">
- <title>A very specific TransactionService for JBoss AS</title>
- <para>
- If you intend to use JBoss AS with JBoss Cache and Infinispan, you can use a very specific TransactionService for JBoss AS. See below an example of configuration:
- </para>
-
+ </section>
+
+ <section id="sect-Reference_Guide-Existing_TransactionService_implementations-A_very_specific_TransactionService_for_JBoss_AS">
+ <title>A very specific TransactionService for JBoss AS</title>
+ <para>
+ If you intend to use JBoss AS with JBoss Cache and Infinispan, you can use a very specific TransactionService for JBoss AS. See below an example of configuration:
+ </para>
+
<programlisting> <component>
<key>org.exoplatform.services.transaction.TransactionService</key>
<type>org.exoplatform.services.transaction.impl.jboss.JBossTransactionService</type>
@@ -224,31 +128,11 @@
</init-params-->
</component></programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Existing_TransactionService_implementations-TransactionsEssentials_in_standalone_mode">
- <title>TransactionsEssentials in standalone mode</title>
- <para>
- To use TransactionsEssentials as TransactionManager in standalone mode, simply add the following component configuration:
- </para>
-
-<programlisting> <component>
- <key>org.exoplatform.services.transaction.TransactionService</key>
- <type>org.exoplatform.services.transaction.impl.atomikos.TransactionsEssentialsTransactionService</type>
- <!-- Uncomment the lines below if you want to set default transaction timeout that is expressed in seconds -->
- <!--init-params>
- <value-param>
- <name>timeout</name>
- <value>60</value>
- </value-param>
- </init-params-->
- </component></programlisting>
+ </section>
+
- </section>
-
+ </section>
- </section>
-
</section>
Deleted: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/ws.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/ws.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR/ws.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -1,17 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Reference_Guide-eXoWS">
- <title>eXoWS</title>
- <xi:include href="ws/ws.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ws/introduction-to-rest.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ws/overwrite-default-providers.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ws/restservicelist-service.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ws/groovy-scripts-as-rest-services.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="ws/framework-for-cross-domain-ajax.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
-</section>
-
-
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/Advanced/eXoJCR.xml 2011-09-27 04:38:00 UTC (rev 7508)
@@ -4,12 +4,12 @@
%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-eXo_JCR">
- <title>eXo JCR</title>
- <xi:include href="eXoJCR/jcr.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/kernel.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/core.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/ws.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/faq.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="eXoJCR/jcr-with-gatein.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <title>eXo JCR</title>
+ <xi:include href="eXoJCR/jcr.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="eXoJCR/kernel.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!--<xi:include href="eXoJCR/core.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
+ <!--<xi:include href="eXoJCR/ws.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />-->
+ <xi:include href="eXoJCR/faq.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="eXoJCR/jcr-with-gatein.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/publican.cfg
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/publican.cfg 2011-09-27 00:32:49 UTC (rev 7507)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/publican.cfg 2011-09-27 04:38:00 UTC (rev 7508)
@@ -1,11 +1,13 @@
# Config::Simple 4.59
-# Wed Nov 11 11:32:13 2009
+# Tue Sep 27 14:25:48 2011
-xml_lang: en-US
+cvs_root: ":ext:cvs.devel.redhat.com:/cvs/dist"
+cvs_branch: "DOCS-RHEL-6"
+show_remarks: 1
+cvs_pkg: "JBoss_Enterprise_Portal_Platform-Reference_Guide-5.2-web-__LANG__"
+xml_lang: "en-US"
+mainfile: Reference_Guide
+brand: JBoss
+debug: 1
type: Book
-brand: JBoss
-debug:1
-show_remarks: 1
-cvs_branch: DOCS-RHEL-6
-cvs_root: :ext:cvs.devel.redhat.com:/cvs/dist
-cvs_pkg: JBoss_Enterprise_Portal_Platform-Reference_Guide-5.2-web-__LANG__
\ No newline at end of file
+
13 years, 3 months