Package com.jengine.orm.db

Examples of com.jengine.orm.db.DBConnection.rollback()


        try {
            connection.startTransaction();
            loadData();
            throw new Exception("test!!!");
        } catch (Exception e) {
            connection.rollback();
            // checking
            check( Author.cls.count() == 0 );
            check( Library.cls.count() == 0 );
            check( Book.cls.count() == 0 );
            check( Member.cls.count() == 0 );
View Full Code Here


        connection.startTransaction();
        loadData();
            // save point
            DBSavePoint point = connection.savePoint();
            Author.cls.get(1).setLastName("test1");
            connection.rollback(point);
            connection.releasePoint(point);
        connection.commit();
        check( Author.cls.count() > 0 );
        check( Library.cls.count() > 0 );
        check( Book.cls.count() > 0 );
View Full Code Here

                connection.startTransaction();
                remove(obj);
                insert(obj);
                connection.commit();
            } catch (Exception e) {
                connection.rollback();
                throw new DBException(e);
            } finally {
                connection.finishTransaction();
            }
        } else {
View Full Code Here

            DBSavePoint point = connection.savePoint();
            try{
                remove(obj);
                insert(obj);
            } catch (Exception e) {
                connection.rollback(point);
                throw new DBException(e);
            } finally {
                connection.releasePoint(point);
            }
        }
View Full Code Here

        try {
            connection.startTransaction();
            loadData();
            throw new Exception("test!!!");
        } catch (Exception e) {
            connection.rollback();
            // checking
            check( Author.cls.count() == 0 );
            check( Library.cls.count() == 0 );
            check( Book.cls.count() == 0 );
            check( Member.cls.count() == 0 );
View Full Code Here

        connection.startTransaction();
        loadData();
            // save point
            DBSavePoint point = connection.savePoint();
            Author.cls.get(1).setLastName("test1");
            connection.rollback(point);
            connection.releasePoint(point);
        connection.commit();
        check( Author.cls.count() > 0 );
        check( Library.cls.count() > 0 );
        check( Book.cls.count() > 0 );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.