Wednesday 15 May 2013

jpa 2.0 - Using JPA2 to put data asynchronously to google datastore -


I am using JPA2 @entity to represent my model I am datastore Need to insert asynchronous data. How do I do this? If a JPA Dao can not do this, can I use the Asyncdathore service at JPA institutions instead of JPPL? Is anyone an example?

(I know in python this will be fun because I can expand ndb.model to create the model and then call them at put_async. But in Java There is no ndb.model to expand, so I am using JPA.)

I highly anticipate the following thread manager. Do not use content backgroundread . But so far I've got it all. Does anyone else have something very simple (like put_async of Python?)?

  Import com.google.appengine.api.ThreadManager; Import java.util.concurrent.AtomicLong; Atom long counter = new atom (); Thread thread = ThreadManager.Cutut BackgroundTrader (New Runnabal) (Public Wired Run) {try {while true} {counter.incrementAndGet ()); Thread Slip (10);}} Catch (before interreated expression) {new runtime exposure "interrupted in loop:", prior);}}}); Thread.start ();    

No comments:

Post a Comment