2016-04-27 03:02:53 +00:00
|
|
|
[[_database]]
|
|
|
|
|
|
|
|
== Relational Database Setup
|
2016-04-27 21:01:22 +00:00
|
|
|
{{book.project.name}} comes with its own embedded Java-based relational database called H2.
|
|
|
|
This is the default database that {{book.project.name}} will use to persist data and really only exists so that you can run the authentication
|
|
|
|
server out of the box. We highly recommend that you replace it with a more production ready external database. The H2 database
|
2016-06-01 15:50:46 +00:00
|
|
|
is not very viable in high concurrency situations and should not be used in a cluster either. The purpose of this chapter is to
|
2016-04-27 21:01:22 +00:00
|
|
|
show you how to connect {{book.project.name}} to a more mature database.
|
2016-04-27 03:02:53 +00:00
|
|
|
|
2016-04-27 21:01:22 +00:00
|
|
|
{{book.project.name}} uses two layered technologies to persist its relational data. The bottom layered technology is JDBC. JDBC
|
|
|
|
is a Java API that is used to connect to a RDBMS. There are different JDBC drivers per database type that are provided
|
|
|
|
by your database vendor. This chapter discusses how to configure {{book.project.name}} to use one of these vendor-specific drivers.
|
2016-04-27 03:02:53 +00:00
|
|
|
|
2016-04-27 21:01:22 +00:00
|
|
|
The top layered technology for persistence is Hibernate JPA. This is a object to relational mapping API that maps Java
|
|
|
|
Objects to relational data. Most deployments of {{book.project.name}} will never have to touch the configuration aspects
|
|
|
|
of Hibernate, but we will discuss how that is done if you run into that rare circumstance.
|
2016-04-27 03:02:53 +00:00
|
|
|
|
2017-02-08 17:35:09 +00:00
|
|
|
NOTE: Datasource configuration is covered much more thoroughly in link:{{book.appserver.datasource.link}}[the datasource configuration chapter]
|
2016-12-16 16:11:03 +00:00
|
|
|
in the _{{book.appserver.admindoc.name}}_.
|