Namespace: urn:mace:shibboleth:2.0:resolver
Schema: http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd
The <BeanManagedConnection>
element specifies an externally-defined bean which defines a DataSource.
This is the most effective way to control connection properties, implement robust pooling support, and share connections across connectors.
Schema Name and Location
This element is defined by the urn:mace:shibboleth:2.0:resolver
schema, which is located at http://shibboleth.net/schema/idp/shibboleth-attribute-resolver.xsd.
...
The content of the element is the name of the externally-defined bean, and it carries no other attributes or child elements.
Examples
The example illustrates a data source using the DBCP pooling library (version 1.4), which is a well-tested option.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- Similar to the above, an Oracle database can also use commons-dbcp2.jar, commons-pool2.jar, ojdbc7.jar with java 8 --> <!-- global.xml needs a new Oracle DB bean as in the previous example, but validationQuery needs to be modified in "select 1 from dual" --> <!-- Oracle Spring connection pooling data source configuration --> <bean id="OracleDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close" p:driverClassName="%{datasource.driverClass}" p:url="%{datasource.jdbcUrl}" p:username="%{datasource.user}" p:password="%{datasource.password}" p:initialSize="5" p:maxTotal="50" p:maxIdle="5" p:maxWaitMillis="2000" p:testOnBorrow="true" p:testWhileIdle="true" p:testOnReturn="true" p:timeBetweenEvictionRunsMillis="120000" p:minEvictableIdleTimeMillis="120000" p:validationQuery="select 1 from dual" p:validationQueryTimeout="4" /> |
Attributes
No attributes are defined.
Child Elements
...