This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Since I cannot use the java.io package to first create a text file on the EJB server machine, what should I do?
Just one small correction: of course you can. Generally speaking you can do whatever your jvm and the java language will allow you to do. The problem is that this is not a recommended practice, mostly because the EJB container was designed to provide middleware services. From a transactional system point of view, having a business process operating a disc file is not acceptable. The EJB container is not a solution to every software problem, but only to some of them. Can you provide more details about the problem you�re wrestling with? Regards.
I think, therefore I exist -- Rene Descartes
Joined: Aug 01, 2001
I have to export some data from a database into a text file, on a FTP server. I was first thinking of producing a text file in the EJB Container and then FTP it on the FTP server. But now I think I could read the data from the database and then append it directly in the file on the FTP server, without producing an intermediary text file. Would this be OK?
Joined: Feb 17, 2005
Just my thoughts. From a technical point of view, yes it might be ok. It might work and the data will be transferred to the destination via FTP. On the other hand, from a designing point of view it might not. The problem you�re solving looks mostly like a batch process than a business use case. Your task could be implemented without the need of any web server or ejb container. How about a simple java application? Ultimately you can write a shell script and schedule a cron job if your task needs to run periodically. Is there any particular reason enforcing your task to run within the EJB container? Regards.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com