Using Identity Based Connection Pooling with WebLogic Server
The typical model of interaction an application server has with a database is through the use of datasources.
A datasource is an entity that is configured with appropriate information to allow it to create and manage connections with a database, and to hand these out to applications when they request them. A datasource typically creates pools of connections for effiency purposes and shares these amongst applications that make use of it.
In the typical datasource use case, all the connections the datasource creates use the same username and password. This results in all access to the database being performed using the same database credentials. In most cases this is perfectly acceptable and handled as part of the overall application architecture when needing to dealing with shared, partioned data.
For some rare cases, requirements can exist where it’s necessary to preserve the application user identity in some form all the way down to the database. This could be for the purposes of restricting information access, establishing audit trails, resource scheduling based on user context, etc.
To support these two different usage requirements, WebLogic Server supports two different types of connection pools through its datasource implementation:
- Homogeneous: Regardless of the current user of the application, all connections in the pool use the same security credentials to access the DBMS.
- Heterogeneous: Allows applications to use a JDBC connection with a specific DBMS credential by pooling physical connections with different DBMS credentials.