Appearance
dbConfigFilePathAndName
The "dbConfigFilePathAndName" value in the TSF Grid .json file must contain a hibernate config .xml file that identifies the jdbc driver that will work with your database and a username and password that can login to your jdbc compliant database.
All hibernate settings in this file -- particularly, isolation level -- should be as below.
In our example, the TSF Grid .json file had the following value: "dbConfigFilePathAndName": "dbConfigFilePathAndName": "/home/tsfuser/app/conf/global/hibernate.tsf.cfg.xml"
So, the hibernate configuration file below would be named: hibernate.tsf.cfg.xml
(You may copy this file using the 'copy' icon in the upper right corner.)
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-Hibernate/Hibernate Configuration DTD 3.0// EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0 dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql:loadbalance://mysql-api:3306/TDbE</property>
<property name="hibernate.connection.username">tessDev</property>
<property name="hibernate.connection.password">orangYellow7</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
<property name="hibernate.show.sql">false</property>
<property name="hibernate.connection.isolation">2</property>
<property name="hibernate.hbm2dll.auto">update</property>
<!-- default(3) -->
<property name="hibernate.c3p0.min_size">5</property>
<!-- default(15) -->
<property name="hibernate.c3p0.max_size">25</property>
<!-- Will raise SQLException(timeout) because xthe getConnection() call has been timed out.
Applicable ONLY when connection is being checked-out/acquired when pool is exhausted.
default(0) -->
<property name="hibernate.c3p0.checkoutTimeout">150000</property>
<!-- By deafult there are 3 numHelperThreads, These threads are used for doing all sorts of asynchronous tasks -->
<property name="hibernate.c3p0.numHelperThreads">15</property>
<!-- Max number of PreparedStatements cached for entire pool -->
<property name="hibernate.c3p0.maxStatementsPerConnection">200</property>
<!-- By default this is false, which means all the checkin/release of pool objects is done asynchronously
and this might cause Thread pool congestion. If we enable it, the release/checkin will be performed by User thread.
Note: Enabling this will be performant if we don't perform any testing connection on checkin/release OR any heavy task OR
User has to wait till the task is completed. -->
<property name="hibernate.c3p0.forceSynchronousCheckins">true</property>
<property name="hibernate.c3p0.acquireRetryDelay">10000</property>
<!-- <property name="hibernate.c3p0.acquireRetryAttempts">0</property> -->
<!-- <property name="hibernate.connection.handling_mode">immediate_acquisition_and_hold</property> -->
<!-- Mapping files -->
</session-factory>
</hibernate-configuration>
Tessellation Software