Why not just use the environment naming context? Can't properties be
implemented as environment entries?

Laurel

-----Original Message-----
From: John Harby [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 8:33 AM
To: [EMAIL PROTECTED]
Subject: Re: Packing and Reading property files along the ejb.jar


I guess the pertinent portion of the spec here is in sec. 24.1 -

"* An enterprise bean must not use the java.io package to attempt to access
files and directories
in the file system.
The file system APIs are not well-suited for business components to access
data. Business components
should use a resource manager API, such as JDBC, to store data."

I have usually created a (startup) service using RMI or whatever
that does these things I'm not supposed to do from beans but need.
So I bind the service to a JNDI name and look it up from the beans.
This seems like the CORBA days when there was a Properties service.

>From: Ramesh <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: Packing and Reading property files along the ejb.jar
>Date: Thu, 29 Nov 2001 16:33:23 +0530
>
>hi all
>     I used the code fragment like this
>properties.load(TestImpl.class.getResourceAsStream("resources/test.properti
e
>s")); and
>it works fine with IAS4.1. What I want to know is , is it allowed or is it
>restricted and will it
>affect portability?
>
>What is the suggested way if I want a lot of informations from the property
>file, instead of accessing
>a data base and getting it. This properties are not bound to change
>frequently, but will change for
>one implementation. Is it proper to read such a lot of information, of the
>order of 10s for each
>published interface from the environment variables.
>Currently we read frequently changing values from the data base and others
>from environment variables.
>
>suggestions are appreciated
>ramesh
>
>
>   -----Original Message-----
>   From: Johan Eltes [mailto:[EMAIL PROTECTED]]
>   Sent: Thursday, November 29, 2001 3:02 PM
>   To: [EMAIL PROTECTED]
>   Subject: RE: Packing and Reading property files along the ejb.jar
>
>
>   The spec says you shouldn't J
>
>   I do the same as you, but I use the classloaders getResourceAsStream()
>to
>read the file. Then your code will work even if the appserver deployes your
>jar in a database, or other technology that is not accessable as a file.
>The
>J2EE 1.3 spec tells you to obtain the classloader from the thread context.
>
>
>
>   /Johan
>
>
>
>   -----Original Message-----
>   From: A mailing list for Enterprise JavaBeans development
>[mailto:[EMAIL PROTECTED]]On Behalf Of Ramesh
>   Sent: den 29 november 2001 06:10
>   To: [EMAIL PROTECTED]
>   Subject: Packing and Reading property files along the ejb.jar
>
>
>
>   hi all
>
>     What is wrong in packaging a property file along with ejb.jar and
>opening it and
>
>   reading it using IO package as it doesn't try to access any file system
>of
>the
>
>   hosting machine? What prevents doing this and will it be portable if
>this
>is done?
>
>
>
>   thanks in advance
>
>   ramesh
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

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