Start with the migration guide and report about your experiences here.

Migrating Turbine Services to Fulcrum Components

The Turbine services configuration used to live in WEB-INF/conf/TurbineResources.properties. The Avalon container uses two files to achieve the same function, namely WEB-INF/conf/roleConfiguration.xml to define which component is implemented by which class and WEB-INF/conf/componentConfiguration.xml to define the detailed configuration of each component.

Accessing services

Most of the static Service Accessor classes have been removed. A new annotation @TurbineService has been provided to simplify the lookup of Turbine services. See the Annotations Howto for details. Short example:

   1 // Explicit service name
   2 @TurbineService( "RunDataService" )
   3 private RunDataService runDataService;
   4 
   5 // Implicit SERVICE_NAME or ROLE
   6 @TurbineService
   7 private FactoryService factory;

is equivalent to

   1 runDataService = (RunDataService) TurbineServices.getInstance().getService("RunDataService");
   2 factory = (FactoryService) TurbineServices.getInstance().getService(FactoryService.ROLE);

AvalonComponentService

The AvalonComponentService is the main service container for all Fulcrum Components. We replaced the deprecated Excalibur container with the Fulcrum YAAFI container by default. See YAAFI site for a description of the differences if you use other than the provided Avalon Services with Turbine.

Replace entry in TurbineResources.properties for the AvalonComponentService

services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.ACSYaafiComponentService

with the following entry

services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.TurbineYaafiComponentService

CryptoService

The TurbineCryptoService has been replaced with the Fulcrum Crypto counterpart. The following example shows the default configuration of the CryptoService before and after the migration. For details of the configuration options available see the Fulcrum Crypto Site.

TurbineResources.properties:

services.CryptoService.classname=org.apache.turbine.services.crypto.TurbineCryptoService

# -------------------------------------------------------------------
#
#  C R Y P T O   S E R V I C E
#
# -------------------------------------------------------------------

#
# Standard Unix crypt(3) password encryption.
#
services.CryptoService.algorithm.unix = org.apache.turbine.services.crypto.provider.UnixCrypt
#
# This providers allows access to the Java Message Digest encryption algorithms
#
services.CryptoService.algorithm.java = org.apache.turbine.services.crypto.provider.JavaCrypt
#
# This is a simple, cleartext "encryption" provider.
#
services.CryptoService.algorithm.cleartext = org.apache.turbine.services.crypto.provider.ClearCrypt
#
# Use this provider if you upgrade from Turbine 2.1 to current. It provides bug-to-bug
# compatibility for passwords created with the old Security Service. See the javadocs for
# OldJavaCrypt
#
services.CryptoService.algorithm.oldjava = org.apache.turbine.services.crypto.provider.OldJavaCrypt
#
# This is the default crypto provider. It implements the normal Java MessageDigest ciphers
# You need not to have this, it is the default if no algorithms are given. The default
# provider gives you all the Java MessageDigest Ciphers
#
services.CryptoService.algorithm.default = org.apache.turbine.services.crypto.provider.JavaCrypt

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.crypto.CryptoService"
        shorthand="crypto"
        default-class="org.apache.fulcrum.crypto.DefaultCryptoService"/>

componentConfiguration.xml:

    <crypto>
      <algorithm>
        <unix>org.apache.fulcrum.crypto.provider.UnixCrypt</unix>
        <clear>org.apache.fulcrum.crypto.provider.ClearCrypt</clear>
        <java>org.apache.fulcrum.crypto.provider.JavaCrypt</java>
        <oldjava>org.apache.fulcrum.crypto.provider.OldJavaCrypt</oldjava>
      </algorithm>
    </crypto>

FactoryService

The TurbineFactoryService has been replaced with the Fulcrum Factory counterpart. The following example shows the default configuration of the FactoryService before and after the migration. For details of the configuration options available see the Fulcrum Factory Site.

TurbineResources.properties:

services.FactoryService.classname=org.apache.turbine.services.factory.TurbineFactoryService

# -------------------------------------------------------------------
#
#  F A C T O R Y  S E R V I C E
#
# -------------------------------------------------------------------

# A comma separated list of classloaders (very optional)
#
# Example: org.foo.bar.MyClassLoader, org.ack.joe.YourClassLoader
#
#services.FactoryService.class.loaders=

