Example usage for org.apache.ibatis.session SqlSession commit

List of usage examples for org.apache.ibatis.session SqlSession commit

Introduction

In this page you can find the example usage for org.apache.ibatis.session SqlSession commit.

Prototype

void commit();

Source Link

Document

Flushes batch statements and commits database connection.

Usage

From source file:org.mobicents.servlet.sip.restcomm.dao.mybatis.MybatisSandBoxesDao.java

License:Open Source License

@Override
public void addSandBox(final SandBox sandBox) {
    final SqlSession session = sessions.openSession();
    try {//from  ww  w. ja  v  a  2s. c o  m
        session.insert(namespace + "addSandBox", toMap(sandBox));
        session.commit();
    } finally {
        session.close();
    }
}

From source file:org.mobicents.servlet.sip.restcomm.dao.mybatis.MybatisSandBoxesDao.java

License:Open Source License

@Override
public void removeSandBox(final Sid accountSid) {
    final SqlSession session = sessions.openSession();
    try {/*from  w ww.j a  va 2  s .co m*/
        session.delete(namespace + "removeSandBox", accountSid.toString());
        session.commit();
    } finally {
        session.close();
    }
}