4 Replies Latest reply on Jul 29, 2009 1:55 AM by arjunpnair

    Runtime parameters to providers in jboss-esb.xml file

      Hi All,

      I want to know whether is it possible to pass parameters to "Provider" configuration in jboss-esb.xml at runtime. Something like given below.

      <ftp-provider name="FTPProvider"
       hostname="localhost">
       <ftp-bus busid="FTPProviderbusid">
       <ftp-message-filter username="root"
       password="root"
       passive="false" directory="/Source/"
       input-suffix=".xml"
       work-suffix=".esbInprocess"
       post-delete="false"
       post-suffix=".COMPLETED"
       error-delete="false"
       error-suffix=".HAS_ERROR" />
       </ftp-bus>
       </ftp-provider>


      I want to change the values of hostname, username and password at runtime. i don't want to hard code those values;instead some place holders kind of..

      Regards,
      Arjun

        • 1. Re: Runtime parameters to providers in jboss-esb.xml file
          kconner

          You can substitute any system property into the jboss-esb.xml by using the same notation supported by the app server, for example swapping hostname for ${jboss.esb.bind.address} will cause it to use the IP address to which the server has bound.

          Kev

          • 2. Re: Runtime parameters to providers in jboss-esb.xml file

            Hi Kevin,

            Thanks for your reply.

            However needed few more clarification.

            1) Is there a way to use "${variable_name}" while binding to a remote host.
            For example, if my FTP server is running locally then i will be using the variable which you have specified. But what will i be using in case of a remote FTP server.

            2) My whole idea is that i want to pass user defined variables (like dynamically passing user credentials) to jboss-esb.xml file.

            Thanks in Advance,
            Arjun

            • 3. Re: Runtime parameters to providers in jboss-esb.xml file
              kconner

              Sorry, I'm not sure what difference you see in the remote/local FTP server scenarios, can you please expand on this?

              At present the variables are substituted when the esb artifact is deployed into the server.

              Kev

              • 4. Re: Runtime parameters to providers in jboss-esb.xml file

                Hi Kevin,

                What iam trying to ask is as follows.

                Suppose my JBoss AS(ESB) is running in a machine having ip x.x.x.1 and my FTP server is running in x.x.x.2 machine. In this case i can't use the substitution variable which you told (${jboss.esb.bind.address}) for FTP provider. Is there any alternative way of doing this like configuring this in a prooperty file and access it from jboss-esb.xml.

                Hope you understood my query.

                Thanks in Advance,
                Arjun