1 Reply Latest reply on Sep 7, 2006 3:23 PM by Kapil Anand

    Building mutiple MDB deployments using xdoclet

    Kapil Anand Newbie

      hi I have an MDBean code that will run with multiple JMS destinations. The way to do this with xdoclet is to call xdoclet multiple times with different values of environment properties and use those environment properties to define the bean name, jms destination name, xdoclet-output-destination etc.

      But I do not know how this could be done in JBoss Eclipse IDE.
      One way I could do is to customize xdoclet-build.xml and create one build.xml for each MDB and then run them as Ant builds.

      But this has two side effects:
      1) The target (generation) folders are not auto-refreshed in eclipse
      2) These xdoclet-build.xml cannot be reused from a command line build.xml, that builds the whole product. Perhaps I could separate out the xdoclet target in another build.xml that could be included in other build.xml and target invoked with different set of properties. I am not sure if that would work. (Would have worked with an ANT macro).

      Please let me know if you have any bright ideas.


        • 1. Re: Building mutiple MDB deployments using xdoclet
          Kapil Anand Newbie

          Here is what I finally did to make it work.

          Edited the xdoclet-build.xml generated by JBossEclipseIDE.
          Added multiple antcall tasks inside "_xdoclet_generation_" target, to call runEjbDoclet target with different params.
          (runEjbDoclet was originally called Nxxxxx in the auto-generated xml, where x is a digit)

          <param name="mdb_display_name"value="MyMDBName"/>

          Used destDir="${ejb_gen_dest}" in ejbdoclet task called by runEjbDoclet.

          Used the following xdoclet entries in the Bean class.
          * @ejb.bean name="${mdb_name}"
          * display-name="${mdb_display_name}"
          * description="${mdb_description}"
          * destination-type="${jms_dest_type}"
          * acknowledge-mode="Auto-acknowledge"
          * transaction-type="Container"
          * @ejb:env-entry name="SSBToUse" type="java.lang.String"
          * value="${SSB1_jndi_name}"
          * @jboss.destination-jndi-name name = "${jms_dest_name}"