# Customized factories to be used instead of the default factory.
# E.g. to instantiate XML parsers, SSL sockets, etc., which require
# specific instantiation not supported by the default factory.
# The property name is prefixed with "factory" followed by the
# name of the production class. The value is the class name of
# the factory implementing the Factory interface. The factory
# will be instantiated by using the service itself.
#
# Examples:
#
# services.FactoryService.factory.javax.xml.parsers.DocumentBuilder=org.foo.xml.DomBuilderFactory
# services.FactoryService.factory.javax.xml.parsers.SAXParser=org.foo.xml.SaxParserFactory
# services.FactoryService.factory.java.net.ServerSocket=org.foo.net.SslServerSocketFactory

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.factory.FactoryService"
        shorthand="factory"
        default-class="org.apache.fulcrum.factory.DefaultFactoryService"/>

componentConfiguration.xml:

    <factory/>

PoolService

The TurbinePoolService has been replaced with the Fulcrum Pool counterpart. The following example shows the default configuration of the PoolService before and after the migration. For details of the configuration options available see the Fulcrum Pool Site.

TurbineResources.properties:

services.PoolService.classname=org.apache.turbine.services.pool.TurbinePoolService

# -------------------------------------------------------------------
#
#  P O O L  S E R V I C E
#
# -------------------------------------------------------------------

# Default capacity of pools of the Object pooling service.
#
# Default: 128
services.PoolService.pool.capacity = 128

# Class specific capacities used instead of the default if specified.
#
services.PoolService.pool.capacity.org.apache.turbine.services.rundata.DefaultTurbineRunData=512

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.pool.PoolService"
        shorthand="pool"
        default-class="org.apache.fulcrum.pool.DefaultPoolService"/>

componentConfiguration.xml:

    <pool>
        <capacity>
            <org.apache.turbine.services.rundata.DefaultTurbineRunData>
                512
            </org.apache.turbine.services.rundata.DefaultTurbineRunData>
            <default>
                128
            </default>
        </capacity>
    </pool>

LocalizationService

The TurbineLocalizationService has been replaced with the Fulcrum Localization counterpart. The following example shows the default configuration of the LocalizationService before and after the migration. For details of the configuration options available see the Fulcrum Localization Site.

TurbineResources.properties:

services.LocalizationService.classname=org.apache.turbine.services.localization.TurbineLocalizationService

# -------------------------------------------------------------------
#
#  L O C A L I Z A T I O N  S E R V I C E
#
# -------------------------------------------------------------------

# Default ResourceBundle and language/country codes used by the
# TurbineLocalizationService.
#
locale.default.bundles=your.package.Bundle1,your.package.Bundle2
locale.default.language=en
locale.default.country=US

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.localization.LocalizationService"
        shorthand="localization"
        default-class="org.apache.fulcrum.localization.DefaultLocalizationService"/>

componentConfiguration.xml:

    <localization>
      <bundles locale-default-language="en" locale-default-country="US">
        <bundle>your.package.Bundle1</bundle>
        <bundle>your.package.Bundle1</bundle>
      </bundles>
    </localization>

MimeTypeService

The TurbineMimeTypeService has been replaced with the Fulcrum Mimetype counterpart. The following example shows the default configuration of the MimeTypeService before and after the migration. For details of the configuration options available see the Fulcrum Mimetype Site.

TurbineResources.properties:

services.MimeTypeService.classname=org.apache.turbine.services.mimetype.TurbineMimeTypeService

# -------------------------------------------------------------------
#
#  M I M E T Y P E  S E R V I C E
#
# -------------------------------------------------------------------

# This property specifies a file containing mappings between MIME
# content types and the corresponding file name extensions. The
# service itself contains a hardcoded set of most common mappings.
# The file must use the same syntax as the mime.types file of
# the Apache Server, i.e.
# <mimetype> <ext1> <ext2>...
#
services.MimeTypeService.mime.types=/WEB-INF/conf/mime.types

# This property specifies a file containing mappings between locales
# and the corresponding character encodings. The service itself
# contains a hardcoded set of most common mappings.
# The file should use the Java property file syntax, i.e.
# <lang_country_variant>=<charset>
#
services.MimeTypeService.charsets=/WEB-INF/conf/charset.properties

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.mimetype.MimeTypeService"
        shorthand="mimetype"
        default-class="org.apache.fulcrum.mimetype.DefaultMimeTypeService"/>

componentConfiguration.xml:

    <mimetype
        mimetypes="WEB-INF/conf/mime.types"
        charsets="WEB-INF/conf/charsets.properties" />

GlobalCacheService

