This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileReader is allowed in EJB?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All, it says : FileWriter is legal but not portable in EJB, what about FileReader is legal? is portable?
Why FileWriter is not portable? just create a file and save some data or log in the local directory, not a big deal.
Thanks.
Edward
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean by portable? Can you be more specific.
 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my understanding, "portable" means, the EJB jar file can move easily from one type of server to another type ,from one database to another one, from one OS to another OS, with the minimum of modification of coding.
Am I right?
Thanks
Edward
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edward,
Your definition of portability is right.
IO is prohibited by the EJB specs. I think a file or a directory structure that is present in one EJB environment may not be present in the other EJB env, hence the portability issue. :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic