bug fixed for thread-safe init

This commit is contained in:
wenshao
2013-07-28 10:36:05 +08:00
parent c65c28e9b2
commit 6e60d48b0a
@@ -59,7 +59,7 @@ public class WallFilter extends FilterAdapter implements WallFilterMBean {
public final static String ATTR_SQL_STAT = "wall.sqlStat";
@Override
public void init(DataSourceProxy dataSource) {
public synchronized void init(DataSourceProxy dataSource) {
if (this.dbType == null || this.dbType.trim().length() == 0) {
if (dataSource != null && dataSource.getDbType() != null) {
this.dbType = dataSource.getDbType();