Package javax.jdo

Examples of javax.jdo.Transaction.begin()


    PersistenceManager pm = null;
    try{
      pm = pmf.getPersistenceManager();
      Transaction tx = pm.currentTransaction();
      try{
        tx.begin();
        pm.makePersistent(sum);
        tx.commit();
        log.info("[SummaryCronService#execute()] save summary: " + sum);
      }finally{
        if(tx!=null&&tx.isActive()) tx.rollback();
View Full Code Here


    try{
      pm = pmf.getPersistenceManager();
      Transaction tx = pm.currentTransaction();
      try{
        for(Result r: resultList){
          tx.begin();
          log.info("[ResultsCronService#execute()] " +
              "insert result list (pre): " + r);
          pm.makePersistentAll(r);
          log.info("[ResultsCronService#execute()] " +
              "insert result (post): " + resultList.size());
View Full Code Here

    PersistenceManager pm = null;
    try{
      pm = pmf.getPersistenceManager();
      Transaction tx = pm.currentTransaction();
      try{
        tx.begin();
        summary =
            pm.getObjectById(Summary.class, Summary.DBKEY_SUMMARY);
        log.info("[StatisticsManager#retrieveSummary()] got from " +
            "database: " + summary);
        tx.commit();
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            // this must be done in the same transaction
            tx.begin();

            // first removing linked jdk

            Extent extent = pm.getExtent( Profile.class, true );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( Installation.class, true );

            Query query = pm.newQuery( extent );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( Project.class, true );

            Query query = pm.newQuery( extent );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( ProjectGroup.class, true );

            Query query = pm.newQuery( extent );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildDefinition.class, true );

            Query query = pm.newQuery( extent );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildDefinition.class, true );

            Query query = pm.newQuery( extent );
            query.setFilter( "this.template == true" );
View Full Code Here

        Transaction tx = pm.currentTransaction();

        try
        {
            tx.begin();

            Extent extent = pm.getExtent( BuildDefinition.class, true );

            Query query = pm.newQuery( extent );
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.