NutzCN Logo
问答 方法锁的使用技巧-欢迎拍砖
发布于 2482天前 作者 Rekoe 1849 次浏览 复制 上一个帖子 下一个帖子
标签:

JdbcExpertConfigFile 类中的实现

    public FilePool getPool() {
    	if (!isInit)
    		synchronized (this) {
    			if (!isInit)
    				initFilePool();
    		}
        if (pool == null) {
            if (log.isWarnEnabled())
                log.warnf("NutDao FilePool create fail!! Blob and Clob Support is DISABLE!!");
            throw new DaoException("NutDao FilePool create fail!! Blob and Clob Support is DISABLE!!");
        }
        return pool;
    }

个人感觉还是加个对象锁好一些,欢迎拍砖

1 回复

嗯,我改一下

添加回复
请先登陆
回到顶部