<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How IvyEntityManager hanldes transaction of persistence?</title><link>https://answers.axonivy.com/questions/1244/how-ivyentitymanager-hanldes-transaction-of-persistence</link><description>&lt;p&gt;My current project have 8 modules, it will deploy 8 Process Model Versions in Ivy Application, I set maximum connection of database is 5. But when I run my app, it created more than 5 so it make my app stopped, when I increased number of connection, It worked normally, and I saw it created 8 connections. Why?&lt;/p&gt;
&lt;p&gt;I am using IvyEntityManager to control transaction of entities. The problem is Ivy opened connection and retain it, not closes after I do operations(e.g merge...). So what IvyEntityManage does?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1244/how-ivyentitymanager-hanldes-transaction-of-persistence" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 07 Apr 2015 16:34:38 -0400</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/1244/how-ivyentitymanager-hanldes-transaction-of-persistence/1246</link><description>&lt;p&gt;If the IvyEntityManager is used in IvyScript e.g.:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ivy.persistence.&amp;lt;persistence unit name&amp;gt;.merge(...)
ivy.persistence.&amp;lt;persistence unit name&amp;gt;.persiste(...)
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then an connection and transation is created and before the method returns the transaction is closed and the connection goes back to the connection pool.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Tue, 07 Apr 2015 16:34:38 -0400</pubDate><guid>https://answers.axonivy.com/questions/1244/how-ivyentitymanager-hanldes-transaction-of-persistence/1246</guid></item></channel></rss>