Restructured the pooling code.

This commit is contained in:
Ulrik Sandberg
2007-11-26 23:28:27 +00:00
parent 1240921378
commit 8dbd7d9bcf
7 changed files with 15 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ import org.apache.commons.pool.KeyedObjectPool;
/**
* @author Eric Dalquist <a href="mailto:eric.dalquist@doit.wisc.edu">eric.dalquist@doit.wisc.edu</a>
*/
class DelegatingContext implements Context {
public class DelegatingContext implements Context {
private KeyedObjectPool keyedObjectPool;
private Context delegateContext;
private final DirContextType dirContextType;

View File

@@ -32,7 +32,7 @@ import org.apache.commons.pool.KeyedObjectPool;
/**
* @author Eric Dalquist <a href="mailto:eric.dalquist@doit.wisc.edu">eric.dalquist@doit.wisc.edu</a>
*/
class DelegatingDirContext extends DelegatingContext implements DirContext {
public class DelegatingDirContext extends DelegatingContext implements DirContext {
private DirContext delegateDirContext;
public DelegatingDirContext(KeyedObjectPool keyedObjectPool, DirContext delegateDirContext, DirContextType dirContextType) {

View File

@@ -29,7 +29,7 @@ import org.apache.commons.pool.KeyedObjectPool;
/**
* @author Eric Dalquist <a href="mailto:eric.dalquist@doit.wisc.edu">eric.dalquist@doit.wisc.edu</a>
*/
class DelegatingLdapContext extends DelegatingDirContext implements LdapContext {
public class DelegatingLdapContext extends DelegatingDirContext implements LdapContext {
private LdapContext delegateLdapContext;
public DelegatingLdapContext(KeyedObjectPool keyedObjectPool, LdapContext delegateLdapContext, DirContextType dirContextType) {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ldap.pool;
package org.springframework.ldap.pool.factory;
import javax.naming.directory.DirContext;
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.pool.BaseKeyedPoolableObjectFactory;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.pool.DirContextType;
import org.springframework.ldap.pool.validation.DirContextValidator;
/**

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.ldap.pool;
package org.springframework.ldap.pool.factory;
import java.util.HashMap;
import java.util.Map;
@@ -30,6 +30,9 @@ import org.apache.commons.pool.impl.GenericObjectPool;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.ldap.NamingException;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.pool.DelegatingDirContext;
import org.springframework.ldap.pool.DelegatingLdapContext;
import org.springframework.ldap.pool.DirContextType;
import org.springframework.ldap.pool.validation.DirContextValidator;
/**

View File

@@ -13,12 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.pool;
package org.springframework.ldap.pool.factory;
import javax.naming.directory.DirContext;
import org.easymock.MockControl;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.pool.AbstractPoolTestCase;
import org.springframework.ldap.pool.DirContextType;
import org.springframework.ldap.pool.validation.DirContextValidator;
/**

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ldap.pool;
package org.springframework.ldap.pool.factory;
import javax.naming.directory.DirContext;
import javax.naming.ldap.LdapContext;
@@ -21,7 +21,8 @@ import javax.naming.ldap.LdapContext;
import org.easymock.MockControl;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.pool.PoolingContextSource.WhenExhaustedAction;
import org.springframework.ldap.pool.AbstractPoolTestCase;
import org.springframework.ldap.pool.factory.PoolingContextSource.WhenExhaustedAction;
import org.springframework.ldap.pool.validation.DirContextValidator;
/**