The TurbineGlobalCacheService has been replaced with the Fulcrum Cache counterpart. The following example shows the default configuration of the GlobalCacheService before and after the migration. For details of the configuration options available see the Fulcrum Cache Site. Note that the cache check frequency is in seconds now, rather than milliseconds.

TurbineResources.properties:

services.GlobalCacheService.classname=org.apache.turbine.services.cache.TurbineGlobalCacheService

# -------------------------------------------------------------------
#
#  C A C H E   S E R V I C E
#
# -------------------------------------------------------------------

# Interval at which the cache will be checked. The default is
# 5000ms or 5 seconds.

services.GlobalCacheService.cache.check.frequency = 5000

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.cache.GlobalCacheService"
        shorthand="cache"
        default-class="org.apache.fulcrum.cache.impl.DefaultGlobalCacheService"/>

componentConfiguration.xml:

    <cache cacheInitialSize="20" cacheCheckFrequency="5"/>

UploadService

The TurbineUploadService has been replaced with the Fulcrum Upload counterpart. The following example shows the default configuration of the UploadService before and after the migration. For details of the configuration options available see the Fulcrum Upload Site. The automatic option has been moved to the ParserService.

TurbineResources.properties:

services.UploadService.classname=org.apache.turbine.services.upload.TurbineUploadService

# -------------------------------------------------------------------
#
#  U P L O A D  S E R V I C E
#
# -------------------------------------------------------------------

# Whether the files should be automatically picked up by
# ParameterParser.

services.UploadService.automatic=true

#
# The directory where files will be temporarily stored.
#
services.UploadService.repository=./tmp

#
# The maximum size of a request that will be processed.
#
services.UploadService.size.max=1048576

#
# The maximum size of a request that will have it's elements cached in
# memory by TurbineUploadService class.
#
services.UploadService.size.threshold=10240

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.upload.UploadService"
        shorthand="upload"
        default-class="org.apache.fulcrum.upload.DefaultUploadService"/>

componentConfiguration.xml:

    <upload repository="tmp" sizeMax="1048576" sizeThreshold="10240"/>

IntakeService

The TurbineIntakeService has been replaced with the Fulcrum Intake counterpart. The following example shows the default configuration of the IntakeService before and after the migration. For details of the configuration options available see the Fulcrum Intake Site.

TurbineResources.properties:

services.IntakeService.classname=org.apache.turbine.services.intake.TurbineIntakeService

# -------------------------------------------------------------------
#
#  I N T A K E   S E R V I C E
#
# -------------------------------------------------------------------

# The location of the xml file specifying valid inputs
#
# If you need to define multiple definition files, you can
# separate them with commas.
#
# Default: WEB-INF/conf/intake.xml
#
services.IntakeService.xml.path=WEB-INF/conf/intake.xml

# This file is used to cache the XML definitions after they are
# parsed.  It provides for a small performance gain on startup.
#
# Note: Even if you have multiple XML definition files, you will
# only need one serialization file!
#
# Default: WEB-INF/appData.ser
#
services.IntakeService.serialize.path=WEB-INF/appData.ser

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.intake.IntakeService"
        shorthand="intake"
        default-class="org.apache.fulcrum.intake.IntakeServiceImpl"/>

componentConfiguration.xml:

    <intake>
      <serialDataPath>WEB-INF/appData.ser</serialDataPath>
      <xmlPaths>
        <xmlPath>WEB-INF/conf/intake1.xml</xmlPath>
        <xmlPath>WEB-INF/conf/intake2.xml</xmlPath>
      </xmlPaths>
    </intake>

Note that you need to add a namespace declaration to your Intake xml files like this:

<input-data xmlns="http://turbine.apache.org/schema/intake/4.0"
            basePackage="your.base.package.">
    ...

SecurityService

The TorqueSecurityService has been replaced with the Fulcrum Security Components. The following example shows the default configuration of the SecurityService before and after the migration. For details of the configuration options available see the Fulcrum Security Site. Additional information may be found here: 4.0M1 -> 4.0M2: Updating Fulcrum Service as Default.

TurbineResources.properties:

services.SecurityService.classname=org.apache.turbine.services.security.torque.TorqueSecurityService

# -------------------------------------------------------------------
#
#  S E C U R I T Y  S E R V I C E
#
# -------------------------------------------------------------------

#
# This is the class that implements the UserManager interface to
# manage User objects. Default is the UserManager from the
# DBSecurityService.
# Override this setting if you want your User information stored
# on a different medium (LDAP directory is a good example).
#
# Adjust this setting if you change the Setting of the SecurityService class (see above).

