On Wed, 23 Aug 2000 14:04:13 +0200, Kaj Bjurman
<[EMAIL PROTECTED]> wrote:
>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?

Would an environment entry be ok?

>Can I put it in a text-file? And if I can, how do I access that file? Are
>there techniques for this?

Sure, you can use your own resource factory to access it. See archives
for details on when the I/O restrictions apply and when they do not.

>We are using Weblogic, and I have seen that they have something called
>T3FileInputStream, but I would like to avoid vendor specific classes.

Yeah, stay away from that kind of stuff.

Env. entry is preferred, but do your own resource accessor otherwise.
Easiest way is to make it a static, like this:
String theText = MyFileAccessor.getTextFromFile("mailtext_1.txt");

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

Reply via email to