Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

File I/O from within EJBs

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There seems to be some confusion on whether one can use java.io to access files from within EJBs.
From reading the pertinent EJB 2.0 spec excerpt (see end of posting), I understand that, if I want my app to be <em>portable</em>, I should refrain from using java.io for file access. If I use it, then Sun cannot guarantee that my application will be portable; it may or may not be.
Let's imagine, for a moment, that I don't care about portability.
My question is as follows: Does IBM guarantee that I can use java.io for writing to files from within my EJBs that are to be deployed in a WebSphere 5.0 EJB container?
Many thanks!
===============================
The relevant EJB 2.0 spec excerpt reads as follows:
"This section describes the programming restrictions that a Bean Provider must follow to ensure that the enterprise bean is portable and can be deployed in any compliant EJB 2.0 Container. The restrictions apply to the implementation of the business methods.
[...]
An enterprise bean must not use the java.io package to attempt to access files and directories
in the file system."
[ February 11, 2004: Message edited by: Panagiotis Varlagas ]
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We do not guarantee that you can use file i/o from your EJB's, nor do we guarantee that it will work in all future versions of WebSphere, but in fact, it works in the current versions and previous versions.
Kyle
[ February 11, 2004: Message edited by: Kyle Brown ]
 
Panagiotis Varlagas
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks Kyle for your ultra-fast response!
Got it: No guarantees, but a fact of life for WAS 5.0 and older that one can exploit as one sees fit.
=========================================================================

Originally posted by Kyle Brown:
We do not guarantee that you can use file i/o from your EJB's, nor do we [b]guarantee[b] that it will work in all future versions of WebSphere, but in fact, it works in the current versions and previous versions.
Kyle

 
reply
    Bookmark Topic Watch Topic
  • New Topic