p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

enterprise_java_beans thread: Limitations to the EJB Model


Message #1 by "Catalano, Casey" <casey.catalano@e...> on Mon, 1 Oct 2001 18:42:03 -0500
Casey,

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.

  Return to Index