Documentation

Trace:

Differences

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

Link to this comparison view

jvx:common:setup:connectin_pooling [2018/02/02 10:08]
admin created
jvx:common:setup:connectin_pooling [2020/06/19 11:41] (current)
cduncan Edited for English grammar (capitalization, punctuation, correct verb conjugation)
Line 27: Line 27:
 By default, connection pooling is disabled which means that a connection is created on open, and released on close of DBAccess. By default, connection pooling is disabled which means that a connection is created on open, and released on close of DBAccess.
  
-If connection pooling is enabled and autocommit ​was enabled, a connection is created on demand where neededand is automatically released when no transaction is open after last call. This check will be queued via invokeFinally (see [[jvx:​server:​lco:​call_events|Server-side Call events]]).+If connection pooling is enabled and autocommit enabled, a connection is created on demand where needed and is automatically released when no transaction is open after last call. This check will be queued via invokeFinally (see [[jvx:​server:​lco:​call_events|Server-side Call events]]).
  
-If connection pooling is enabled and autocommit ​was disabled, the connection will be released after each request as long as no transaction was started. If a transaction was started, the connection will be released with next commit or rollback call.+If connection pooling is enabled and autocommit disabled, the connection will be released after each request as long as no transaction was started. If a transaction was started, the connection will be released with next commit or rollback call.
  
-To be able to configure custom connection settings, use eventConfigureConnection and eventUnconfigureConnection. ​Especially configure ​connection is important because it's not guaranteed that the same connection will be used for different calls. If you need custom settings, use events to configure the connection. The configure event will be triggered automatically by open and getConnection and unconfigure will be triggered by close and releaseConnection.+To be able to configure custom connection settings, use eventConfigureConnection and eventUnconfigureConnection. ​Configure ​connection is especially ​important because it's not guaranteed that the same connection will be used for different calls. If you need custom settings, use events to configure the connection. The configure event will be triggered automatically by open and getConnection and unconfigure will be triggered by close and releaseConnection.
  
-If you don't use connection pooling, you can configure your connection without eventsbecause there will be exactly one database connection per logged-in user. We recommend using event for connection configuration!+If you don't use connection pooling, you can configure your connection without events because there will be exactly one database connection per logged-in user. We recommend using event for connection configuration!
  
 == Configuring Connection Pool == == Configuring Connection Pool ==
  
-Using an application server it's possible to configure a DataSource ​resource.+Using an application serverit's possible to configure a datasource ​resource.
 The JNDI name can be configured in your applications config.xml: The JNDI name can be configured in your applications config.xml:
  
Line 84: Line 84:
 </​file>​ </​file>​
  
-In this case, the DataSource ​has to be created manually, e.g. in Application ​life-cycle object:+In this case, the datasource ​has to be created manually, e.g. in application ​life cycle object:
  
 <file java> <file java>
Line 108: Line 108:
 </​file>​ </​file>​
  
-and in the Session ​life-cycle object:+and in the session ​life cycle object:
  
 <file java> <file java>
-protected DBAccess getDBAccess() throws ​Exception+protected DBAccess getDBAccess() throws ​exception
 { {
     DBAccess dba = (DBAccess)get("​dBAccess"​);​     DBAccess dba = (DBAccess)get("​dBAccess"​);​
Line 129: Line 129:
 </​file>​ </​file>​
  
-== Configuring ​stateful ​Database ​connections ​==+== Configuring ​Stateful ​Database ​Connections ​==
  
-It is possible to configure every connectiontaken from the connection pool. In Oracle for example it's possible to store user information in packages.+It is possible to configure every connection taken from the connection pool. In Oraclefor exampleit's possible to store user information in packages.
  
 <file java> <file java>
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information