Tabnine Logo
TransactionCoordinator.sendBeforeTransactionCompletionNotifications
Code IndexAdd Tabnine to your IDE (free)

How to use
sendBeforeTransactionCompletionNotifications
method
in
org.hibernate.engine.transaction.spi.TransactionCoordinator

Best Java code snippets using org.hibernate.engine.transaction.spi.TransactionCoordinator.sendBeforeTransactionCompletionNotifications (Showing top 6 results out of 315)

origin: org.hibernate/com.springsource.org.hibernate

@Override
protected void beforeTransactionCommit() {
  transactionCoordinator().sendBeforeTransactionCompletionNotifications( this );
  // basically, if we are the driver of the transaction perform a managed flush prior to
  // physically committing the transaction
  if ( isDriver && !transactionCoordinator().getTransactionContext().isFlushModeNever() ) {
    // if an exception occurs during flush, user must call rollback()
    transactionCoordinator().getTransactionContext().managedFlush();
  }
  if ( isDriver ) {
    transactionCoordinator().getTransactionContext().beforeTransactionCompletion( this );
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
protected void beforeTransactionCommit() {
  transactionCoordinator().sendBeforeTransactionCompletionNotifications( this );
  // basically, if we are the driver of the transaction perform a managed flush prior to
  // physically committing the transaction
  if ( isDriver && !transactionCoordinator().getTransactionContext().isFlushModeNever() ) {
    // if an exception occurs during flush, user must call rollback()
    transactionCoordinator().getTransactionContext().managedFlush();
  }
  if ( isDriver ) {
    transactionCoordinator().getTransactionContext().beforeTransactionCompletion( this );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

@Override
protected void beforeTransactionCommit() {
  transactionCoordinator().sendBeforeTransactionCompletionNotifications( this );
  final boolean flush = ! transactionCoordinator().getTransactionContext().isFlushModeNever() &&
      ( isDriver || ! transactionCoordinator().getTransactionContext().isFlushBeforeCompletionEnabled() );
  if ( flush ) {
    // if an exception occurs during flush, user must call rollback()
    transactionCoordinator().getTransactionContext().managedFlush();
  }
  if ( isDriver && isInitiator ) {
    transactionCoordinator().getTransactionContext().beforeTransactionCompletion( this );
  }
  closeIfRequired();
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
protected void beforeTransactionCommit() {
  transactionCoordinator().sendBeforeTransactionCompletionNotifications( this );
  final boolean flush = ! transactionCoordinator().getTransactionContext().isFlushModeNever() &&
      ( isDriver || ! transactionCoordinator().getTransactionContext().isFlushBeforeCompletionEnabled() );
  if ( flush ) {
    // if an exception occurs during flush, user must call rollback()
    transactionCoordinator().getTransactionContext().managedFlush();
  }
  if ( isDriver && isInitiator ) {
    transactionCoordinator().getTransactionContext().beforeTransactionCompletion( this );
  }
  closeIfRequired();
}
origin: org.hibernate/com.springsource.org.hibernate.core

public void beforeCompletion() {
  LOG.trace( "Transaction before completion callback" );
  boolean flush;
  try {
    final int status = transactionCoordinator
        .getTransactionContext()
        .getTransactionEnvironment()
        .getJtaPlatform()
        .getCurrentStatus();
    flush = managedFlushChecker.shouldDoManagedFlush( transactionCoordinator, status );
  }
  catch ( SystemException se ) {
    setRollbackOnly();
    throw exceptionMapper.mapStatusCheckFailure( "could not determine transaction status in beforeCompletion()", se );
  }
  try {
    if ( flush ) {
      LOG.trace( "Automatically flushing session" );
      transactionCoordinator.getTransactionContext().managedFlush();
    }
  }
  catch ( RuntimeException re ) {
    setRollbackOnly();
    throw exceptionMapper.mapManagedFlushFailure( "error during managed flush", re );
  }
  finally {
    transactionCoordinator.sendBeforeTransactionCompletionNotifications( null );
    transactionCoordinator.getTransactionContext().beforeTransactionCompletion( null );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public void beforeCompletion() {
  LOG.trace( "Transaction before completion callback" );
  boolean flush;
  try {
    final int status = transactionCoordinator
        .getTransactionContext()
        .getTransactionEnvironment()
        .getJtaPlatform()
        .getCurrentStatus();
    flush = managedFlushChecker.shouldDoManagedFlush( transactionCoordinator, status );
  }
  catch ( SystemException se ) {
    setRollbackOnly();
    throw exceptionMapper.mapStatusCheckFailure( "could not determine transaction status in beforeCompletion()", se );
  }
  try {
    if ( flush ) {
      LOG.trace( "Automatically flushing session" );
      transactionCoordinator.getTransactionContext().managedFlush();
    }
  }
  catch ( RuntimeException re ) {
    setRollbackOnly();
    throw exceptionMapper.mapManagedFlushFailure( "error during managed flush", re );
  }
  finally {
    transactionCoordinator.sendBeforeTransactionCompletionNotifications( null );
    transactionCoordinator.getTransactionContext().beforeTransactionCompletion( null );
  }
}
org.hibernate.engine.transaction.spiTransactionCoordinatorsendBeforeTransactionCompletionNotifications

Popular methods of TransactionCoordinator

  • getJdbcCoordinator
    Retrieves the JDBC coordinator currently operating within this transaction coordinator.
  • getTransactionContext
    Retrieves the context in which this coordinator operates.
  • pulse
    Attempts to register JTA synchronization if possible and needed.
  • getTransaction
    Get the Hibernate transaction facade object currently associated with this coordinator.
  • getSynchronizationCallbackCoordinator
  • afterNonTransactionalQuery
    Performs actions needed after execution of a non-transactional query.
  • afterTransaction
  • close
    Close the transaction context, returning any user supplied connection from the underlying JDBC coord
  • getSynchronizationRegistry
    Obtain the javax.transaction.Synchronization registry associated with this coordinator.
  • isSynchronizationRegistered
  • isTransactionInProgress
    Are we "in" an active and joined transaction
  • sendAfterTransactionBeginNotifications
  • isTransactionInProgress,
  • sendAfterTransactionBeginNotifications,
  • setRollbackOnly,
  • takeOwnership,
  • isTransactionJoinable,
  • resetJoinStatus

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JFrame (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now