5 Replies Latest reply on Aug 29, 2011 4:54 PM by David Ward

    Component configuration

    Gary Brown Master

      Is there a best practice for how a switchyard component's configuration should be provided, to be agnostic whether running in AS6 or 7? I guess most components are just configured by the information contained in the switchyard descriptor - but if the component also requires additional (global) configuration details, how should they be provided?


      For example, riftsaw has a property file and datasource config - just wondering where they should be placed?




        • 1. Re: Component configuration
          Magesh Bojan Master

          Very good question. I see for AS7 these can be placed in the configurations like standalone.xml

          <module identifier="org.switchyard.component.soap">
                  <property name="defaultContextPath" value="swydws">
                  <property name="defaultServerPort" value="18001">


          I am not sure about AS6 though.


          Another question that arises is how will we transfer these properties to the components? Will it be via the Activator?

          • 2. Re: Component configuration
            Gary Brown Master

            We could simply inject a Properties object into the Activator prior to calling init. If AS7, then these would be derived from the module properties, and if AS6, possibly it could simply search for a file named <module-id>.properties?

            • 3. Re: Component configuration
              Keith Babo Master

              I agree that we need a configuration capability for components that is independent of a single deployment.  Actviators are currently picked up only at deployment-time.  When an application is deployed, we scan for available activators and deploy the application.  We need to change this so that components are picked up at boot time.  This may include replacing the current ServiceLoader approach to scanning for activators with a mechanism where the list of available activators is passed into the deployer.  This would allow the list of components and their configuration to be supplied separately.  In AS7, it would be part of the switchyard subsystem configuration in standalone.xml.  For OSGi, it could come from a combination of ConfigAdmin and a registry scan for activator instances.


              With the above in mind, it might make sense to have an interface separate from Activator for handling this type of configuration.  Activator was meant to handle deployment activity, whereas what we are discussing now is more of a static configuration for the component runtime.

              • 5. Re: Component configuration
                David Ward Master

                I've started a more expansive discussion thread on this topic here: Runtime Environment / Configuration.