I have to save a lot of pictures and docs. So I need to create a lot of directories in the File System at runtime.
What is the best way to do this ?
Can I send a message to a MDB an this bean creates a directory ? (Have a MDB an access to the File System ?)
Or should I solve this with a servlet ??
Thanks for help
EJB spec explicitly indicates that (section 24.1.2 Programming restrictions):
An enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
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, to store data.
Therefore, I would not recommend to put your "file directory creation" code in ejb (eg, mdb).
What about Servlets? Do they have such restriction?