This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Properties Files vs. JNDI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Properties Files vs. JNDI?" Watch "Properties Files vs. JNDI?" New topic

Properties Files vs. JNDI?

Max Tomlinson
Ranch Hand

Joined: Jul 17, 2001
Posts: 365
hi all-
we have a need in our J2EE application to use soft-coded properties (e.g database name etc.) ... what is the best way to do this: JNDI or A ResourceBundle? Oh, some of these are used by EJBs (most of them in fact)
Steve Loughran
Ranch Hand

Joined: Aug 06, 2002
Posts: 37
JNDI is nice for hot update of properties and replication across a cluster -though then you need a replicated directory service.
prop files are simple, but limited in what they can describe.
XML files are in-between; they have more power but are harder to work with.
The java 1.4 preferences API should nominally hide how the preferences are stored, so you could code for anything, but I aint used it yet to be sure.
I agree. Here's the link:
subject: Properties Files vs. JNDI?
Similar Threads
Question about RMI
J2EE technology would allow the system to interact with the LDAP server?
DataSource connection in WSAD 5.0
WSAD JNDI Explorer problem
WA #1.....word association