[[JNDI-JNDI]]
= JNDI

Camel will use JNDI as the default xref:registry.adoc[Registry]
implementation if you do not use xref:components::spring-summary.adoc[Spring]. This means
that using a DefaultCamelContext will try and create a
https://www.javadoc.io/doc/org.apache.camel/camel-core-engine/current/org/apache/camel/impl/JndiRegistry.html[JndiRegistry]
which uses the JNDI InitialContext as the registry.

This means you need to configure some JNDI provider to be able to use
this. This is described in this
xref:faq:exception-javaxnamingnoinitialcontextexception.adoc[FAQ entry],
but essentially you just need to create a file called `jndi.properties` on
the classpath and configure it with the JNDI provider you wish.

You can use the Camel JNDI provider by using the following
`jndi.properties` file:

[source,java]
----
java.naming.factory.initial = org.apache.camel.util.jndi.CamelInitialContextFactory
----
