title: How to access the file system from an EJB 3?
body: <p>I would like to know how can I access the file system from an EJB 3 bean?</p>
  
  <p>I searched the Internet on the subject and haven't found a good answer.</p>
  
  <p>Some suggest using the java.io/java.nio even though the specification prohibits this usage. Most application servers seem to allow the access to this API anyway.</p>
  
  <p>Another idea would be to use an JCA connector to access the file system or a LDAP directory.</p>
  
  <p>What I want to do this to avoid the use of BLOB in the database when a simple file would be a much better solution in terms of performance and used resources.</p>
  
  <p>How would you solve this problem?</p>