Hi Cindy,

    Greetings to you.

    The EJB spec's rationale and answer is

"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."

    I've also heard platform independence, security, and even that some
platforms might not use an i/o subsystem ( hard to imagine ).  But the real
point is probably that various EJB's should not make their own decisions
regarding storage.

    While the resource manager approach sounds good, for the majority of
cases it probably leaves JDBC as the only viable, generally available
choice.  You could write your own resource manager using the J2EE SPIs,
probably JCA, but it's a lot of work and to some extent has you going around
in circles because your resource manager may only work on certain platforms.
But, in theory, any new work would be funnelled into only one area rather
than rewrites for all beans.

    You could do some searching for resource managers and JCA to find out if
anything is available.

    But, I guess my short answer is that, although I'm generally against
blobs and other generally unverifiable binary data in a database, that's
likely the most practical choice for your situation.  Best,


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO         -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?             http://www.jguru.com/faq/Java400


----- Original Message -----
From: "Cindy hao" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 11:00 AM
Subject: File I/O in EJBs


> Hi,
> Since file I/O is prohibited in EJBs, how to access large and dynamic
> generated files from EJBs? Would you please recommend an approach or
> approaches with the best Qos?
>
> Thanks in advance,
>
> Cindy Hao
>

===========================================================================
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".

Reply via email to