How does it help me configure my J2SE application?
In J2EE applications, JNDI provides a very nice layer of abstraction between
application code, and environment configuration. Using this approach removes the
need to either hardcode environment settings, or implement a way to externalize
them. In addition, many component vendors provide an implementation of the
ObjectFactory interface, a configurable factory. OOC supports ObjectFactorys,
and allows them to be installed and initialized based on an XML descriptor.
J2EE or J2SE? JNDI works with both
How does it help me unit test?
Well, Java applications that use JDBC, JMS, JavaMail, etc. typically obtain instances
of configurable factories (such as a DataSource) from JNDI. OOC makes it possible, in
some cases, to test components of an application without loading it into an
application server. This is not to say that OOC simulates a full J2EE environment
for testing, but it simulates part of it.