Larry, Rickard and Jonathon offered some insight into this.

I thought I would just mention that I was under the impression that your EJB's
needed to perform some file I/O. If you can come up with a design where this I/O
can take place in the web tier then go for it. My only suggestion for you would
be to perform the I/O where it is going to be used. Use good design principals
to determine where this is.

I have no hesitation to perform non-transactional I/O in my EJBs. With that
said, I am not designing EJB's for deployment on a variety of EJB containers. I
am satisfied that I/O can be done in the major EJB containers, so I don't
believe that I will be bitten by a portability problem. I also wouldn't do I/O
if it would be more reasonable to use JNDI properties instead.

jim

----- Original Message -----
From: "Larry Liu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 06, 2000 2:23 PM
Subject: Re: Writing files with EJBs


Jim:

It is well known statement quoted by your mail.  Do you
think the move of the IO work to Web tier instead of the
EJB tire is the way out? But for a web client, the MVC model
HTTP request processor is request based and is limited to session
scope, session time out is coming issue? Do uou have some thoughts
on it?

Larry

-----Original Message-----
From: James Cook [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 04, 2000 11:38 PM
To: [EMAIL PROTECTED]
Subject: Re: Writing files with EJBs


Nothing has changed. The spec states:

"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 API, to store data."

But, of course, we can all think of many situations where we want to use I/O
that has nothing to due with transactional issues. Most EJB servers do not
prevent you from performing file I/O. Do any?

jim


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Rickard �berg
> Sent: Friday, November 03, 2000 5:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Writing files with EJBs
>
>
> On Fri, 3 Nov 2000 23:26:36 +0100, Dirk Koschuetzki
> <[EMAIL PROTECTED]> wrote:
> >Douglas Bullard wrote:
> >
> >> EJBs should not directly access I/O.. but they can sure use
> helper classes
> >> which _can_ access I/O.
> >>
> >> Works fine for me in my latest app....
> >
> >Are you sure this is correct/allowed? Any helper class, used as an
> >ordinary object in an EJB, may be "inlined" and therefore the
> EJB violates
> >the above condition.
> >
> >BTW the same happens to utility classes (all methods static).
>
> This is a FAQ. The details of when and how classes are restricted by the
> EJB restrictions have been discussed extensively on several occasions
> before. Please see mailing list archives for more info
> (archives.java.sun.com).
>
> regards,
>   Rickard
>
> --
> Rickard �berg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
> ==================================================================
> =========
> 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".

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

Reply via email to