Package javax.jdo

Examples of javax.jdo.Transaction.commit()


            query.setResult( "max(this.id)" );

            int result = (Integer) query.execute( projectId, buildResultId );

            tx.commit();

            return result;
        }
        finally
        {
View Full Code Here


                result = (List<BuildResult>) query.execute();
            }

            result = (List<BuildResult>) pm.detachCopyAll( result );

            tx.commit();

            if ( result != null && !result.isEmpty() )
            {
                Map<Integer, BuildResult> builds = new HashMap<Integer, BuildResult>();
View Full Code Here

            return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
        }
        finally
        {
            tx.commit();

            rollback( tx );
        }
    }
View Full Code Here

                return projects;
            }
        }
        finally
        {
            tx.commit();

            rollback( tx );
        }

        return null;
View Full Code Here

                return projectGroups;
            }
        }
        finally
        {
            tx.commit();

            rollback( tx );
        }
        return null;
    }
View Full Code Here

            pm.makePersistent(p1);
            pm.makePersistent(p2);
            pm.makePersistent(p3);
            pm.makePersistent(p4);
            pm.makePersistent(p5);
            tx.commit();
        }
        finally {
            if ((tx != null) && tx.isActive())
                tx.rollback();
        }
View Full Code Here

            Transaction tx = pm.currentTransaction();
            try {
                ThreadSafe.this.logger.debug("[" + threadName + "]: running");
                tx.begin();
                pm.makePersistent(pc);
                tx.commit();
                tx = null;
                winning((PCPoint) pc);
                complete();
            }
            catch (JDOUserException ex) {
View Full Code Here

            PCPoint p21 = new PCPoint(210, 220);
            PCPoint p22 = new PCPoint(220, 240);
            PCRect rect2 = new PCRect (0, p21, p22);
            pm2.makePersistent (rect2);
           
            tx.commit();
            tx2.commit();
       
            tx.begin();
            tx2.begin();
           
View Full Code Here

            if (p21a != p21) {
                fail(ASSERTION_FAILED,
                     "unexpected PCPoint instance, expected: 210, 220, found: " + p21a.getX() + ", " + p21a.getY());
            }
           
            tx.commit();
            tx = null;
            tx2.commit();
            tx2 = null;
        }
        finally {
View Full Code Here

        for( i = 0; i < 50; ++i ){
            StateTransitionObj sto = new StateTransitionObj(i);
            sto.writeField(i);
            pm.makePersistent(sto);
        }
        t.commit();
        if( !doPersistentInstancesExist() )
            if (debug)
                logger.debug("StateTransitions unable to create instances of StateTransitionsObj");
    }
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.