mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed jetty jndi
This commit is contained in:
@@ -95,9 +95,12 @@ public class DruidDataSourceFactory implements ObjectFactory {
|
||||
return null;
|
||||
}
|
||||
Reference ref = (Reference) obj;
|
||||
//if (!"javax.sql.DataSource".equals(ref.getClassName())) {
|
||||
// return null;
|
||||
//}
|
||||
|
||||
if ((!"javax.sql.DataSource".equals(ref.getClassName())) //
|
||||
&& (!"com.alibaba.druid.pool.DruidDataSource".equals(ref.getClassName())) //
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Properties properties = new Properties();
|
||||
for (int i = 0; i < ALL_PROPERTIES.length; i++) {
|
||||
@@ -111,7 +114,7 @@ public class DruidDataSourceFactory implements ObjectFactory {
|
||||
|
||||
return createDataSourceInternal(properties);
|
||||
}
|
||||
|
||||
|
||||
protected DataSource createDataSourceInternal(Properties properties) throws Exception {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
config(dataSource, properties);
|
||||
|
||||
Reference in New Issue
Block a user