Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The same reason you'd use JNDI for anything, I'd say - moving the configuration out of the application, into the deployment environment.</p> <p>With JNDI, you basically say "this application needs a <code>SessionFactory</code>; and its name shall be X" and you're happy as long as the application server has a <code>SessionFactory</code> called X configured. This kind of externalization has several appealing benefits: </p> <ol> <li><p>You can use wildly different configurations on different machines (production and QA use Oracle, developers use HSQL, ...).</p></li> <li><p>You don't need to make your build process aware of configurations (no more <code>ant war_for_qa</code> or screwing around with Maven profiles).</p></li> <li><p>You're not tempted to check configurations into version control, and so your live database password won't be known to every temp, intern, consultant or ex-employee who's ever had (or will have!) access to the repository.</p></li> <li><p>Your installation/configuration instructions won't include items like "to configure the database login, edit the file foo.properties in the WAR file" which will inevitably result in configurations being overwritten on the production server at the worst possible moment because a sysadmin who's been working all weekend happened to deploy a non-edited WAR because the coffee ran out on Sunday afternoon.</p></li> </ol> <p>JNDI just happens to be the "standard" way of doing this externalization in Java, which means that new devs/admins won't need two days of training to learn the quirks of your own, home-brewn configuration system which really is quite clever but has this weird bug no one wants to delve into because it's <em>really</em> weird and anywho it has a pretty simple workaround, &amp;c.</p> <p><strong>Related:</strong> <a href="https://stackoverflow.com/questions/1350816/what-is-the-purpose-of-jndi">What is the purpose of JNDI?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload