try {
return Transaction.execute(new TransactionCallback<Long>() {
@Override
public Long doInTransaction(TransactionStatus status) {
VpcDistributedRouterSeqNoVO seqVo = _vpcDrSeqNoDao.findByVpcId(vpcId);
if (seqVo == null) {
seqVo = new VpcDistributedRouterSeqNoVO(vpcId);
_vpcDrSeqNoDao.persist(seqVo);
}
seqVo = _vpcDrSeqNoDao.lockRow(seqVo.getId(), true);
seqVo.incrTopologyUpdateSequenceNo();
_vpcDrSeqNoDao.update(seqVo.getId(), seqVo);
return seqVo.getTopologyUpdateSequenceNo();
}
});
} finally {
}