Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6960191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:22:13+00:00 2026-05-27T15:22:13+00:00

Today it’s the first time I’m using GWT and JDO. I am running it

  • 0

Today it’s the first time I’m using GWT and JDO. I am running it with Eclipse in the local debug mode.

I do the following thing:

    public Collection<MyObject> add(MyObject o) {
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
    pm.makePersistent(o);
    Query query = pm.newQuery(MyObject.class);// fetch all objects incl. o. But o only sometimes comes...
List<MyObject> rs = (List<MyObject>) query.execute();
ArrayList<MyObject> list= new ArrayList<MyObject>();
for (MyObject r : rs) {
    list.add(r);
}
return list; 
} finally {
    pm.close();
}
}

I already set <property name="datanucleus.appengine.datastoreReadConsistency" value="STRONG" /> in my jdoconfig.xml. Do I have to set some other transaction stuff in the config? Was somebody got a working jdoconfig.xml? Or is the problem somewhere else? Some caching inbetween?

EDIT: Things I have tried:

  • Setting NontransactionalRead/Write to false
  • Using the same/a different PersistenceManager though calling PMF.get().getPersistenceManager() multiple times
  • Using transactions
  • ignoreCache = true on PersistenceManager
  • calling flush and checkConsistency

The jdoconfig:

    <persistence-manager-factory name="transactions-optional">
<property name="datanucleus.appengine.datastoreReadConsistency" value="STRONG" />
    <property name="javax.jdo.PersistenceManagerFactoryClass"
        value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
    <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
    <property name="javax.jdo.option.NontransactionalRead" value="true"/>
    <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
    <property name="javax.jdo.option.RetainValues" value="true"/>
    <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
</persistence-manager-factory>

I must be missing something central here because all approaches fail…

EDIT2: When I split the job into two transaction the log says that the write transaction fished and then the read transaction starts. But it doesn’t find the just persited object. It always says Level 1 Cache of type "weak" initialised aswell. Is week bad or good?

It about 30% of requests that go wrong… Might I be some lazy query loading issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:22:13+00:00Added an answer on May 27, 2026 at 3:22 pm

    Franz, the Default read consistency in the JDO Config is STRONG. so if you are trying to approach it in that direction, it wont lead you anywhere

    Check this out as i think it mentions something similar to the scenario which you are encountering, with the committed data not returned back in the query. It isnt concurrent as mentioned, but it explains the commit process.

    http://code.google.com/appengine/articles/transaction_isolation.html

    Also, another approach would be to query using Extents and find out if that solves the particular use case you are looking at, since i believe you are pulling out all the records in the table.

    EDIT :

    Since in the code snippet that you have mentioned, it queries the entire table. And if that is what you need, you can use an Extent…
    The way to use it is by calling

    Extent ext = getExtent(<Entity Class name>)

    on the persistenceManager singleton object. You can then iterate through the Extent

    Check out the documentation and search for Extents on the page here.
    http://code.google.com/appengine/docs/java/datastore/jdo/queries.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today is the first time I've used Python, so I'm sure this'll be an
Today I made a 64bit build of my project for the first time. Basically
Today's Daily Vim says this: Assuming you're using the bash shell, the following can
Today, I ran into this weird problem with a user using Mac OS X.
Today at work we came across the following code (some of you might recognize
today I have deployed my first MVC 2 application on Windows Server 2008, and
Today I have checked performance statistics of my website using YSlow . I got
Today I tried to download EGit plug-in from eclipse.org, and waited an hour and
Today I was looking the latest exam of the local informatics olympiad and I
Today is my first day working with SQL so please bear with me for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.