How to access the file system from an EJB 3?
I would like to know how can I access the file system from an EJB 3 bean? I searched the Internet on the subject and haven't found a good answer. 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. Another idea would be to use an JCA connector to access the file system or a LDAP directory. 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. How would you solve this problem? The