You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Apache Wiki <wi...@apache.org> on 2016/01/07 13:27:03 UTC

[Turbine Wiki] Update of "Turbine4/Turbine4.0M1/Migrate233" by ThomasVandahl

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=14&rev2=15

  
  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.
  
- '''Note:''' Most of the static Service Accessor classes have been removed. They need to be replaced by explicit lookups.
+ === 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 [[http://turbine.apache.org/turbine/turbine-4.0-M2/howto/annotations.html|Annotations Howto]] for details. Short example:
+ {{{#!java
+ // Explicit service name
+ @TurbineService( "RunDataService" )
+ private RunDataService runDataService;
+ 
+ // Implicit SERVICE_NAME or ROLE
+ @TurbineService
+ private FactoryService factory;
+ }}}
+ is equivalent to
+ {{{#!java
+ runDataService = (RunDataService) TurbineServices.getInstance().getService("RunDataService");
+ factory = (FactoryService) TurbineServices.getInstance().getService(FactoryService.ROLE);
+ }}}
  
  === AvalonComponentService ===
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org