Hi Douglas,
Are U suggesting something of an "Aggregate Entity Pattern" where I have a
class being a servant to a bean or there is some other pattern I need to
follow.
And "whatever object" concept which U are holding is incorrect . The object
that I return should at the mininum be serializable(AN UNSERIALIZABLE OBJECT
RETURNED FROM HELPER CLASS MAY NOT BE STORED IN DATABASE). You may go to
java.sun.com and check the API. Else U may read this in the some "Core java"
book which U are referring.
What do U say ?????
Warm Regards,
Rashid Khan
> -----Original Message-----
> From: Douglas Bullard [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, November 17, 2000 9:53 PM
> To: 'Rashid Khan'
> Subject: RE: File I/O in EJB
>
> It's quite simple - create a helper class which does all of the I/O. Make
> your EJB call the helper class, and have it return whatever objects you
> want
> to store in the database, then have the EJB store them.
>
> As for how to do file I/O, there's any number of java books out there that
> will tell you how to read a file. I'd suggest "Core Java" for a start.
>
> Good luck,
>
> Douglas Bullard
>
> -----Original Message-----
> From: Rashid Khan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 17, 2000 2:59 AM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: File I/O in EJB
>
>
> Hello Sir,
>
> I am trying to write an application in which I am uploading files from the
> local machine to a database using a servlet to write into the database as
> i
> have the misconception that EJB cannot be used for file I/O. I know I am
> terribly wrong, and that EJB can be used to do this job . Can U pls
> enlighten me as to how to go about doing this. How do I make the files
> which
> I want to upload as Serializable so that they can be written to a
> database.
>
> Please help.
>
> Thanks in advance
> Rashid.
>
>
>
>
>
>
> -----Original Message-----
> From: Douglas Bullard [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 03, 2000 12:23 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Writing files with EJBs
>
>
> 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....
>
> Douglas Bullard
> Application Engineer, Internet Commerce Applications
> GemStone Systems, a Brokat Company
> 20575 NW von Neumann Drive
> Beaverton, OR 97007
> 503.533.3590
> [EMAIL PROTECTED]
> http://www.gemstone.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".