0 Replies Latest reply on Jan 29, 2012 1:36 AM by Ilia Ternovykh

    Download file from HTTP server (as stream) from EJB

    Ilia Ternovykh Newbie

      Hi.

       

      I need to download some external file from http server periodically for further processing. I'm triggering the process using stateless session bean with @Schedule annotation on some method. Let's say method name is foo()

       

      When TimerService invokes foo() I need to download file by URI from external http/ftp server, and pass it as stream into some long running processing logic. This is done once a day (maybe twice) and in automatical mode.

       

      What is the best pattern or best practice to implement this using JBoss AS? Am I right with @Schedule annotation (or Quartz resource adapter)? What is the best practice of downloading file for further processing inside EJB?

       

      Thanks!