I have found some tips on how to create .esb archive deployment dynamically in JBoss Esb sources (LogicalEPRUnitTest DeploymentArchive classes) but does anybody knows a way to make same features included in ESBConfigEditor which is a Flash Application.
We would like to generate an jboss esb configuration using jboss api.
Thanks if you have any idea on how to make it.
I believe that the flash editor just posts the configs to a servlet which writes them out to disk and lets the deployment scanner pick them up. Might I suggest reverse-engineering the config domain model by running the XSD through JIBX' Xsd2Jibx and filling out the generated java classes with enough business logic to suit your needs. Then you can programmatically construct an ESB config in java and marshal it out to a file in the deploy dir.
I seem to recall that a deficiency in Xsd2Jibx, coupled with what appeared to be an incomplete refactoring of the ESB XSD (somewhere around the fs-bus definition, IIRC) gave me some trouble, but eventually i got a fully functional java class model for the ESB config. We intend to use it to make changes to ESB File gateways on the fly.
yes, your work seem to be quite similar to what we would like to do.
by the way, I have build a configuration (jboss-esb.xml working) using jboss java api.
at the end, I have the exact representation of my configuration in a JbossesbDocument object.
I have used :
JbossesbDocument esbConfig = JbossesbDocument.Factory.newInstance();
Jbossesb newEsbConfig = esbConfig.addNewJbossesb();
.... done all the rest of configuration, providers, services, listener, queue, actions..
But now, how do I serialize this configuration as a valid jboss-esb.xml file, because until now, it is not working, xml generated is different from jboss one.
Thanks if you have any ideas.
Using JAXB and esb jboss schema we have done it with some customization for jaxb class generation. If someone need some help, contact me.