Reputation: 67
I have 2 GAE apps running (GAE1 and GAE2). I have to update the datastore of GAE2 from GAE1. How can I achieve this in Java? Does GAE provide any APIs for cross GAE datastore updates?
Note: I tried making a PUT request through the browser, by enabling CORS on the source and destination GAEs. Unfortunately CORS works only for GET and HEAD.
Upvotes: 3
Views: 59
Reputation: 67
This issue is fixed in the following way, (Note my requirement is I should not use Remote API from GAE.)
For example:
public void filter(ContainerRequestContext requestContext) {
if (requestContext.getUriInfo().getPath().contains("intgr")
}
Check for the request header that you pass, if it is present in the destination GAE.
Write your REST service in this url path /intgr and send back the response to the Source GAE.
Upvotes: 3
Reputation: 5995
In addition to the Cloud Datastore API mentioned previously, you can also use the Remote API to access services across different App Engine applications including Datastore.
Upvotes: 1