Examples of rollback()


Examples of org.apache.ojb.otm.core.Transaction.rollback()

        }
        catch (LockingException ex)
        {
            if (tx.isInProgress())
            {
                tx.rollback();
            }
            throw ex;
        }
        finally
        {
View Full Code Here

Examples of org.apache.openjpa.kernel.Broker.rollback()

        broker = getBrokerFactory().newBroker();
        broker.begin();
        // test again against a new PM, for good measure
        assertSize(size,
            (List) broker.newQuery(JPQLParser.LANG_JPQL, c, qstrng).execute());
        broker.rollback();

        broker.close();
    }

    public void testComplex1() {
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityTransaction.rollback()

            manager.createQuery("DELETE FROM JamesUser user").executeUpdate();
            transaction.commit();
        } catch (Exception e) {
            e.printStackTrace();
            if (transaction.isActive()) {
                transaction.rollback();
            }
        } finally {
            manager.close();
        }
    }
View Full Code Here

Examples of org.apache.phoenix.hbase.index.covered.LocalTableState.rollback()

    Pair<Scanner, IndexUpdate> p = table.getIndexedColumnsTableState(Arrays.asList(col));
    Scanner s = p.getFirst();
    assertEquals("Didn't get the pending mutation's value first", kv, s.next());

    // rollback that value
    table.rollback(Arrays.asList(kv));
    p = table.getIndexedColumnsTableState(Arrays.asList(col));
    s = p.getFirst();
    assertEquals("Didn't correctly rollback the row - still found it!", null, s.next());
    Mockito.verify(env, Mockito.times(1)).getRegion();
    Mockito.verify(region, Mockito.times(1)).getScanner(Mockito.any(Scan.class));
View Full Code Here

Examples of org.apache.qpid.server.AMQChannel.rollback()

            if (channel == null)
            {
                throw evt.getMethod().getChannelNotFoundException(evt.getChannelId());
            }

            channel.rollback();
            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            session.writeFrame(TxRollbackOkBody.createAMQFrame(evt.getChannelId(), (byte) 8, (byte) 0));
            //Now resend all the unacknowledged messages back to the original subscribers.
View Full Code Here

Examples of org.apache.qpid.server.protocol.v0_8.AMQChannel.rollback()

                {
                    session.writeFrame(responseBody.generateFrame(channelId));
                }
            };

            channel.rollback(task);

            //Now resend all the unacknowledged messages back to the original subscribers.
            //(Must be done after the TxnRollback-ok response).
            // Why, are we not allowed to send messages back to client before the ok method?
            channel.resend(false);
View Full Code Here

Examples of org.apache.qpid.server.txn.LocalTransaction.rollback()

        }
        finally
        {
            if (shouldRollback)
            {
                txn.rollback();
            }
        }

    }
View Full Code Here

Examples of org.apache.qpid.server.txn.ServerTransaction.rollback()

        ServerTransaction txn = _openTransactions.get(transactionId);
        if(txn != null)
        {
            if(fail)
            {
                txn.rollback();
            }
            else
            {
                txn.commit();
            }
View Full Code Here

Examples of org.apache.sandesha2.storage.Transaction.rollback()

        {
          if (log.isErrorEnabled())
            log.error(e1);
        } finally {
          if (transaction != null) {
            transaction.rollback();
            transaction = null;
          }
        }
       
      }
View Full Code Here

Examples of org.apache.solr.client.solrj.SolrServer.rollback()

        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_ADD_BEANS)) {
            serverToUse.addBeans(exchange.getIn().getBody(Collection.class));
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_COMMIT)) {
            serverToUse.commit();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_ROLLBACK)) {
            serverToUse.rollback();
        } else if (operation.equalsIgnoreCase(SolrConstants.OPERATION_OPTIMIZE)) {
            serverToUse.optimize();
        } else {
            throw new IllegalArgumentException(SolrConstants.OPERATION + " header value '" + operation + "' is not supported");
        }
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.