Discussions

EJB programming & troubleshooting: File i/o in ejb

  1. File i/o in ejb (4 messages)

    I have a requirement that I have to use file i/o to write in a ftp from my stateless ejb.How can I achieve it.Ejb spec dont allow to use file i/o .

    Threaded Messages (4)

  2. Re: File i/o in ejb[ Go to top ]

    Hi Rakesh; Ejb spec dont allow to use file I/O.. sounds interesting. Can you code a sample and deploy and just try what happens? Whether the spec is preventing the I/O thingy..
  3. Re: File i/o in ejb[ Go to top ]

    Hi Rakesh;
    Ejb spec dont allow to use file I/O.. sounds interesting.
    Can you code a sample and deploy and just try what happens?
    Whether the spec is preventing the I/O thingy..
    Specs would not prevent file IO. But you might run into problems later on without realizing what exactly causing it. To answer the original question, Thats what delegators are for.
  4. Just a few ideas[ Go to top ]

    Would an FTP library work - i.e. write out using the FTP protocol rather than using a file? There is a an article here that could provide some inspiration... http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html I notice here they mention there is a Jakarta commons library which could be useful. Or perhaps host a webservice to do it and call that? Or use webdav? Hope this helps. Good luck. Ben http://www.benwilcock.net
  5. Re: File i/o in ejb[ Go to top ]

    I don't think EJB prevents File I/O things, but you should be very caution about Transaction, because file i/o things does not support transaction.