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?
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?
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.