From Pro Java Server:
The specification states the following:
"The file system APIs are not well-suited for business components to access
data. Business components should use a resource manager API, such as JDBC
API, to store data."
Files systems do not provide support for transactions, for instance.
Another problem is that youcannot portably depend on a specific file-system
structure ? or even the existence of a file system at all (What if the EJB
container is embedded in a database?). If youwant to load a resource, you
should use the Java API method java.lang.Class.getResourceAsStream(). If we
want to load or store data, we use a database or the equivalent.
So I guess you're not totally blocked from using the filesystem, just that
it's less than ideal.