[appengine-java] Re: Active transactions

2010-07-21 Thread Marcus Brody
Hello again, I cannot give you straightforward answer, try to do as little as possible. Create simple entity, try to create new, delete some by key, createIfNotExists and similar DAO methods. Do not put any nontrivial logic to this DAO. Also make sure you entities have "right" key type and such,

[appengine-java] Re: Active transactions

2010-07-21 Thread lisandrodc
Hi!Marcus, now I use your pattern for transactions: The code of the method: public void crearPartido(Long idEqLocal, Long idEqVisitante, Date fecha, Fecha fechaAgreg, String resultado, String hora,Long idTorneo){ PersistenceManager pm = JDOHelper.getPersi

[appengine-java] Re: Active transactions

2010-07-19 Thread Marcus Brody
try follow this pattern for transactions public void doSomthingWithEntity(T entity) { PersistenceManager pm = getPersistenceManager(); Transaction transaction = pm.currentTransaction(); try { transaction.begin(); //

[appengine-java] Re: Active transactions

2010-07-19 Thread Marcus Brody
Hi lisandrodc, please carefully read all documents http://code.google.com/appengine/docs/java/datastore/ and http://www.datanucleus.org/products/accessplatform_1_1/guides/jdo/daolayer_design.html Also many people cannot read spanish, if you would write in english you may get more answers. I thi