ESB configuration
slaboure Nov 25, 2006 3:48 PMHello,
Part II of my discussion with MarkL: the configuration of the ESB.
Today, it seems that most of the behaviour is wrapped inside an EAR and that some configuration parameters are set at the JVM level using some System Properties put in the conf directory.
However, it is extremly easy and much more convenient to put these parameters inside MBean attributes i.e. setup an MBean per object to be configured and put these MBean definitions inside the SAR file of it corresponding class files. ALSO, most of the additional behaviour (like setting up a transformation, etc.) could be done as part of a specific MBean instead of relying on custom code/script. Such MBean definitions could be put in sample files in the /deploy directory (all entries would be commented/disabled) so that setting up a new ESB behaviour could be done in a very efficient way without relying too much on the documentation: just follow the examples. It is worth mentionning that MBean properties are not limited to primitive type: they can be any XML snippet. The new Microcontainer provides further improved features in that regard.
Also, in order to make it easy for developers to change the default behaviour, it would certainly be usefull to use "unpacked SAR" i.e. do not put the JARs and their corresponding META-INF/jboss-services.xml file in a SAR file but, instead, but them in a xxx.sar DIRECTORY: that way any configuration item can be changed without having to go through an unpack-repack cycle of the archive.
Concerning the MBeans, it would certainly be usefull to provide both a POJO and a related MBean: that way, the same code could be re-used both to work on the microkernel and the new microcontainer.
A side effect of this is that you could setup two completely different ESB bus as part of the same JVM: they would not have to share their configuration (i.e. System Properties) anymore (i.e. JVM-wide vs. MBean-wide).
I would be surprised if any of the ESB configuration would be restricted to code: most behaviours should be available as an MBean definition/POJO API that would cover the public API of the ESB.
Cheers,
Sacha