EJB programming & troubleshooting: File i/o in ejb
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 .
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..
Hi Rakesh;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.
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..
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
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.