Page History
...
The Hibernate configuration file may look like this:
Code Block title Example of a Hibernate configuration file linenumbers true collapse true <?xml version="1.0" encoding="UTF-8" standalone="no"?> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property> <property name="hibernate.connection.password"></property> <property name="hibernate.connection.url">jdbc:oracle:thin:@/js7@js7?TNS_ADMIN=/home/js7/wallet</property> <property name="hibernate.connection.username"></property> <property name="hibernate.dialect">org.hibernate.dialect.Oracle12cDialect</property> <property name="hibernate.show_sql">false</property> <property name="hibernate.connection.autocommit">false</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property> <property name="hibernate.connection.provider_class">org.hibernate.hikaricp.internal.HikariCPConnectionProvider</property> <property name="hibernate.hikari.maximumPoolSize">10</property> </session-factory> </hibernate-configuration>
- Note the empty elements that are used for the account and password. Do not delete these elements from the Hibernate configuration file.
- The connection URL specifies
js7
as as the key for an entry in thetnsnames.ora
configuration file and in the wallet. - The
TNS_ADMIN
URL parameter is used to specify the directory of thetnsnames.ora
configuration file. JDBC Connections usually do not require this configuration file as connection details (Listener, Service Name, Service ID) are specified in the URL. However, due to use of thejs7
wallet key in the URL, it is preferable that connection details are managed in atnsnames.ora
configuration file. - In the example above this file is located in the
/home/js7/wallet
directory which is in fact the directory where the wallet is located. This location is not authoritative as the file can reside in any directory that is accessible to JOC Cockpit. - Note that an
sqlnet.ora
configuration file is not used with the above setup for a JDBC connection.
...
Overview
Content Tools