Package org.jboss.forge.addon.resource.transaction

Examples of org.jboss.forge.addon.resource.transaction.ResourceTransaction


   }

   @Override
   public boolean isEnabled(ShellContext context)
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      return transaction.isStarted();
   }
View Full Code Here


   }

   @Override
   public Result execute(ShellContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (!transaction.isStarted())
      {
         return Results.fail("Resource Transaction is not started");
      }
      transaction.commit();
      return Results.success();
   }
View Full Code Here

   }

   @Override
   public boolean isEnabled(ShellContext context)
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      return transaction.isStarted();
   }
View Full Code Here

   }

   @Override
   public Result execute(ShellContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (!transaction.isStarted())
      {
         return Results.fail("Resource Transaction is not started");
      }
      transaction.rollback();
      return Results.success();
   }
View Full Code Here

   }

   @Override
   public Result execute(ShellContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (transaction.isStarted())
      {
         return Results.fail("Resource Transaction is already started");
      }
      if (timeout.getValue() != null)
      {
         transaction.setTransactionTimeout(timeout.getValue());
      }
      transaction.begin();
      return Results.success("Resource Transaction started");
   }
View Full Code Here

   }

   @Override
   public Result execute(UIExecutionContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (transaction.isStarted())
      {
         return Results.fail("Resource Transaction is already started");
      }
      if (timeout.getValue() != null)
      {
         transaction.setTransactionTimeout(timeout.getValue());
      }
      transaction.begin();
      return Results.success("Resource Transaction started");
   }
View Full Code Here

   }

   @Override
   public boolean isEnabled(ShellContext context)
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      return transaction.isStarted();
   }
View Full Code Here

   }

   @Override
   public Result execute(UIExecutionContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (!transaction.isStarted())
      {
         return Results.fail("Resource Transaction is not started");
      }
      transaction.commit();
      return Results.success();
   }
View Full Code Here

   }

   @Override
   public boolean isEnabled(ShellContext context)
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      return transaction.isStarted();
   }
View Full Code Here

   }

   @Override
   public Result execute(UIExecutionContext shellContext) throws Exception
   {
      ResourceTransaction transaction = resourceFactory.getTransaction();
      if (!transaction.isStarted())
      {
         return Results.fail("Resource Transaction is not started");
      }
      transaction.rollback();
      return Results.success();
   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.resource.transaction.ResourceTransaction

Copyright © 2018 www.massapicom. 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.