Page 1 of 1

About Question com.enthuware.ets.scbcd.v5.2.263 :

Posted: Sat Jun 02, 2012 10:55 am
by ETS User
Why EJBs are not allowed to make use of java.io package?

I am able to write EJB which read file from filesystem without any problem.

Re: About Question com.enthuware.ets.scbcd.v5.2.263 :

Posted: Sat Jun 02, 2012 5:08 pm
by admin
It is forbidden by the specification. Please see section 21.1.2:
• 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.
HTH,
Paul.