Init and Destroy Steps  Locate

WSO2 SOA Enablement Server initializing and destroying is managed with the org.systinet.wasp.Wasp class. The meaning of the initial arguments that can be passed to the init method are described in the section System Properties in the WSO2 SOA Enablement Server Configuration chapter.

During initialization, WSO2 SOA Enablement Server goes through the following steps:

  1. Reads system properties - Sets all WSO2 SOA Enablement Server system properties as initial arguments if they are not set already.

  2. Reads default settings - Loads META-INF/wasp.properties resource from classpath (lib/runner.jar in the WSO2 SOA Enablement Server distribution) and sets these properties as initial arguments if they are not set already.

  3. Reads built-in settings - Sets initial arguments with its built-in default value if they are not set already.

  4. Creates implementation classloader - If the wasp.impl.classpath is set, a new classloader is created for the WSO2 SOA Enablement Server implementation. This classloader is a child of the current classloader interface (where the org.systinet.wasp.Wasp class is loaded).

    If the implementation classpath was not set, then the implementation classloader is the same as the interface classloader.

  5. Loads implementation class - The wasp.impl.class argument specifies implementation of the org.systinet.wasp.Wasp. This class is loaded in the implementation classloader and its new instance is created.

  6. Initialization - Init is called on the instance of the implementation class. The instance registers itself as org.systinet.wasp.Wasp in WSO2 SOA Enablement Server org.idoox.wasp.Context , a repository of singleton implementations. If it is the default WSO2 SOA Enablement Server implementation class (com.systinet.wasp.WaspImpl), it loads the configuration and all the modules listed in the configuration file.

    The main differences between server configuration (conf/serverconf.xml and client configuration (conf/clientconf.xml) is that client configuration does not preload transports.

When WSO2 SOA Enablement Server is being shut down, it goes through these steps:

  1. Shuts down - The instance of the implementation class is obtained from the WSO2 SOA Enablement Server org.idoox.wasp.Context , and its destroy() method is called. If its default WSO2 SOA Enablement Server implementation class is com.systinet.wasp.WaspImpl, it destroys all loaded modules and saves the configuration if it was changed at runtime.