Hi,

1.     From several emails of EJB-list:
        one of the reasons of "EJB forbids file I/O" is for "making EJB portable

        over kinds of EJB containers on kinds of oprating systems". So it is
better
        not to use "file accessing" from EJB.

2.     From my work:
        with J2EE1.2.1+winnt40, by adding the following permission
        into   ...\j2sdkee1.2.1\lib\security\server.policy:

        permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";

        I can read file form EJB.


Bo
Aug.24,2000



Dave Wolf wrote:

> Murthy,
>
> EJB forbids file I/O
>
> Dave Wolf
> Internet Applications Division
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Murthy, A (CAP, GEFA,
> > Contractor)
> > Sent: Wednesday, August 23, 2000 5:24 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: EJB accessing/using files.
> >
> >
> > Why don't you put the text in a property file , put that property
> > file along
> > with the other prroperty fles and then read that property file through the
> > EJB? am i correct? tell me if it is wrong. Oterwisem, you write a seperate
> > non-ejb bean and access your file with that.
> >
> > Correct me if my idea is wrong.
> >
> > Murthy A Suryanarayana
> > GE Financial Assurance
> > LTC - OPS2000 Project
> > ------------------------------------------------------------------------
> > -------------------
> > Day     : (415) 492 7834
> > Dial-Com        :  8 *    277 7834
> > Fax     : (415) 492 7699
> > mailto  : [EMAIL PROTECTED]
> >
> >
> >
> > -----Original Message-----
> > From: Kaj Bjurman [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 23, 2000 6:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: SV: EJB accessing/using files.
> >
> >
> > Hi,
> >
> > Thanks for your answer...
> > The mailing EJB will only be called by other EJBs, and they won't
> > be able to
> > pass the text as an argument (since they won't have the text either).
> >
> > It's more like.
> > I have an mailing ejb, and you should be able to use it like:
> >
> > String newCustomer = "[EMAIL PROTECTED]";
> > int typeOfMail = MailingEjb.WELCOME_MAIL;
> > mailingEjb.sendMailTo(newCustomer, typeOfMail);
> >
> > And then the EJB should be able to retreive the text for a
> > welcome mail, and
> > then send the mail.
> >
> > I'm still looking for a clean sollution of how to retreive the text.
> > My last resort will be to write a file-server which could be located using
> > JNDI, and once you have lokated it you will be able to read the text from
> > it. But, that sollution looks a litle bit to advanced for such a simple
> > thing as getting a text. Or isn't there an easier sollution?
> >
> > /Kaj
> >
> >
> > > -----Ursprungligt meddelande-----
> > > Fr�n: NVS Rama Krishna [mailto:[EMAIL PROTECTED]]
> > > Skickat: Thursday, August 24, 2000 1:24 AM
> > > Till: [EMAIL PROTECTED]
> > > �mne: Re: EJB accessing/using files.
> > >
> > >
> > > u can accept the message as an arguement to the mailing
> > > Bussiness Method ...
> > > well! i dont see any problem in it ...
> > >       all the best
> > >
> > > krishna
> > > ----- Original Message -----
> > > From: Kaj Bjurman <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, August 23, 2000 7:04 AM
> > > Subject: EJB accessing/using files.
> > >
> > >
> > > > Hi,
> > > >
> > > > I have to create an EJB which should send an e-mail, and
> > > the message-text
> > > > won't be available from a database.
> > > >
> > > > Since an EJB can't perform disc-IO I have the following questions:
> > > >
> > > > Where should I store the message text?
> > > > Can I put it in a text-file? And if I can, how do I access
> > > that file? Are
> > > > there techniques for this?
> > > >
> > > > We are using Weblogic, and I have seen that they have
> > > something called
> > > > T3FileInputStream, but I would like to avoid vendor
> > > specific classes.
> > > >
> > > > Thanks
> > > > /Kaj
> > > >
> > > >
> > > > ~~~~~~~~~ ~~~~ ~~~ ~~ ~ ~  ~   ~
> > > > [EMAIL PROTECTED]
> > > > +46 70 4200148
> > > >
> > > >
> > > ==============================================================
> > > =============
> > > > 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".
> >
> >
>
> ===========================================================================
> 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