# Default: org.apache.turbine.services.security.db.DBUserManager
services.SecurityService.user.manager = org.apache.turbine.services.security.torque.TorqueUserManager

#
# These are the default classes used by the Security Service to
# provide User, Group, Role and Permission objects.
# You want to override this setting only if you want your
# implementation to provide application specific addtional
# functionality.
#
# Class for User. Default: org.apache.turbine.om.security.TurbineUser
services.SecurityService.user.class=org.apache.turbine.services.security.torque.TorqueUser
# Class for Group. Default: org.apache.turbine.om.security.TurbineGroup
services.SecurityService.group.class=org.apache.turbine.services.security.torque.TorqueGroup
# Class for Role. Default: org.apache.turbine.om.security.TurbineRole
services.SecurityService.role.class=org.apache.turbine.services.security.torque.TorqueRole
# Class for Permission. Default: org.apache.turbine.om.security.TurbinePermission
services.SecurityService.permission.class=org.apache.turbine.services.security.torque.TorquePermission

#
# This is the class that implements the ACL interface.
# You want to override this setting only if you want your ACL
# implementation to provide application specific addtional
# functionality.
#

# Default: org.apache.turbine.util.security.TurbineAccessControlList
services.SecurityService.acl.class = org.apache.turbine.util.security.TurbineAccessControlList

#
# This is used by the SecurityService to make the password checking
# secure. When enabled, passwords are transformed by a one-way
# function into a sequence of bytes that is base64 encoded.
# It is impossible to guess the plain-text form of the password
# from the representation. When user logs in, the entered password
# is transformed the same way and then compared with stored value.
#
# Default: false
#

services.SecurityService.secure.passwords=false

#
# This property lets you choose what digest algorithm will be used
# for encrypting passwords. Check documentation of your JRE for
# available algorithms.
#
# Default: SHA
#

services.SecurityService.secure.passwords.algorithm=SHA

New TurbineResources.properties:

services.SecurityService.classname=org.apache.turbine.services.security.DefaultSecurityService

# -------------------------------------------------------------------
#
#  S E C U R I T Y  S E R V I C E
#
# -------------------------------------------------------------------

#
# This is the class that implements the UserManager interface to
# manage User objects. Default is the PassiveUserManager
#
# Adjust this setting if you change the Setting of the SecurityService class (see above).

# Default: org.apache.turbine.services.security.passive.PassiveUserManager
services.SecurityService.user.manager = org.apache.turbine.services.security.DefaultUserManager

roleConfiguration.xml:

    <role
        name="org.apache.torque.avalon.Torque"
        shorthand="torqueService"
        default-class="org.apache.torque.avalon.TorqueComponent"
        early-init="true" />

    <!-- These components belong to the Fulcrum-Security services -->
    <role
        name="org.apache.fulcrum.security.SecurityService"
        shorthand="securityService"
        default-class="org.apache.fulcrum.security.BaseSecurityService"/>

    <role
        name="org.apache.fulcrum.security.UserManager"
        shorthand="userManager"
        early-init="true"
        default-class="org.apache.fulcrum.security.torque.turbine.TorqueTurbineUserManagerImpl"/>

    <role
        name="org.apache.fulcrum.security.GroupManager"
        shorthand="groupManager"
        default-class="org.apache.fulcrum.security.torque.turbine.TorqueTurbineGroupManagerImpl"/>

    <role
        name="org.apache.fulcrum.security.RoleManager"
        shorthand="roleManager"
        default-class="org.apache.fulcrum.security.torque.turbine.TorqueTurbineRoleManagerImpl"/>

    <role
        name="org.apache.fulcrum.security.PermissionManager"
        shorthand="permissionManager"
        default-class="org.apache.fulcrum.security.torque.turbine.TorqueTurbinePermissionManagerImpl"/>

    <role
        name="org.apache.fulcrum.security.ModelManager"
        shorthand="modelManager"
        default-class="org.apache.fulcrum.security.torque.turbine.TorqueTurbineModelManagerImpl"/>

    <role
        name="org.apache.fulcrum.security.authenticator.Authenticator"
        shorthand="authenticator"
        default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"

        <!-- Configured different authenticator for encrypted passwords -->
        <!-- default-class="org.apache.fulcrum.security.authenticator.CryptoAuthenticator" -->
    />

    <role
        name="org.apache.fulcrum.security.model.ACLFactory"
        shorthand="aclFactory"
        default-class="org.apache.fulcrum.security.model.turbine.TurbineACLFactory"/>

