// 资源预锁定 public String resourceHold( String resourceId, String resType, String resName, String userId, java.sql.Timestamp stTime, int duration) { TraningSourceLock tsl = new TraningSourceLock(resourceId, resName, resType, userId); return tsl.hold(duration, stTime); }
// 资源锁定 public boolean resourceLock(String resId) { TraningSourceLockDao dao = new TraningSourceLockDao(); TraningSourceLock lock = dao.find(resId); return lock.lock(); }