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

    Component configuration

    objectiser

      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?

       

      Regards

      Gary

        • 1. Re: Component configuration
          mageshbk

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

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

           

          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
            objectiser

            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
              kcbabo

              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.

              • 4. Re: Component configuration
                objectiser

                Sounds like a better approach - created jira: https://issues.jboss.org/browse/SWITCHYARD-384

                • 5. Re: Component configuration
                  dward

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