Aim: Write a utility to convert one container configuration file into another. eg: ECM roles/xconf -> Fortress roles/xconf ECM roles/xconf -> Merlin xinfo/xconfig Fortress roles/xconf -> Merlin xinfo/xconfig etc. Design: Create a middle format and define an interface for converting to and from it, add implementations for each container type and use one of these 'modules' as input, one as output. Create a utility for calling this structure, and an ant task. In the future perhaps build the support into the meta package to allow all 'meta' based containers to use any other containers config files. Container particulars: ECM roles/xconf: role format specifies: o role name o implementation class o shorthand name (for configuration purposes) configuration file specifies: o configuration details o logger o implementation class (optional, overrides role specified class) configuration file is either indexed via shorthand or 'component' tag. Fortress roles/xconf: role format specifies: o same as ECM plus component handler name (different attribute names though) configuration file specifies o same as ECM Merlin xinfo/xconfig: xinfo specifies component meta information xconfig specifies default configuration Prospective Solution: Use meta Type class as middle format. Write conversion modules to convert from concrete container role/config formats to and from Type. ECM: Type placeholder roles role name service-ref default or overridden class name implementation key (base filename) shorthand name component name xconf logger logger definition configuration ?? Fortress roles role name service-ref default or overriden class name implementation key (base filename) shorthand name component name handler component handler attribute xconf logger logger definition configuration ?? Merlin xinfo full Type meta info meta info as normal (need filename as implementation key?) xprofile configuration ?? Conversion process to and from Type: ECM : each role definition equates to a Type Fortress : each role definition equates to a Type Merlin : each .xinfo equates to a Type Each Type object can potentially be converted to 1-N role definitions due to each Type having 1-N service-refs. Usage: java converter --input : --output : where == ecm|fortress|merlin|class-name == : separated values applicable to the specified Examples: java converter --input ecm:file.roles:file.xconf --output merlin:directory java converter --input ecm:file.roles:file.xconf --output fortress:file.roles:file.xconf java converter --input merlin:jarfile --output fortress:file.roles:file.xconf java converter --input fortress:file.roles:file.xconf --output merlin:directory (ant task will also be written). Interfaces: /** * module interface for creating an array of Type[] objects from an input * context, and similarly serializing an array of Type[] objects to a * context. */ public interface Module { Type[] generate(String context) throws Exception; void serialize(Type[] model, String context) throws Exception; } (REVISIT: may need to change generate/serialize to work with a custom object that holds Type's along with the particular objects default configuration?).