JDBC bundle uses local ClassLoader as bean ClassLoader for "sql-error-codes.xml" parsing (SPR-7497)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3625 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller 2010-09-01 13:46:57 +00:00
parent be6a363e70
commit 6567fa437b
1 changed files with 2 additions and 1 deletions

View File

@ -97,10 +97,11 @@ public class SQLErrorCodesFactory {
* @see #loadResource(String) * @see #loadResource(String)
*/ */
protected SQLErrorCodesFactory() { protected SQLErrorCodesFactory() {
Map<String, SQLErrorCodes> errorCodes = null; Map<String, SQLErrorCodes> errorCodes;
try { try {
DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); DefaultListableBeanFactory lbf = new DefaultListableBeanFactory();
lbf.setBeanClassLoader(getClass().getClassLoader());
XmlBeanDefinitionReader bdr = new XmlBeanDefinitionReader(lbf); XmlBeanDefinitionReader bdr = new XmlBeanDefinitionReader(lbf);
// Load default SQL error codes. // Load default SQL error codes.