not to be particulary anal,
but in the EJB spec is is recommended (if not forced) that an EJB object
should not open any file descriptors nor any sockets. By doing this you are
preventing the EJB objects from being replicated to another server.
so use a static utility class or something else that will read the file for
you.
as far as your questions, you can just bind the string into a JNDI name, or
you can specify it as a environment variable upon startup ie,
java -Dmyfile=/usr/local/myfile.properties ...
Filip
----- Original Message -----
From: "Brett Palmer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 08, 2000 4:18 PM
Subject: [jBoss-User] Suggestions for specifying properties file in JNDI
My EJBs need to access a properties file. I would like to use the JNDI
service from JBoss to provide the path name for the properties file without
having to hard code the path in the EJB.
I have seen examples of how to use JNDI to get DB connection pools, etc.
Does someone have some suggestions for just setting a simple string value in
JNDI and accessing it from an EJB?
Thanks in advance for your help.
Brett
____________________________________________________________________________
_________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]