Announcement Announcement Module
Collapse
No announcement yet.
SFTP inbound-channel-adapter output directory location relative to webapplication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SFTP inbound-channel-adapter output directory location relative to webapplication

    I have my inbound channel adapter configuration as below:
    Code:
     <int-sftp:inbound-channel-adapter id="ftpInbound"
      								  session-factory="sftpSessionFactory"	
      								  channel="ftpChannel"
      								  filename-pattern="*.zip"
      								  remote-directory="report/"
      								  local-directory="file:output"
      								  auto-create-local-directory="true"
      								  delete-remote-files="false"
      								  auto-startup="true"
    ON a Mac deploying it as a Spring MVC Application I am able to see the log saying me that the download is complete

    Code:
    13:12:49.204 [task-scheduler-1] DEBUG o.s.i.f.FileReadingMessageSource - Added to queue: [output/Reporting_data_20120925135652.csv.zip]
    13:12:49.214 [task-scheduler-1] INFO  o.s.i.f.FileReadingMessageSource - Created message: [[Payload=output/Reporting_data_20120925135652.csv.zip][Headers={timestamp=1348924069214, id=e1670a23-e71a-4035-a1d5-fcf7881d07f9}]]
    13:12:49.214 [task-scheduler-1] DEBUG o.s.i.e.SourcePollingChannelAdapter - Poll resulted in Message: [Payload=output/Reporting_data_20120925135652.csv.zip][Headers={timestamp=1348924069214, id=e1670a23-e71a-4035-a1d5-fcf7881d07f9}]
    13:12:49.214 [task-scheduler-1] DEBUG o.s.i.c.QueueChannel - preSend on channel 'ftpChannel', message: [Payload=output/Reporting_data_20120925135652.csv.zip][Headers={timestamp=1348924069214, id=e1670a23-e71a-4035-a1d5-fcf7881d07f9}]
    13:12:49.214 [task-scheduler-1] DEBUG o.s.i.c.QueueChannel - postSend (sent=true) on channel 'ftpChannel', message: [Payload=output/Reporting_20120925135652.csv.zip][Headers={timestamp=1348924069214, id=e1670a23-e71a-4035-a1d5-fcf7881d07f9}]
    But unable to locate my output directory.
    Question 1: where do I find my output directory - that has been created when running it on tomcat from eclipse

    Question 2: As the local-directory is a URL how do I have the output generated in my WEB-INF of my web application using a relative URL ? This would enable a relative path to my application & would allow me to download the file using a request Dispatcher to the resource.

    Question 3: will the SFTP Adapter Thread die along with the servletContext when the servletcontext is removed from the Tomcat/jboss container.

    Thanx in advance for all the support rendered
    Last edited by ramalingam; Sep 29th, 2012, 10:18 AM. Reason: Tags to be added
Working...
X