upgrade q.setLockMode("waitAddrckinBuff", LockMode.UPGRADE);

http 协议的content_type


cacheprovider的机制

cache.setCacheStore(store);

com.dyuproject.protostuff.ProtostuffIOUtil 对象序列化包

private int setLoading(final long count) {
return (Integer)getHibernateTemplate().execute(new HibernateCallback<Integer>() {

@Override
public Integer doInHibernate(Session session)
throws HibernateException, SQLException {

Query lockQuery = session.createQuery(lockSql);
lockQuery.setLockMode("t", LockMode.UPGRADE);
lockQuery.setParameter(0, tableName);
lockQuery.list();

Query query = session.createQuery(sql_set_loading);
query.setString(0, localIP);
query.setLong(1, count);
return query.executeUpdate();
}
});
}


lockQuery.setLockMode("t", LockMode.UPGRADE); 锁表记录。 (for update) http://www.cnblogs.com/xiohao/p/4385508.html;


TS_TABLE_LOCK

<class name="RMSDistDate" table="TT_RMS_SRC">

把线程配置和kafka联系起来


COD 袁征 in 切换KAFKA;
我们是easyinput 和addrinput 输单 out 切换KAFKA。

spring 版本几是支持注释的

hibernate save 1000条会不会报错, 面向对象

 

private int setLoading(final long count) {
return (Integer) getHibernateTemplate().execute(new HibernateCallback<Integer>() {
@Override
public Integer doInHibernate(Session session) throws HibernateException, SQLException {
// lockDao.getLock(tableName);
Query lockQuery = session.createQuery(lockSql);
lockQuery.setLockMode("t", LockMode.UPGRADE);
lockQuery.setParameter(0, tableName);
lockQuery.list();

Query query = session.createQuery(sql_set_loading);
query.setString(0, EnvironmentUtil.getLocalIp());
query.setLong(1, count);
return query.executeUpdate();
}
});
}

 

private String lockSql = "from TableLock as t where tableName = ?";

posted @ 2017-07-14 16:37  adaandy  阅读(156)  评论(0编辑  收藏  举报