Forgive me if this was already suggested, but could you put the text of
the message in a properties file (aka. ResourceBundle)? I believe that
there would be no restrictions on accessing resource bundles from EJBs
as they are accessed in the normal way using the classpath (or class
loader).

You would get the appropriate resource bundle and then get the specific
text using your typeOfMail key.

Good luck,
--
Joel Shellman
Chief Software Architect
The virally-driven B2B marketplace for outsourcing projects
http://www.ants.com/90589781


Kaj Bjurman wrote:
>
> 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

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