Browse Source

REPORT-9508 jboss启动报错

druid对spring的支持我们也用不到,删掉
release/9.0
ju 6 years ago
parent
commit
c90e6ed9a7
  1. 37
      fine-druid/src/com/fr/third/alibaba/druid/support/monitor/MonitorClient.java
  2. 13
      fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDao.java

37
fine-druid/src/com/fr/third/alibaba/druid/support/monitor/MonitorClient.java

@ -26,9 +26,6 @@ import com.fr.third.alibaba.druid.support.http.stat.WebURIStatValue;
import com.fr.third.alibaba.druid.support.logging.Log;
import com.fr.third.alibaba.druid.support.logging.LogFactory;
import com.fr.third.alibaba.druid.support.monitor.dao.MonitorDao;
import com.fr.third.alibaba.druid.support.spring.stat.SpringMethodStatValue;
import com.fr.third.alibaba.druid.support.spring.stat.SpringStat;
import com.fr.third.alibaba.druid.support.spring.stat.SpringStatManager;
import com.fr.third.alibaba.druid.util.StringUtils;
import com.fr.third.alibaba.druid.util.Utils;
import com.fr.third.alibaba.druid.wall.WallProviderStatValue;
@ -47,8 +44,6 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import static com.fr.third.alibaba.druid.util.Utils.getBoolean;
public class MonitorClient {
private final static Log LOG = LogFactory.getLog(MonitorClient.class);
@ -192,14 +187,6 @@ public class MonitorClient {
}
}, timeBetweenSqlCollect, timeBetweenSqlCollect, timeUnit);
scheduler.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
collectSpringMethod();
}
}, timeBetweenSpringCollect, timeBetweenSpringCollect, timeUnit);
scheduler.scheduleAtFixedRate(new Runnable() {
@Override
@ -285,30 +272,6 @@ public class MonitorClient {
return ctx;
}
private void collectSpringMethod() {
if (!collectSpringMethodEnable) {
return;
}
List<SpringMethodStatValue> statValueList = new ArrayList<SpringMethodStatValue>();
Set<Object> stats = SpringStatManager.getInstance().getSpringStatSet();
for (Object item : stats) {
if (!(item instanceof SpringStat)) {
continue;
}
SpringStat sprintStat = (SpringStat) item;
statValueList.addAll(sprintStat.getStatList(true));
}
if (statValueList.size() > 0) {
MonitorContext ctx = createContext();
dao.saveSpringMethod(ctx, statValueList);
}
}
private void collectWebURI() {
if ((!collectWebAppEnable) && !collectWebURIEnable) {
return;

13
fine-druid/src/com/fr/third/alibaba/druid/support/monitor/dao/MonitorDao.java

@ -15,27 +15,24 @@
*/
package com.fr.third.alibaba.druid.support.monitor.dao;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.fr.third.alibaba.druid.pool.DruidDataSourceStatValue;
import com.fr.third.alibaba.druid.stat.JdbcSqlStatValue;
import com.fr.third.alibaba.druid.support.http.stat.WebAppStatValue;
import com.fr.third.alibaba.druid.support.http.stat.WebURIStatValue;
import com.fr.third.alibaba.druid.support.monitor.MonitorContext;
import com.fr.third.alibaba.druid.support.spring.stat.SpringMethodStatValue;
import com.fr.third.alibaba.druid.wall.WallProviderStatValue;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;
public interface MonitorDao {
void saveSql(MonitorContext ctx, List<DruidDataSourceStatValue> statList);
void saveSqlWall(MonitorContext ctx, List<WallProviderStatValue> statList);
void saveSpringMethod(MonitorContext ctx, List<SpringMethodStatValue> methodList);
void saveWebURI(MonitorContext ctx, List<WebURIStatValue> uriList);
void saveWebApp(MonitorContext ctx, List<WebAppStatValue> uriList);

Loading…
Cancel
Save