Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Files from Ejb

 
Angelino Dolce
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
One of the restrictions of EJB is:
------------------------------------------------------------------------
An enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
------------------------------------------------------------------------
But i've the necessity of writing temporarily a file on disc,reread it and then cancel. What is a recommended solution for this problem?
Thank You very much!
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a DAO with your EJBs. The access of files can be delicated to the DAO and thus, the EJBs will not encounter any I/O operations.

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic