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

  • Help with configuration

    Hi,

    Question 1:
    I have a configuration like this

    <sftp:outbound-channel-adapter channel="sendChannel"
    session-factory="sftpSessionFactory" id="sftpInboundAdapter"
    auto-create-directory="true"
    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 java.io.File('xxxxxx').listFiles()" >

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

    Please help me with this.

    Thanks

  • #2
    Hello

    I can answer you for second question:
    HTML Code:
    <inbound-channel-adapter expression="new java.io.File('${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!

    Artem

    Comment


    • #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.

      Thanks

      Comment


      • #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:/mail.properties"/>
        <context:property-placeholder properties-ref="mailProperties" location="classpath*:**/mail-password.properties"/>

        Comment


        • #5
          Just for my understanding...
          The first line gives the location of mail.properties 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.

          Thanks.

          Comment


          • #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: http://static.springsource.org/sprin...lderconfigurer

            Comment


            • #7
              Thanks very much for the help.

              Comment

              Working...
              X