Examples of TransactionManagerImpl


Examples of com.caucho.transaction.TransactionManagerImpl

  {
    if (! isCMT())
      throw new IllegalStateException("setRollbackOnly may not be called from a bean-managed transaction");

    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();
   
      Transaction trans = tm.getTransaction();

      if (trans != null)
        trans.setRollbackOnly();
      else
        throw new IllegalStateException(L.l("setRollbackOnly called with no active transaction"));
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

  {
    if (! isCMT())
      throw new IllegalStateException("getRollbackOnly may not be called from a bean-managed transaction");
   
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();
   
      Transaction trans = tm.getTransaction();

      if (trans != null)
        return trans.getStatus() == Status.STATUS_MARKED_ROLLBACK;
      else
        throw new IllegalStateException("getRollbackOnly requires a valid container-managed transaction");
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * Enlists a resource
   */
  public void enlist(XAResource xaResource)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null && xaResource != null)
        xa.enlistResource(xaResource);
    } catch (RuntimeException e) {
      throw e;
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * Enlists a resource
   */
  public void registerSynchronization(SessionSynchronization sync)
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null && sync != null) {
        xa.registerSynchronization(new SynchronizationAdapter(sync));
       
        sync.afterBegin();
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * Begins a mandatory transaction.
   */
  public void beginMandatory()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa == null)
        throw new EJBTransactionRequiredException(L
            .l("Transaction required for 'Mandatory' transaction attribute"));
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * Begins a never transaction.
   */
  public void beginNever()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null)
        throw new EJBException(L
            .l("Transaction forbidden for 'Never' transaction attribute"));
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * @return the current transaction if it exists
   */
  public Transaction beginRequired()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.getTransaction();

      if (xa != null)
        return xa;

      _ut.begin();
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * @return the current transaction if it exists
   */
  public Transaction beginRequiresNew()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      Transaction xa = tm.suspend();

      _ut.begin();

      return xa;
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

    } catch (Exception e) {
      throw new EJBException(e);
    } finally {
      try {
        if (parent != null) {
          TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

          tm.resume(parent);
        }
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        throw new EJBException(e);
View Full Code Here

Examples of com.caucho.transaction.TransactionManagerImpl

   * @return the current transaction if it exists
   */
  public Transaction beginNotSupported()
  {
    try {
      TransactionManagerImpl tm = TransactionManagerImpl.getLocal();

      return tm.suspend();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new EJBException(e);
    }
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.