Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.Database.rollback()


            db.begin();
            db.update(car1Client1);
            db.update(driver1Client1);
            db.commit();
        } catch (ObjectModifiedException ome) {
            db.rollback();
           
            //5.2 client1 reload DRIVER ONE
            db.begin();
            driver1Client1 = (Driver) db.load(Driver.class, "AAADRV01");
            db.commit();
View Full Code Here


            db.update(orderClient1);
            db.update(computer1Client1);
            db.update(computer2Client1);
            db.commit();
        } catch (ObjectModifiedException ome) {
            db.rollback();
           
            //5.2 client1 reload COMPUTER 2
            db.begin();
            computer2Client1 = (Computer) db.load(Computer.class, "AAAACP02");
            db.commit();
View Full Code Here

        LOG.debug("Product loaded: " + product);
        LOG.debug("NewProduct loaded: " + newProduct);
       
        // we only loaded both objects in one tx. Now we are doing a rollback.
        LOG.info("Calling Rollback");
        db.rollback();
       
        LOG.info("End transaction: Trying to reproduce rollback bug");
        db.close();
    }
}
View Full Code Here

                db.load(ExtendedObject.class, new Integer(1));
                db.commit();
                db.close();
                fail();
            } catch (ClassCastException e) {
                db.rollback();
                db.close();
            }
        } catch (MappingException ex) {
            LOG.error(ex.getMessage(), ex);
            fail(ex.getMessage());
View Full Code Here

                obj1.setDescription2(obj1.getDescription2() + " - 1");
                db.commit();
                db.close();
                fail();
            } catch (ClassCastException ex) {
                db.rollback();
                db.close();
            }
        } catch (MappingException ex) {
            LOG.error(ex.getMessage(), ex);
            fail(ex.getMessage());
View Full Code Here

        }
        catch(Exception e)
        {
          try
          {
            db.rollback();
          }
          catch(Exception e2) { e2.printStackTrace(); }
                  logger.error("An error occurred when updating content version for content: " + e.getMessage(), e);         
        }
        finally
View Full Code Here

    }
    catch ( Exception e)
    {
      try
            {
                db.rollback();
                db.close();
            }
      catch (Exception e1)
            {
                logger.error("An error occurred when importing a repository: " + e.getMessage(), e);
View Full Code Here

      marshaller.marshal(infoGlueExportImpl);
     
      osw.flush();
      osw.close();
     
      db.rollback();
    }
    catch (Exception e)
    {
      logger.error("An error was found exporting a repository: " + e.getMessage(), e);
      db.rollback();
View Full Code Here

      db.rollback();
    }
    catch (Exception e)
    {
      logger.error("An error was found exporting a repository: " + e.getMessage(), e);
      db.rollback();
    }
    finally
    {
      db.close()
    }
View Full Code Here

    {
      if (db != null)
      {
        try
        {
          db.rollback();
          db.close();
        }
        catch (PersistenceException ex)
        {
          logger.error("Error when closing db after failed to get display name for content type definition. Message: " + ex.getMessage());
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.