You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2015/08/19 17:04:23 UTC
svn commit: r1696609 - in /tika/site/src/site/apt: 1.10/configuring.apt
1.11/configuring.apt
Author: nick
Date: Wed Aug 19 15:04:22 2015
New Revision: 1696609
URL: http://svn.apache.org/r1696609
Log:
Fix APT markup for service loader config documentation
Modified:
tika/site/src/site/apt/1.10/configuring.apt
tika/site/src/site/apt/1.11/configuring.apt
Modified: tika/site/src/site/apt/1.10/configuring.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.10/configuring.apt?rev=1696609&r1=1696608&r2=1696609&view=diff
==============================================================================
--- tika/site/src/site/apt/1.10/configuring.apt (original)
+++ tika/site/src/site/apt/1.10/configuring.apt Wed Aug 19 15:04:22 2015
@@ -139,6 +139,9 @@ Configuring Tika
While the work on that is ongoing, for now you will need to review the
{{{./api/}Tika Javadocs}} to see how individual Translators are configured.
+~~ When Translators can have their parameters configured, mention here about
+~~ specifying which single one to use in the Tika Config XML
+
* {Configuring the Service Loader}
Tika has a number of service provider types such as parsers, detectors, and translators.
@@ -149,12 +152,14 @@ Configuring Tika
The ServiceLoader's registry can be populated either statically or dynamically.
- Static
+** Static
+
Static loading is the default which requires no configuration. This configuration options is used in
Tika deployments where the Tika JAR files reside together in the same classloader hierarchy. The services
provides are loaded from provider configuration files located within the tika-parsers JAR file at META-INF/services.
- Dynamic
+** Dynamic
+
Dynamic loading may be required if the tika service providers will reside in different classloaders such as
in OSGi. To allow a provider created in tika-config.xml to utilize dynamically loaded services you need to
configure the ServiceLoader to be dynamic with the following configuration:
@@ -166,15 +171,22 @@ Configuring Tika
</properties>
---
+** Load Error Handling
+
The ServiceLoader can contains a handler to deal with errors that occur during provider initialization. For example
if a class fails to initialize LoadErrorHandler deals with the exception that is thrown.
This handler can be configured to:
- IGNORE - (Default) Do nothing when providers fail to initialize.
- WARN - Log a warning when providers fail to initialize.
- THROW - Throw an exception when providers fail to initialize.
+ * <<< IGNORE >>> - (Default) Do nothing when providers fail to initialize.
+
+ * <<< WARN >>> - Log a warning when providers fail to initialize.
+
+ * <<< THROW >>> - Throw an exception when providers fail to initialize.
+
+ []
+
+ For example to set the LoadErrorHandler to WARN then use the following configuration:
-For example to set the LoadErrorHandler to WARN then use the following configuration:
---
<properties>
<service-loader loadErrorHandler="WARN"/>
@@ -182,9 +194,6 @@ For example to set the LoadErrorHandler
</properties>
---
-~~ When Translators can have their parameters configured, mention here about
-~~ specifying which single one to use in the Tika Config XML
-
* {Using a Tika Configuration XML file}
However you call Tika, the System Property of <<< tika.config >>> is
Modified: tika/site/src/site/apt/1.11/configuring.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.11/configuring.apt?rev=1696609&r1=1696608&r2=1696609&view=diff
==============================================================================
--- tika/site/src/site/apt/1.11/configuring.apt (original)
+++ tika/site/src/site/apt/1.11/configuring.apt Wed Aug 19 15:04:22 2015
@@ -139,6 +139,9 @@ Configuring Tika
While the work on that is ongoing, for now you will need to review the
{{{./api/}Tika Javadocs}} to see how individual Translators are configured.
+~~ When Translators can have their parameters configured, mention here about
+~~ specifying which single one to use in the Tika Config XML
+
* {Configuring the Service Loader}
Tika has a number of service provider types such as parsers, detectors, and translators.
@@ -149,12 +152,14 @@ Configuring Tika
The ServiceLoader's registry can be populated either statically or dynamically.
- Static
+** Static
+
Static loading is the default which requires no configuration. This configuration options is used in
Tika deployments where the Tika JAR files reside together in the same classloader hierarchy. The services
provides are loaded from provider configuration files located within the tika-parsers JAR file at META-INF/services.
- Dynamic
+** Dynamic
+
Dynamic loading may be required if the tika service providers will reside in different classloaders such as
in OSGi. To allow a provider created in tika-config.xml to utilize dynamically loaded services you need to
configure the ServiceLoader to be dynamic with the following configuration:
@@ -166,15 +171,22 @@ Configuring Tika
</properties>
---
+** Load Error Handling
+
The ServiceLoader can contains a handler to deal with errors that occur during provider initialization. For example
if a class fails to initialize LoadErrorHandler deals with the exception that is thrown.
This handler can be configured to:
- IGNORE - (Default) Do nothing when providers fail to initialize.
- WARN - Log a warning when providers fail to initialize.
- THROW - Throw an exception when providers fail to initialize.
+ * <<< IGNORE >>> - (Default) Do nothing when providers fail to initialize.
+
+ * <<< WARN >>> - Log a warning when providers fail to initialize.
+
+ * <<< THROW >>> - Throw an exception when providers fail to initialize.
+
+ []
+
+ For example to set the LoadErrorHandler to WARN then use the following configuration:
-For example to set the LoadErrorHandler to WARN then use the following configuration:
---
<properties>
<service-loader loadErrorHandler="WARN"/>
@@ -182,9 +194,6 @@ For example to set the LoadErrorHandler
</properties>
---
-~~ When Translators can have their parameters configured, mention here about
-~~ specifying which single one to use in the Tika Config XML
-
* {Using a Tika Configuration XML file}
However you call Tika, the System Property of <<< tika.config >>> is