Dear Wiki user, You have subscribed to a wiki page or wiki category on "Turbine Wiki" for change notification.
The "Turbine4/Turbine4.0M1/Migrate233" page has been changed by ThomasVandahl: https://wiki.apache.org/turbine/Turbine4/Turbine4.0M1/Migrate233?action=diff&rev1=17&rev2=18 === SecurityService === - The !TurbineSecurityService has been replaced with the [[http://turbine.apache.org/fulcrum/fulcrum-security/index.html|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 [[http://turbine.apache.org/fulcrum/fulcrum-security/index.html|Fulcrum Security Site]]. + The !TorqueSecurityService has been replaced with the [[http://turbine.apache.org/fulcrum/fulcrum-security/index.html|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 [[http://turbine.apache.org/fulcrum/fulcrum-security/index.html|Fulcrum Security Site]]. `TurbineResources.properties`: @@ -592, +592 @@ <role name="org.apache.fulcrum.security.authenticator.Authenticator" shorthand="authenticator" - default-class="org.apache.fulcrum.security.authenticator.TextMatchAuthenticator"/> + 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" @@ -625, +629 @@ <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 [[http://turbine.apache.org/fulcrum/fulcrum-quartz/|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 [[http://turbine.apache.org/fulcrum/fulcrum-quartz/|Fulcrum Quartz Site]]. + + `TurbineResources.properties`: + + {{{#!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 + }}} + + `roleConfiguration.xml`: + + {{{#!xml + <!-- Service required for the QuartzSchedulerService --> + <role + name="org.apache.fulcrum.quartz.QuartzScheduler" + shorthand="quartz" + default-class="org.apache.fulcrum.quartz.impl.QuartzSchedulerImpl" /> + }}} + + New `TurbineResources.properties`: + + {{{#!properties + services.SchedulerService.classname=org.apache.turbine.services.schedule.QuartzSchedulerService + }}} + + `componentConfiguration.xml`: + + {{{#!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="/WEB-INF/conf/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 [[http://www.quartz-scheduler.org/|Quartz Scheduler]]. An example configuration is shown below. + For backward compatibility with legacy scheduled jobs, the following conventions must be met: + * the simple module name of the scheduled job must be placed into the ´<name></name>´ tag + * the job group must be `TURBINE` + * the job-class must be `org.apache.turbine.services.schedule.JobEntryQuartz` + + `quartz.xml`: + + {{{#!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 == --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
