Ever since we upgrade into Axon.ivy 5.1.x, there are a lot of WARN in the log files:
Could you explain under what circumstance Axon.ivy write this WARN message? What does it mean? P.S: In our project, we use JPA Thanks asked 29.07.2015 at 04:11 Genzer Hawker Reguel Werme... ♦♦ |
When you create a hibernate EntityManager you should also close its instance when the EntityManager is no longer used. This must be done as else every EntityManager will hold and keep a connection from the connection pool and this can lead to a leak. To prevent a connection leak the ivy core now closes all open EntityManager instances on HttpRequestEnd. If a not correctly closed instance is found, we log the warning you mentioned. To avoid the warning you should correctly close open EntityManager instances. Best practice is to handle EntityManager.close() in a finally block:
answered 29.07.2015 at 11:03 Reguel Werme... ♦♦ Hello Reguel, What is happening in finally{ em.close() } Let's say I encapsulate some methods like this example in some repository class. I`m calling these methods a lot of times. What is happening in Ivy ? Is the connection to the database opening and closing every time ? Best Regards, Yordan
(06.02.2017 at 15:00)
Stelt0
1
All connections to external Databases are pooled. So normally no new connection is established but an existing connection from the pool is taken. I'd expect that if you call these method multiple times, the queries are fired every time against the database layer. So it's a good idea to store and re-use the returned data. I recommend the usage of our Visual-VM plugin to track the queries that are really sent to the database. In the external DB tab you can see every query that is fired against the DB: http://developer.axonivy.com/doc/latest/EngineGuideHtml/monitoring.html#d5e5101
(06.02.2017 at 16:31)
Reguel Werme... ♦♦
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 29.07.2015 at 04:11
Seen: 8,122 times
Last updated: 06.02.2017 at 16:31