Programmatic deployment--Redux
weston.price Nov 21, 2006 5:32 AMFinally have been able to get back on this. I have been looking at the new Deployer framework and the *-ds.xml deployer is a unique case in that it falls somewhere in the middle of an ObjectModelFactoryDeployer and a JaxpDeployer. Effectively there are two steps
1) parse the *-ds.xml
2) generate the metadata (somehow)
I have a working model of the new DsParserDeployer and the new DsDeployer. While it's not too bad, I just get the feeling that something is wrong. Don't know why, but it just seems like a lot of useless work for the following reasons:
a) The parsing
While I am no fan of JBossXB, I am equally reluctant to use straight JAXP for the otherwise mindless task of databinding. The initial implementation was written with JBossXB and I have started on a DsParser that uses straight JAXP to parse the *-ds.xml file. Neither seem ideal to me. This is just one of those tasks that I think other tools can handle better. I
b)The *-ds.xml format
While compatiblity is important, I don't see why we can't keep the XSLDeployer and with JBoss5 release a new deployment format fo MCF's...call it *-dsx.xml. We could generate a schema and get rid of stuff like arbitrary MBean definitions that make the parsing more complex that what it really needs to be. Further, with an XSD it would open up other options as to the binding rather than having to contend with a DTD that quite frankly none of us are all that dilligent in updating.
c)
The MBean generation. This actually isn't so bad after I looked at the new stuff. However, with the *-ds.xml format there is always the MBean stuff to contend with. Clearly we are going to replace this with MC at some point, but for now, it's still annoying.
So..my proposal
Chuck this mess. Write an XSD, lock it down and use *some* binding framework to generate the meta data and do the binding. Otherwise I don't see anyway around the ugliness that's going to be associated with either maintaining the JBossXB factory or the JAXP parsinng code. Once we start going down that path (actually have gone down it twice now) the code becomes no more maintainable that the XSL, in fact, I would argue that it's worse, solely for the fact that if a property needs to be added to the *-ds.xml file suddenly it has to chage in
1) The parser (JBossXB or JAXP)
2) The metadata
3) The JCA object itself (Pool, CM)