On Thu, 24 Aug 2000 09:21:36 -0700, Joel Shellman <[EMAIL PROTECTED]> wrote:
>Bo Xu wrote:
>>
>> 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.
>
>Does anyone know if ResourceBundles (ie. property files) are allowed or
>not under the EJB spec? Because they use the classpath (or classloader)
>to access them, they still maintain the portability required (they are
>as portable as any class you would want to use), so I would think they
>would not violate at least the spirit of the no file access rule in the
>spec.
>
>Does anyone know for sure?
I know for sure (downloaded JDK source and read it), and the answer is
Yes, they work :-) Using the ClassLoader.getResource() method directly
would *not* work, *but* since ResourceBundle.getBundle() has been coded
with doPrivileged at very appropriate places (phew) that can be used as
a way to access properties files in the .jar.
Neat.
/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".