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

  • SEARCH
  • Home
  • 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 8007547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:51:53+00:00 2026-06-04T17:51:53+00:00

I have a cross group transaction in app engine java jdo. It works great

  • 0

I have a cross group transaction in app engine java jdo.

It works great on the local dev app engine server.

However, from unit testing, I get a java.lang.IllegalArgumentException: transactions on multiple entity groups only allowed in High Replication applications.

Is it possible to simulate a High Replication Application using LocalServiceTestHelper?

I am using 1.6.6.

Here is my class, you can run it as it is to reproduce:

public class Ds2Test {

    private final LocalServiceTestHelper helper =
            new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());

    private static final PersistenceManagerFactory pmfXgInstance =
            JDOHelper.getPersistenceManagerFactory("xg-transactions");

        @Before
        public void setUp() {
            helper.setUp();
        }

        @After
        public void tearDown() {
            helper.tearDown();
        }

        @Test
        public void testXgTransaction() throws Exception {
            PersistenceManager xgPm = pmfXgInstance.getPersistenceManager();
            Transaction xgTx = xgPm.currentTransaction();
            xgTx.begin();

            xgTx.commit();
            xgPm.close();
        }
}

And here is the configuration in jdoconfig.xml:

   <persistence-manager-factory name="xg-transactions">
       <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"/>
       <property name="datanucleus.appengine.datastoreEnableXGTransactions" value="true"/>
   </persistence-manager-factory>

The Exception is thrown on xgTx.begin();

  • 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-06-04T17:51:56+00:00Added an answer on June 4, 2026 at 5:51 pm

    Ok. I found what needs to be done.

    private final LocalServiceTestHelper helper =
                new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()**.setDefaultHighRepJobPolicyUnappliedJobPercentage(100))**;
    

    As seen on: https://developers.google.com/appengine/docs/java/tools/localunittesting#Writing_HRD_Datastore_Tests

    A little obscure setting, but there it is.

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

Sidebar

Related Questions

Cross-posted from the Cukes Google Group: I have experimented with a number of methods
I am cross-posting this from scala-user: I have the following: object XmlTest { import
I have recently been investigating java server-side web frameworks to serve as a rendering
I'd like to have a parent class (Group) where any number of User may
How do i count null values while making cross tab query? I have a
I have two great tables that I would like to use as foundation for
As far as I understand, applications made with Adobe AIR have been blocked from
Recently our Development user group (Windows) has started showing with a Red Cross in
Possible Duplicate: MySQL dynamic cross tab I have student_record table ------------------------------------------------------------------- student_id | semester
I have a tricky situation in trying to get information from multiple queries into

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.