EJB restrictions (no files, thread, sockets...) make sense because they
guaranty location independence. Synchronizing two threads means you're in the
same VM, use of sockets means your socket peer have to know where you are for
establishing connection, use of files means that you have to know that the file
you use resides on your host (most of the time), and so on.
However, this does not mean all such resources are unusable with EJB, but that
you have to provide a _distributed_ alternative instead, which almost always
consist of using distributed resource managers : use asynchronous messages for
task synchronization / notification, and other resources managers that provides
you JDBC drivers or streams where to write data into files or sockets streams.
Scott M Stark wrote:
> >From the EJB 1.1 spec, 18.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."
>
> So network storage arrays and distributed file systems are inappropriate
> enterprise
> stores? I need to throw out my terrabytes of optical disks storing
> historical
> client statements and move all of this data to a database in order to
> provide
> access via an EJB? I am having trouble understanding why the file system is
> excluded as a viable data resource. Can someone provide insight as to the
> reasoning
> behind this restriction.
>
> Scott Stark
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".