Examples of currentTransaction()


Examples of javax.jdo.PersistenceManager.currentTransaction()

    if (user == null){
      user = new User();
      user.setId(jid);
      user.setDateCrea(new Date());
      user.setNextUpdate(new Date());
      pm.currentTransaction().begin();
      pm.makePersistent(user);
      pm.currentTransaction().commit();
    }
   
   
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

      user.setId(jid);
      user.setDateCrea(new Date());
      user.setNextUpdate(new Date());
      pm.currentTransaction().begin();
      pm.makePersistent(user);
      pm.currentTransaction().commit();
    }
   
   
    pm.close();
    pm = null;
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

    DataManager dm = DataManagerFactory.getInstance();
    PersistenceManager pm = dm.newPersistenceManager();

    Subscription s = pm.getObjectById(Subscription.class, new Long(id));
    pm.currentTransaction().begin();
    pm.deletePersistent(s);
    pm.currentTransaction().commit();
    pm.flush();

    pm.close();
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

    PersistenceManager pm = dm.newPersistenceManager();

    Subscription s = pm.getObjectById(Subscription.class, new Long(id));
    pm.currentTransaction().begin();
    pm.deletePersistent(s);
    pm.currentTransaction().commit();
    pm.flush();

    pm.close();

    return true;
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

    @SuppressWarnings("unchecked")
    List<Subscription> list = (List<Subscription>) q.execute(user.getKey(),
        blog.getKey());

    if (list.size() > 0) {
      pm.currentTransaction().begin();
      pm.deletePersistent(list.get(0));
      pm.currentTransaction().commit();
      pm.flush();

    }
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

        blog.getKey());

    if (list.size() > 0) {
      pm.currentTransaction().begin();
      pm.deletePersistent(list.get(0));
      pm.currentTransaction().commit();
      pm.flush();

    }
    q.closeAll();
    pm.close();
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

          blog = new Blog();
          blog.setLatestEntry(calLongTime.getTime());
          blog.setNextUpdate(now);
          blog.setLink(link);
          blog.setRss(rss);
          pm.currentTransaction().begin();
          pm.makePersistent(blog);
          pm.currentTransaction().commit();
        }
      } else {
        Logger.getLogger("updateBlog").log(Level.WARNING,
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

          blog.setNextUpdate(now);
          blog.setLink(link);
          blog.setRss(rss);
          pm.currentTransaction().begin();
          pm.makePersistent(blog);
          pm.currentTransaction().commit();
        }
      } else {
        Logger.getLogger("updateBlog").log(Level.WARNING,
            "blog not found : "  + link);
      }
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

     
      user.setInterval(minutes);
      TalkService.sendMessage(id, "blog update every " + minutes + " minute(s)");
    }
   
    pm.currentTransaction().begin();
    pm.flush();
    pm.currentTransaction().commit();
   
    pm.close();
    pm = null;
View Full Code Here

Examples of javax.jdo.PersistenceManager.currentTransaction()

      TalkService.sendMessage(id, "blog update every " + minutes + " minute(s)");
    }
   
    pm.currentTransaction().begin();
    pm.flush();
    pm.currentTransaction().commit();
   
    pm.close();
    pm = null;
  }
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.