That's why I thought of going further by adding a file system layer that
could be used in a distributed way (JCR unfortunattely goes too far). But
as Carlos stated, that might not be the work of this EG.
On Wed, Nov 2, 2011 at 10:03, Adam Bien <abien_at_adam-bien.com> wrote:
> Hi Antonio,
>
> +1 for the recommendation instead of restriction.
> But: then EJB will be less "cloud-friendly". Not being able to access
> local resources is a popular restriction across all cloud providers.
>
> cheers!,
>
> adam
> On 25.09.2011, at 21:08, Antonio Goncalves wrote:
>
> Hi all,
>
> I have on concern about EJBs not being allowed to use files. Under
> section 16.2.2- Programming Restrictions, you can read :
>
> *"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."*
>
> But in projects, I see that all the time : EJBs reading and writing files.
> I haven't tried all the containers but I really wonder if this restriction
> is really taken into account. With the new EJBContainer, the nicer EJBTimer
> and asynchronous calls we could think EJBs are the perfect match for batch
> processing... but there is the java.io package restriction.
>
> Is this restriction too hard ? Could we smooth it ? I can understand that
> accessing files in a distributed environment without a shared disk is
> problematic, but why don't we encourage batch processing with embedded
> EJBContainer ? We could maybe do some distinction between javai.iopackage within the EJBContainer and the
> java.io package in a running environment.
>
> Any thoughts ?
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>|
> Blog <http://feeds.feedburner.com/AntonioGoncalves> | LinkedIn<http://www.linkedin.com/in/agoncal>| Paris
> JUG <http://www.parisjug.org/>
>
>
>
>
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org> |
Twitter<http://twitter.com/agoncal>|
Blog <http://feeds.feedburner.com/AntonioGoncalves> |
LinkedIn<http://www.linkedin.com/in/agoncal>| Paris
JUG <http://www.parisjug.org>