According to what I have found so far, I can use the following code:
LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean) super.getApplicationContext (). GetBean ("& sessionFactory"); System.out.println (sessionFactory.getConfiguration (). BuildSettings (). GetJdbcBatchSize ());
but then I get a Hibernate exception:
org.hibernate.HibernateException: local data source not found for configuration - dataSource property must be set to LocalSessionFactoryBean
Can someone shed some light?
( , Spring):
System.out.println(sessionFactory.getConfiguration().getProperty("hibernate.jdbc.batch_size"))
Hibernate, , getConfiguration SessionFactory. SessionFactory , , . :
((SessionFactoryImplementor)sessionFactory).getSettings().getJdbcBatchSize()
, , , . , , try try/catch Throwable, , , . Hibernate, , .
Source: https://habr.com/ru/post/1697240/More articles:F # и корпоративное программное обеспечение - c#Primary VmWare Hard Drive Extension - vmwareSEO and hard links with dynamic URLs - seoperl JOIN-like behavior in Oracle? - oraclehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1697239/can-i-pass-an-arbitrary-block-of-commands-to-a-bash-function&usg=ALkJrhgxBvE0GKfwduT6Y62G_Zjo00fvPgClickOnce Online-only app as TS RemoteApp - vb.netHow to get an excellent list of words used in all field entries using MS SQL? - sqlWhat tools do you use to monitor a web service? - monitoringВключение редактирования поля первичного ключа в ASP.NET Динамические данные /LINQ to SQL - .netHow to redirect Tornado / VXWorks shell output? - redirectAll Articles