add license description.

This commit is contained in:
Zhanming Qi
2012-08-24 14:28:36 +08:00
parent 0db88a818c
commit e575190fc6
963 changed files with 14500 additions and 117 deletions
@@ -1,3 +1,18 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid;
import java.beans.PropertyVetoException;
@@ -71,14 +86,14 @@ public class TestRollBack {
@Before
public void before() {
// 清空所有数据
// 清空æ‰?œ‰æ•°æ�®
dao_c3p0.clear("msg");
}
@Test
public void test_c3p0() {
try {
// 将两条插入语句包裹在一个事务内执行,第一条可以正常插入,第二条超过字段长度,会抛异常,事务会回滚
// 将两æ�¡æ�’入语å�¥åŒ…裹在ä¸?¸ªäº‹åŠ¡å†…æ‰§è¡?第一æ�¡å�¯ä»¥æ­£å¸¸æ�’å…?第二æ�¡è¶…过字段长åº?会抛异常,事务会回æ»?
Trans.exec(new Atom() {
@Override
public void run() {
@@ -89,7 +104,7 @@ public class TestRollBack {
} catch (Exception e) {
}
// abc也跟着回滚了
// abc也跟ç�?›žæ»šäº†
Assert.assertNull(dao_c3p0.fetch("msg", Cnd.where("message", "=", "abc")));
}