[java-shib-common COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt src/main/java/edu/internet2/middleware/shibboleth...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Feb 16 18:55:33 GMT 2012
Author: scantor
Date: Thu Feb 16 18:55:33 2012
New Revision: 1013
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1013&view=rev
Log:
Move pool init to protected method on bean factory.
Modified:
branches/REL_1/doc/RELEASE-NOTES.txt
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/resolver/dataConnector/LdapDataConnectorFactoryBean.java
Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/doc/RELEASE-NOTES.txt?rev=1013&r1=1012&r2=1013&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Thu Feb 16 18:55:33 2012
@@ -1,6 +1,7 @@
Changes in Release 1.3.5
=============================================
[SC-169] - Velocity ErrorHandler doesn't set Content-Type of response
+[SC-170] - Move pool initialization to protected method on DataConnector bean factory
Changes in Release 1.3.4
=============================================
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/resolver/dataConnector/LdapDataConnectorFactoryBean.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/resolver/dataConnector/LdapDataConnectorFactoryBean.java?rev=1013&r1=1012&r2=1013&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/resolver/dataConnector/LdapDataConnectorFactoryBean.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/resolver/dataConnector/LdapDataConnectorFactoryBean.java Thu Feb 16 18:55:33 2012
@@ -147,13 +147,8 @@
}
}
- // initialize the pool
- DefaultLdapFactory ldapFactory = new DefaultLdapFactory(ldapConfig);
- if (ldapValidator != null) {
- ldapFactory.setLdapValidator(ldapValidator);
- }
- ldapPoolStrategy.setLdapFactory(ldapFactory);
- ldapPoolStrategy.initialize();
+ setupPoolStrategy();
+
LdapDataConnector connector = new LdapDataConnector(ldapPoolStrategy, resultsCache);
populateDataConnector(connector);
connector.setNoResultsIsError(noResultsIsError);
@@ -165,6 +160,23 @@
return connector;
}
+ /**
+ * Initializes the LDAP factory and validator for the selected pool strategy,
+ * and initializes the pool.
+ *
+ * @throws Exception thrown if the pool cannot be initialized
+ */
+ protected void setupPoolStrategy() throws Exception {
+
+ // initialize the pool
+ DefaultLdapFactory ldapFactory = new DefaultLdapFactory(ldapConfig);
+ if (ldapValidator != null) {
+ ldapFactory.setLdapValidator(ldapValidator);
+ }
+ ldapPoolStrategy.setLdapFactory(ldapFactory);
+ ldapPoolStrategy.initialize();
+ }
+
/**
* Creates an SSLContext if either trust or key material was set.
*
More information about the commits
mailing list