Java Expert....Java/Open Source Addict

Redes Sociales

twitterlinkedinrss feedemail youtube

Mostrando entradas con la etiqueta jdbc connection pool. Mostrar todas las entradas
Mostrando entradas con la etiqueta jdbc connection pool. Mostrar todas las entradas

viernes, 31 de agosto de 2018

JDBC Connection Pool - Resource Type Datasources



When we need to configure the connection pool on Glassfish or Payara Server, could be that the Resource Types Datasources options are not clear. Because in this post I going to explain the differences between them.

Resource Types Datasource

  • javax.sql.Datasource.- This datasource type is used in applications that manage a global transaction that always involves just one resource. Sometimes called local transactions. This datasource is related with No-XA Transaction.
  • javax.sql.XADatasource.-  This datasource type is used in applications that manage distributed transactions with one or more databases or other resources like JMS. This datasource is related with XA Transaction.
  •  javax.sql.ConnectionPoolDatasource.- This datasource type is more general, produces a connection (PooledConnection) object that will automatically participate in connection pooling. This implementation works with a middle-tier connection pooling, generally isn't used by a programmer.

Datasource Hierarchy (Ref: shengwangi)