When discussing the data storage in Chapter 4, Adding Your Data, we explored several options. One of the best choices was using an RDBMS, in fact, PostgreSQL, with the PostGIS spatial extension.
Configuring spatial data from an RDBMS in your GeoServer requires you to create a connection setting for several parameters from the admin web interface. In fact, we did it when we loaded some data in PostGIS. Whatever database you are using, it may be useful to configure the connection using the Java Naming and Directory Interface (JNDI) standard.
Note
For more information about JNDI, refer to the following websites:http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interfacehttp://tomcat.apache.org/tomcat-8.5-doc/jndi-resources-howto.htmlhttp://docs.oracle.com/javase/jndi/tutorial/
JNDI allows GeoServer and any Java application, in general, to access data just by using a predefined name.