Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
devel:documentation:systems:dev:scripted-jdbc-connector [2022/08/23 15:35]
apeterova changes in example script to work on Postgres
devel:documentation:systems:dev:scripted-jdbc-connector [2022/08/23 15:49]
apeterova Info about pooling configuration due to memory leak
Line 11: Line 11:
  
 Another useful setting is "Reload script on execution" (reloadScriptOnExecution), which mainly helps during the development stage. This option should be turned off in production, because reloading (recompiling) the Groovy scripts takes time and memory. However, when you need to upgrade the script and this option is turned off, then you have to restart IdM, otherwise the new version of the script wouldn't be loaded. Don't turn on the option "Reload script on execution" only temporarily, because it may not preserve the loaded newer version of the script, after you turn the option off again! Another useful setting is "Reload script on execution" (reloadScriptOnExecution), which mainly helps during the development stage. This option should be turned off in production, because reloading (recompiling) the Groovy scripts takes time and memory. However, when you need to upgrade the script and this option is turned off, then you have to restart IdM, otherwise the new version of the script wouldn't be loaded. Don't turn on the option "Reload script on execution" only temporarily, because it may not preserve the loaded newer version of the script, after you turn the option off again!
 +
 +==== Pooling configuration ====
 +
 +We recommed using the [[.:system-mapping#connector_pool_configuration|connector pool]] when connectiong systems with this connector. This will make connecting to the datasource more effective. Also, this connector has a suspected memory leak when compiling groovy scripts repeatedly, which is avoided if connector pooling is enabled and "Reload script on execution" is disabled (see above)
  
 ===== Schema attributes ===== ===== Schema attributes =====
Line 35: Line 39:
 }) })
 return result return result
 +
  
 </code> </code>
Line 66: Line 71:
 def retrieved = sql.firstRow("SELECT * FROM USERS WHERE ID = ? LIMIT 1", [id]) def retrieved = sql.firstRow("SELECT * FROM USERS WHERE ID = ? LIMIT 1", [id])
 println retrieved println retrieved
 +
  
 </code> </code>
  • by apeterova