hi all
    I used the code fragment like this
properties.load(TestImpl.class.getResourceAsStream("resources/test.properties")); 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

Reply via email to