<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=Read-Only_Pool</id>
	<title>Read-Only Pool - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=Read-Only_Pool"/>
	<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=Read-Only_Pool&amp;action=history"/>
	<updated>2026-04-06T20:02:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.infinite-erp.co.id/index.php?title=Read-Only_Pool&amp;diff=3316&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;=Introduction= {{AvailableFrom|3.0PR17Q2}}  The '''read-only pool''' feature allows to retrieve connections from a secondary (backup) database which allows just read-only oper...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=Read-Only_Pool&amp;diff=3316&amp;oldid=prev"/>
		<updated>2022-01-21T08:51:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Introduction= {{AvailableFrom|3.0PR17Q2}}  The &amp;#039;&amp;#039;&amp;#039;read-only pool&amp;#039;&amp;#039;&amp;#039; feature allows to retrieve connections from a secondary (backup) database which allows just read-only oper...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Introduction=&lt;br /&gt;
{{AvailableFrom|3.0PR17Q2}}&lt;br /&gt;
&lt;br /&gt;
The '''read-only pool''' feature allows to retrieve connections from a secondary (backup) database which allows just read-only operations. Typically, this will be a stand-by database that must have its data updated as much as possible.  &lt;br /&gt;
&lt;br /&gt;
It provides two main advantages:&lt;br /&gt;
* This helps to relieve the load in the main database.&lt;br /&gt;
* The reporting queries will not be executed against the main database: the standard ERP reports will be generated by taking the data from the secondary database.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
To configure the read-only pool the following property must be included in [[Openbravo.properties|Openbravo.properties]]:&lt;br /&gt;
&lt;br /&gt;
*'''bbdd.readonly.url''': this property provides the read-only database url.&lt;br /&gt;
&lt;br /&gt;
Note that it is also mandatory to define the [http://wiki.openbravo.com/wiki/Openbravo.properties#Apache_JDBC_Connection_Pool Apache JDBC Connection Pool] in order to make use of the read-only pool.&lt;br /&gt;
&lt;br /&gt;
Besides, for each '''bbdd.*''' and '''db.pool.*''' it is possible to add new '''bbdd.readonly.*''' and '''db.readonly.pool.*''' properties to configure the read-only database connection and specific pool properties for it. For example:&lt;br /&gt;
&lt;br /&gt;
 bbdd.readonly.user=ro&lt;br /&gt;
 bbdd.readonly.password=ro&lt;br /&gt;
 db.readonly.maxActive=10000&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
In case the read-only properties are not defined, the read-only pool will take the properties defined for the standard pool.&lt;br /&gt;
&lt;br /&gt;
=Supported Reports=&lt;br /&gt;
Once the read-only pool is enabled, it will be used to generate all the '''standard reports''' of the application. Please note that for custom manual reports which are not making use of the standard reporting engine, they should be adapted in case it is desired to make use of the read-only pool to generate them.&lt;br /&gt;
&lt;br /&gt;
{{(!)| See [[Data_Access_Layer#OBDal|OBDal]] for more details about how to adapt a report to use the read-only pool.}}&lt;br /&gt;
&lt;br /&gt;
Starting from '''3.0PR17Q4''' release, there are some manual reports in core that have been made compatible with the read-only pool. The full list of adapted reports is listed [http://wiki.openbravo.com/wiki/Projects:Read_Only_Pool_Manual_Reports here].&lt;br /&gt;
&lt;br /&gt;
And starting from '''3.0PR18Q2''' release, the documents printed with the standard [http://wiki.openbravo.com/wiki/User_Interface_Introduction#Toolbar print toolbar button], are never using the read-only pool (even if configured) but the standard pool. See [https://issues.openbravo.com/view.php?id=37933 here] for additional information.&lt;br /&gt;
&lt;br /&gt;
==Customization==&lt;br /&gt;
{{AvailableFrom|3.0PR18Q3}}&lt;br /&gt;
Once the read-only pool is configured, it is used by all supported reports (see section above) by default. However, this behavior can be overriden by a Preference value and with a manual selection if a fine-grain configuration is required.&lt;br /&gt;
&lt;br /&gt;
{{(!)| For performance reasons this configuration is cached. When configuration changes, either in the Preference or the Data Pool Selection window, it is recommended to restart Tomcat to apply the changes.  &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Preference===&lt;br /&gt;
[[File:Default-pool-preference.png|480px|center]]&lt;br /&gt;
&lt;br /&gt;
The preference '''Default DB Pool used by reports''' defines the database pool used by all reports that support using the read-only pool. Value should be '''DEFAULT''' or '''RO'''. If this preference is not defined or contains an invalid value, reports will use the read-only pool if configured.&lt;br /&gt;
&lt;br /&gt;
===Manual Selection===&lt;br /&gt;
[[File:Data-pool-selection.png|480px|center]]&lt;br /&gt;
&lt;br /&gt;
If a finer grain configuration is required, in window '''General Setup|Application|Data Pool Selection''' is possible to configure for each report which database pool to use, overriding the preference defined in '''Default DB pool used by reports'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Report_selector.png|480px|center]]&lt;br /&gt;
&lt;br /&gt;
The Report dropdown will show all applicable reports. That is, reports defined either in Process and Report or in Process Definition that is not used in toolbar's print button.&lt;br /&gt;
&lt;br /&gt;
Report's association with database pool can be temporary disabled using the '''Is active''' flag. Once deactivated, the pool defined in '''Default DB pool used by reports''' will be used.&lt;br /&gt;
&lt;br /&gt;
[[File:No-ro-pool-configured-message.png|480px|center]]&lt;br /&gt;
&lt;br /&gt;
Administrators can add entries to this Window even if RO pool is not configured yet. In that case, a message should appear to indicate that RO pool is not configured yet and that the referred report is already using the main pool.&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>