No longer throwing DataAccessException from ContextSource.

This commit is contained in:
Ulrik Sandberg
2007-04-01 22:06:52 +00:00
parent 2f54a7632a
commit f3a54c72d2
7 changed files with 15 additions and 177 deletions

View File

@@ -27,8 +27,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.pool.impl.GenericKeyedObjectPool;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.ldap.NamingException;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.validation.DirContextValidator;
@@ -428,18 +428,18 @@ public class PoolingContextSource implements ContextSource {
/**
* @see org.springframework.ldap.ContextSource#getReadOnlyContext()
*/
public DirContext getReadOnlyContext() throws DataAccessException {
public DirContext getReadOnlyContext() throws NamingException {
return this.getContext(DirContextType.READ_ONLY);
}
/**
* @see org.springframework.ldap.ContextSource#getReadWriteContext()
*/
public DirContext getReadWriteContext() throws DataAccessException {
public DirContext getReadWriteContext() throws NamingException {
return this.getContext(DirContextType.READ_WRITE);
}
protected DirContext getContext(DirContextType dirContextType) throws DataAccessException {
protected DirContext getContext(DirContextType dirContextType) throws NamingException {
final DirContext dirContext;
try {
dirContext = (DirContext)this.keyedObjectPool.borrowObject(dirContextType);