Following is the list of important properties you would require to configure for a databases in a standalone situation:
S.N. | Properties and Description |
1 | hibernate.dialectThis property makes Hibernate generate the appropriate SQL for the chosen database. |
2 | hibernate.connection.driver_classThe JDBC driver class. |
3 | hibernate.connection.urlThe JDBC URL to the database instance. |
4 | hibernate.connection.usernameThe database username. |
5 | hibernate.connection.passwordThe database password. |
6 | hibernate.connection.pool_sizeLimits the number of connections waiting in the Hibernate database connection pool. |
7 | hibernate.connection.autocommitAllows autocommit mode to be used for the JDBC connection. |
If you are using a database along with an application server and JNDI then you would have to configure the following properties:
S.N. | Properties and Description |
1 | hibernate.connection.datasourceThe JNDI name defined in the application server context you are using for the application. |
2 | hibernate.jndi.classThe InitialContext class for JNDI. |
3 | hibernate.jndi.Passes any JNDI property you like to the JNDI InitialContext. |
4 | hibernate.jndi.urlProvides the URL for JNDI. |
5 | hibernate.connection.usernameThe database username. |
6 | hibernate.connection.passwordThe database password. |