Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
titleSample using get-service.i
DEFINE VARIABLE oSettingsService AS Consultingwerk.Framework.ISettingsService NO-UNDO .
oSettingsService = {Consultingwerk/get-service.i Consultingwerk.Framework.ISettingsService} .


The get-service.i Include file uses the Progress.Lang.Class:GetClass() method up to OpenEdge 11.3 and the GET-CLASS function from OpenEdge 11.4 on. For this reason it is required to pass the full type name (not relying on any USING statement) up to OpenEdge 11.3. 

Adding Services to the Service Container


Code Block
titleSample loading Services from services.xml using ServiceLoader
USING Consultingwerk.Framework.* FROM PROPATH .

/* Load services using ServiceLoader */
DEFINE VARIABLE oLoader AS ServiceLoader NO-UNDO .
oLoader = NEW ServiceLoader () .
oLoader:Load ("Consultingwerk/SmartComponentsDemo/CustomerExplorer/services.xml":U) .  


The services.xml file has the following form: 

Code Block
titleSample services.xml file
<?xml version="1.0"?>
<ttServiceLoader xmlns:xsi="">



At first request through IServiceCreator callback

Planned feature, see SCL-573.

In a future enhancemet we will implement a callback to a factory class to support lazy loading of services or loading of services with specific constructor parametersSee IServiceCreator factories to create Service instances at first usage for detailled instructions.

Related documentation