Announcement Announcement Module
No announcement yet.
Help with configuration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with configuration


    Question 1:
    I have a configuration like this

    <sftp:outbound-channel-adapter channel="sendChannel"
    session-factory="sftpSessionFactory" id="sftpInboundAdapter"
    temporary-file-suffix = "temp"
    remote-directory="xxxxxx" />
    I would like to set the value of remote directory at run time.I am not sure how to do this.For the hostname,username and password I'm using setProperties through the class.

    Also, Is there an option to configure the outbound channel adapter through the class than through the xml config file.

    Please help.

    Question 2:

    <int:inbound-channel-adapter id="inboundAdapter" expression="new'xxxxxx').listFiles()" >

    For the above expression, if I have to specify the<directory name>) in the properties file and then access it.Can I use PropertyPlaceholderConfigurer for this option.

    Please help me with this.


  • #2

    I can answer you for second question:
    HTML Code:
    <inbound-channel-adapter expression="new'${dirName}').listFiles()">
    About first question: need more time to think.

    Nevertheless, it will be more flexible to start new forum thread only with one question and in the subject reflect the problem.

    Good luck!



    • #3
      Thank you so much for the response.

      Please correct me if I'm wrong .specifying dirname in the properties file should substitute the value here, but should I configure the name of the properties file through the PropertiesPlaceConfigurer.

      Sure,will use separate threads.Since both where respect to configuration I used one thread.



      • #4
        specifying dirname in the properties file should substitute the value here
        Yes, it is. In the properties you configure e.g.: dirName=C:\Windows

        but should I configure the name of the properties file through the PropertiesPlaceConfigurer
        Not sure what do you mean, but I configure my placeholder like this:
        HTML Code:
        <util:properties id="mailProperties" location="classpath:/"/>
        <context:property-placeholder properties-ref="mailProperties" location="classpath*:**/"/>


        • #5
          Just for my understanding...
          The first line gives the location of referred by the id "mailProperties"

          and in the second line we refer to id mailProperties but can you also please tell what is the location in the second line indicate.



          • #6
            I've shown you the abilities of <contextroperty-placeholder/>.
            In the end both properties object will be merged on the background and you can use placeholders for properties from both files.
            For more info, please, read this one:


            • #7
              Thanks very much for the help.