添加ConnectionChecker

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@293 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-29 04:37:11 +00:00
parent 3c07ac1224
commit d71767db94
8 changed files with 428 additions and 415 deletions
@@ -2,6 +2,7 @@ package com.alibaba.druid.logging;
import java.lang.reflect.Constructor;
@SuppressWarnings("rawtypes")
public class LogFactory {
private static Constructor logConstructor;
@@ -14,6 +15,7 @@ public class LogFactory {
tryImplementation("java.lang.Object", "com.ibatis.common.logging.nologging.NoLoggingImpl");
}
@SuppressWarnings("unchecked")
private static void tryImplementation(String testClassName, String implClassName) {
if (logConstructor == null) {
try {
@@ -39,6 +41,7 @@ public class LogFactory {
* Note that this method is only effective for log classes obtained after calling this method. If you intend to use
* this method you should call it before calling any other iBATIS method.
*/
@SuppressWarnings("unchecked")
public static synchronized void selectLog4JLogging() {
try {
Resources.classForName("org.apache.log4j.Logger");
@@ -54,6 +57,7 @@ public class LogFactory {
* or Log4J is on the classpath. Note that this method is only effective for log classes obtained after calling this
* method. If you intend to use this method you should call it before calling any other iBATIS method.
*/
@SuppressWarnings("unchecked")
public static synchronized void selectJavaLogging() {
try {
Resources.classForName("java.util.logging.Logger");