Codota Logo
Synchronizations
Code IndexAdd Codota to your IDE (free)

How to use
Synchronizations
in
org.jboss.seam.transaction

Best Java code snippets using org.jboss.seam.transaction.Synchronizations (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.jbpm/droolsjbpm-knowledge-services

public void begin() throws NotSupportedException, SystemException {
  btm.begin();
  getSynchronizations().afterTransactionBegin();
}
origin: org.jbpm/droolsjbpm-knowledge-services

public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
  
  boolean success = false;
  Synchronizations synchronizations = getSynchronizations();
  synchronizations.beforeTransactionCommit();
  try {
    btm.commit();
    success = true;
  } finally {
    synchronizations.afterTransactionCompletion(success);
  }
}
origin: org.jbpm/droolsjbpm-knowledge-services

@Override
public void registerSynchronization(Synchronization sync) {
  Synchronizations synchronizations = getSynchronizations();
  if (synchronizations.isAwareOfContainerTransactions()) {
    synchronizations.registerSynchronization(sync);
  } else {
    throw new UnsupportedOperationException("cannot register synchronization with container transaction, use <transaction:ejb-transaction/>");
  }
}
origin: org.jboss.seam/jboss-seam

public void commit() throws RollbackException, HeuristicMixedException,
    HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
{
 UserTransaction userTransaction = ejbContext.getUserTransaction();
 boolean success = false;
 Synchronizations synchronizations = getSynchronizations();
 synchronizations.beforeTransactionCommit();
 try
 {
   userTransaction.commit();
   success = true;
 }
 finally
 {
   synchronizations.afterTransactionCommit(success);
 }
}
origin: org.jboss.seam/jboss-seam

@Override
public void registerSynchronization(Synchronization sync)
{
 getSynchronizations().registerSynchronization(sync);
}
origin: org.jboss.seam.transaction/seam-transaction

public void beforeCompletion() {
  getSynchronizations().beforeTransactionCommit();
}
origin: org.jboss.seam.transaction/seam-transaction

public void afterCompletion(int status) {
  boolean success = Status.STATUS_COMMITTED == status;
  getSynchronizations().afterTransactionCompletion(success);
  rollbackOnly = false;
  synchronizationRegistered = false;
}
origin: org.jboss.seam/jboss-seam

public void rollback() throws IllegalStateException, SecurityException, SystemException
{
 log.debug("rolling back JTA transaction");
 try
 {
   delegate.rollback();
 }
 finally
 {
   getSynchronizations().afterTransactionRollback();
 }
}
origin: org.jboss.seam/jboss-seam

public void commit() throws RollbackException, HeuristicMixedException,
    HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
{
 log.debug("committing JTA transaction");
 boolean success = false;
 Synchronizations synchronizations = getSynchronizations();
 synchronizations.beforeTransactionCommit();
 try
 {
   delegate.commit();
   success = true;
 }
 finally
 {
   synchronizations.afterTransactionCommit(success);
 }
}
origin: org.jboss.seam/jboss-seam-ioc

@Override
public void registerSynchronization(Synchronization sync)
{
 getSynchronizations().registerSynchronization(sync);
}
origin: org.jbpm/droolsjbpm-knowledge-services

public void rollback() throws IllegalStateException, SecurityException, SystemException {
  
  try {
    btm.rollback();
  } finally {
    getSynchronizations().afterTransactionCompletion(false);
  }
}
origin: org.jboss.seam/jboss-seam

public void rollback() throws IllegalStateException, SecurityException, SystemException
{
 UserTransaction userTransaction = ejbContext.getUserTransaction();
 try
 {
   userTransaction.rollback();
 }
 finally
 {
   getSynchronizations().afterTransactionRollback();
 }
}
origin: org.jboss.seam.transaction/seam-transaction

public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
  UserTransaction userTransaction = ejbContext.getUserTransaction();
  boolean success = false;
  Synchronizations synchronizations = getSynchronizations();
  synchronizations.beforeTransactionCommit();
  try {
    userTransaction.commit();
    success = true;
  } finally {
    synchronizations.afterTransactionCompletion(success);
  }
}
origin: org.jboss.seam.transaction/seam-transaction

@Override
public void registerSynchronization(Synchronization sync) {
  Synchronizations synchronizations = getSynchronizations();
  if (synchronizations.isAwareOfContainerTransactions()) {
    synchronizations.registerSynchronization(sync);
  } else {
    throw new UnsupportedOperationException("cannot register synchronization with container transaction, use <transaction:ejb-transaction/>");
  }
}
origin: org.jboss.seam.transaction/seam-transaction

public void begin() throws NotSupportedException, SystemException {
  log.debug("beginning JPA resource-local transaction");
  // TODO: translate exceptions that occur into the correct JTA exception
  try {
    getDelegate().begin();
    getSynchronizations().afterTransactionBegin();
  } catch (RuntimeException re) {
    throw re;
  }
}
origin: org.jboss.seam/jboss-seam-ioc

public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
{
 log.debug("committing Spring transaction");
 assertActive();
 boolean success = false;
 Synchronizations synchronizations = getSynchronizations();
 synchronizations.beforeTransactionCommit();
 try
 {
   getPlatformTransactionManagerRequired().commit(currentTransaction);
   success = true;
 }
 finally
 {
   currentTransaction = null;
   synchronizations.afterTransactionCommit(success);
 }
}
origin: org.jboss.seam.transaction/seam-transaction

@Override
public void registerSynchronization(Synchronization sync) {
  getSynchronizations().registerSynchronization(sync);
}
origin: org.jboss.seam.transaction/seam-transaction

public void rollback() throws IllegalStateException, SecurityException, SystemException {
  log.debug("rolling back JPA resource-local transaction");
  // TODO: translate exceptions that occur into the correct JTA exception
  javax.persistence.EntityTransaction delegate = getDelegate();
  try {
    delegate.rollback();
  } finally {
    getSynchronizations().afterTransactionCompletion(false);
  }
}
origin: org.jboss.seam/jboss-seam

public void rollback() throws IllegalStateException, SecurityException, SystemException
{
 log.debug("rolling back JPA resource-local transaction");
 //TODO: translate exceptions that occur into the correct JTA exception
 assertActive();
 javax.persistence.EntityTransaction delegate = getDelegate();
 clearEntityManager();
 try
 {
   delegate.rollback();
 }
 finally
 {
   getSynchronizations().afterTransactionRollback();
 }
}
origin: org.jboss.seam.transaction/seam-transaction

public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
  log.debug("committing JTA transaction");
  boolean success = false;
  Synchronizations synchronizations = getSynchronizations();
  synchronizations.beforeTransactionCommit();
  try {
    delegate.commit();
    success = true;
  } finally {
    synchronizations.afterTransactionCompletion(success);
  }
}
org.jboss.seam.transactionSynchronizations

Javadoc

Interface for registering transaction synchronizations

Most used methods

  • afterTransactionBegin
  • beforeTransactionCommit
  • registerSynchronization
  • isAwareOfContainerTransactions
  • afterTransactionCommit
  • afterTransactionCompletion
  • afterTransactionRollback

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
  • onCreateOptionsMenu (Activity)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now