componentConfiguration.xml:

    <!-- These components belong to the Fulcrum-Security services -->
    <securityService/>
    <authenticator/>
    <modelManager/>
    <aclFactory/>

    <userManager>
        <className>org.apache.fulcrum.security.torque.om.TorqueTurbineUser</className>
    </userManager>
    <groupManager>
        <className>org.apache.fulcrum.security.torque.om.TorqueTurbineGroup</className>
    </groupManager>
    <roleManager>
        <className>org.apache.fulcrum.security.torque.om.TorqueTurbineRole</className>
    </roleManager>
    <permissionManager>
        <className>org.apache.fulcrum.security.torque.om.TorqueTurbinePermission</className>
    </permissionManager>

    <torqueService>
        <configfile>/WEB-INF/conf/Torque.properties</configfile>
    </torqueService>

SchedulerService

The TurbineSchedulerService has been replaced with different implementations. The old TurbineSchedulerService has been renamed to TorqueSchedulerService (because this is what it always was) and is now deprecated. The recommended implementation now is the QuartzSchedulerService which is based on the Fulcrum Quartz component. The following example shows the default configuration of the SchedulerService before and after the migration. For details of the configuration and persistence options available see the Fulcrum Quartz Site.

TurbineResources.properties:

services.SchedulerService.classname=org.apache.turbine.services.schedule.TurbineSchedulerService

# -------------------------------------------------------------------
#
#  S C H E D U L E R  S E R V I C E
#
# -------------------------------------------------------------------

#
# Set enabled to true to start the scheduler.  The scheduler can be
# stopped and started after Turbine has been intialized.  See the
# javadocs for org.apache.turbine.services.schedule.TurbineScheduler
# for the methods calls.
#
# Default = false
#

services.SchedulerService.enabled=false

# Determines if the scheduler service should be initialized early.  This
# Should always be set to true!!!!

services.SchedulerService.earlyInit=true

New TurbineResources.properties:

services.SchedulerService.classname=org.apache.turbine.services.schedule.QuartzSchedulerService

roleConfiguration.xml:

    <!-- Service required for the QuartzSchedulerService -->
    <role
        name="org.apache.fulcrum.quartz.QuartzScheduler"
        shorthand="quartz"
        default-class="org.apache.fulcrum.quartz.impl.QuartzSchedulerImpl" />

componentConfiguration.xml:

    <!--
        Quartz Scheduler Service

        configuration := contains either a property file or properties (optional)
        configuration/propertyFile := a property file to configure Quartz
        configuration/properties := a set of properties to configure Quartz
        configuration/properties/parameter := a  single configuration
        configuration/properties/parameter@name := the name of the property
        configuration/properties/parameter@value := the value of the property
    -->

    <quartz>
        <configuration>
            <properties>
                <parameter name="org.quartz.scheduler.instanceName" value="TestScheduler"/>
                <parameter name="org.quartz.scheduler.instanceId " value="AUTO"/>
                <parameter name="org.quartz.scheduler.skipUpdateCheck" value="true"/>
                <parameter name="org.quartz.threadPool.class" value="org.quartz.simpl.SimpleThreadPool"/>
                <parameter name="org.quartz.threadPool.threadCount" value="3"/>
                <parameter name="org.quartz.threadPool.threadPriority" value="5"/>
                <parameter name="org.quartz.jobStore.misfireThreshold" value="60000"/>
                <parameter name="org.quartz.jobStore.class" value="org.quartz.simpl.RAMJobStore"/>
                <parameter name="org.quartz.plugin.jobInitializer.class" value="org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin"/>
                <parameter name="org.quartz.plugin.jobInitializer.fileNames" value="quartz.xml"/>
                <parameter name="org.quartz.plugin.jobInitializer.failOnFileNotFound" value="true"/>
                <parameter name="org.quartz.plugin.jobInitializer.scanInterval" value="120"/>
                <parameter name="org.quartz.plugin.jobInitializer.wrapInUserTransaction" value="false"/>
            </properties>
        </configuration>
    </quartz>

The actual configuration of the jobs is delegated to the file quartz.xml or any other persistence mechanism supported by Quartz Scheduler. An example configuration is shown below. By default, the file name quartz.xml must be fully qualified. If the file is not found in the file system, it is being loaded from the class path.

For backward compatibility with legacy scheduled jobs, the following conventions must be met:

