Got these from the Orion mailing list. if you wan the class files from the
last solution let me know and I can mail you them, but check the first two
options first. Also left the mail headers so you can search the Orion mailing
list for them.
Hope this helps,
Oisin


Re: Reading Properties File
Date: Mon, 27 Aug 2001 14:44:58 -0700 (PDT)
From: Min-Hua Luo <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Reply to: Orion-Interest <[EMAIL PROTECTED]>


Karl,

  I had the same problem as you. The way I solved it
was: I use new File() to create a file in the same
java program which I try to load properties. I did not
specify and directory, just a filename. Then, I search
my disk and found if you do not specify directory
name, the default directory is ORION_HOME\j2ee\home.
Therefore, I put all of my property file onto
ORION_HOME\j2ee\home and make sure I do not specify
directory path for my property files. All the
properties were loaded.


RE: PrOperTies ??
Date: Wed, 22 Aug 2001 11:14:01 -0400
From: "Juan Lorandi (Chile)" <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Reply to: Orion-Interest <[EMAIL PROTECTED]>


 env entries in the ejb-jar.xml, web.xml;also, you could create a
"load-on-startup" servlet, which is allowed to access disk, to create, say, a
singletonwhich in its constructor opens and loads the properties files.
Therefore, you will be paying once per JVM for the initialization, and have
it your way. HTHJuan Pablo

Re: Reading Properties File
Date: Wed, 22 Aug 2001 19:57:00 +0200
From: "Marcel Schutte" <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Reply to: Orion-Interest <[EMAIL PROTECTED]>


See the attached files. We use them to read properties files off the
applications classpath. The properties files should be in the same directory
as the ProjectPropertiesHelper class.
This method works in both orion1.5.2 and weblogic6.1

Hope this helps,
Marcel



On Thursday 13 September 2001 16:18, Jeetendra wrote:
> Hello,
>
> I seem to have one more problem. This time it is Orion 1.5.2. It might seem
> very strange but Orion cannot pick up classes from the system classpath
> (atleast that is the way it is behaving here). Instead I need to put the
> classes in Orion_Home/lib.
>
> I have a property file for my system which I load using
>
>
>
> InputStream in =
> getClass().getClassLoader().getSystemResourceAsStream("my.properties");
> Properties prop = new Properties();
> prop.load(in);
>
> The code loads the property file if it is present in the classpath.
> This code works fine when I use simple classes and it is able to load the
> property file. When I call it from a Data Access Object which is called by
> a Session bean, it is not able to load the property file. I even put the
> property file in ORION_HOME/lib but with no success.
>
> The last thing that I want to do is hardcode the path of the property file
> in the class file.
>
> Has anyone faced this problem ?
>
>
>
> Jeetendra Dassani
> Lead Systems Engineer
> Tata Infotech Limited
> SEEPZ, Andheri (E)
> Mumbai.
> Email : [EMAIL PROTECTED]
>         [EMAIL PROTECTED]
> Telephone: 8291261 X 2775/2465
>
> ===========================================================================
> 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".

--
Best Regards,
Oisin

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