Example usage for javax.persistence RollbackException RollbackException

List of usage examples for javax.persistence RollbackException RollbackException

Introduction

In this page you can find the example usage for javax.persistence RollbackException RollbackException.

Prototype

public RollbackException() 

Source Link

Document

Constructs a new RollbackException exception with null as its detail message.

Usage

From source file:org.syncope.core.rest.data.UserRequestDataBinder.java

@Transactional(rollbackFor = { Throwable.class })
public void testCreate(final UserTO userTO) {
    SyncopeUser user = new SyncopeUser();
    userDataBinder.create(user, userTO);
    userDAO.save(user);//from w w w .  j av a 2 s  . c  om

    throw new RollbackException();
}

From source file:org.syncope.core.rest.data.UserRequestDataBinder.java

@Transactional(rollbackFor = { Throwable.class })
public void testUpdate(final UserMod userMod) throws NotFoundException, UnauthorizedRoleException {

    SyncopeUser user = getUserFromId(userMod.getId());
    userDataBinder.update(user, userMod);
    userDAO.save(user);/*w w  w  .ja va  2s .  c  o  m*/

    throw new RollbackException();
}

From source file:org.syncope.core.rest.data.UserRequestDataBinder.java

@Transactional(rollbackFor = { Throwable.class })
public void testDelete(final Long userId) throws NotFoundException, UnauthorizedRoleException {

    SyncopeUser user = getUserFromId(userId);
    userDAO.delete(user);//w  w  w.j a  v  a2s .com

    throw new RollbackException();
}