4 Replies Latest reply on Jan 27, 2009 7:26 AM by darul

    dynamic esb configuration creation and live edition

    darul Newbie

      hello,

      we have decided to use jboss esb solution to create a platform in which we could deploy services exposed via esb architecture.

      questions are :

      will it be possible to dynamically generate esb configuration via your API
      or are we forced to create a .esb file ?

      if so, is there an easy way to create .esb archive programmaticaly.

      and

      if after, may it be possible to edit in runtime content of our esb, to remove, add a service for example ?

      thanks in advance

        • 1. Re: dynamic esb configuration creation and live edition
          darul Newbie

          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.

          • 2. Re: dynamic esb configuration creation and live edition
            Ryan Hochstetler Newbie

            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.

            • 3. Re: dynamic esb configuration creation and live edition
              darul Newbie

              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.

              • 4. Re: dynamic esb configuration creation and live edition
                darul Newbie

                Using JAXB and esb jboss schema we have done it with some customization for jaxb class generation. If someone need some help, contact me.