quartz.xml:

    <job-scheduling-data xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_2_0.xsd"
                     version="2.0">
    <pre-processing-commands>
        <delete-jobs-in-group>*</delete-jobs-in-group>
        <!-- clear all jobs in scheduler -->
        <delete-triggers-in-group>*</delete-triggers-in-group>
        <!-- clear all triggers in scheduler -->
    </pre-processing-commands>
    <processing-directives>
        <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them -->
        <overwrite-existing-data>true</overwrite-existing-data>
        <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error -->
        <ignore-duplicates>false</ignore-duplicates>
    </processing-directives>
    <schedule>
        <job>
            <name>SimpleJob</name>
            <group>TURBINE</group>
            <description>A simple job</description>
            <job-class>org.apache.turbine.services.schedule.JobEntryQuartz</job-class>
        </job>
        <trigger>
            <simple>
                <!-- define a simple trigger firing every ten seconds -->
                <name>simpleTrigger</name>
                <group>TURBINE</group>
                <job-name>SimpleJob</job-name>
                <job-group>TURBINE</job-group>
                <start-time>2015-01-01T00:00:00</start-time>
                <misfire-instruction>MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT</misfire-instruction>
                <repeat-count>-1</repeat-count>
                <repeat-interval>1000</repeat-interval>
            </simple>
        </trigger>
    </schedule>
    </job-scheduling-data>

Added Components

ParserService

The different parser types (ParameterParser, CookieParser etc) as used in Turbine 2.3.3 are now being managed by a separate component called ParserService. The component provides initialized parser objects and manages them in a pool. The following example shows the default configuration of the parsers before and after the migration. For details of the configuration options available see the Fulcrum Parser Site.

Note: One of the main changes in the code of your Turbine modules probably is the replacement of org.apache.turbine.util.parser.ParameterParser with org.apache.fulcrum.parser.ParameterParser.

TurbineResources.properties:

services.RunDataService.default.parameter.parser=org.apache.turbine.util.parser.DefaultParameterParser
services.RunDataService.default.cookie.parser=org.apache.turbine.util.parser.DefaultCookieParser

#--------------------------------------------------------------------
#
# P A R A M E T E R  P A R S E R
#
#--------------------------------------------------------------------
#
# This variable controls the case folding applied to URL variable
# names.
#
# Allowed values: none, lower, upper
# Default: lower
#

url.case.folding=lower

New TurbineResources.properties:

services.RunDataService.default.parameter.parser=org.apache.fulcrum.parser.DefaultParameterParser
services.RunDataService.default.cookie.parser=org.apache.fulcrum.parser.DefaultCookieParser

roleConfiguration.xml:

    <role
        name="org.apache.fulcrum.parser.ParserService"
        shorthand="parser"
        default-class="org.apache.fulcrum.parser.DefaultParserService"/>

componentConfiguration.xml:

    <parser>
        <urlCaseFolding>lower</urlCaseFolding>
        <parameterEncoding>utf-8</parameterEncoding>
        <automaticUpload>true</automaticUpload>
    </parser>

Further Modifications

Add Pipeline Configuration

Turbine 4.0 comes with the feature to modify the processing sequence of modules during a request using the so-called pipeline. This can be configured in the file turbine-classic-pipeline.xml. The file actually used can be modified in TurbineResources.properties. The default content of turbine-classic-pipeline.xml as shown below models the way Turbine 2.3.3 used to handle requests. Place this file into WEB-INF/conf.

<?xml version="1.0" encoding="UTF-8"?>
<org.apache.turbine.pipeline.TurbinePipeline>
  <valves>
    <org.apache.turbine.pipeline.DetermineActionValve/>
    <org.apache.turbine.pipeline.DetermineTargetValve/>
    <org.apache.turbine.pipeline.DefaultSessionTimeoutValve/>
    <org.apache.turbine.pipeline.DefaultLoginValve/>
    <org.apache.turbine.pipeline.DefaultSessionValidationValve/>
    <org.apache.turbine.pipeline.DefaultACLCreationValve/>
    <org.apache.turbine.pipeline.ExecutePageValve/>
    <org.apache.turbine.pipeline.CleanUpValve/>
    <org.apache.turbine.pipeline.DetermineRedirectRequestedValve/>
  </valves>
</org.apache.turbine.pipeline.TurbinePipeline>

Replace Imports

Actually Modify Code

Turbine4/Turbine4.0M1/Migrate233 (last edited 2016-09-04 15:56:47 by ThomasVandahl)