google-cloud-datastore - gcloud - Managed VM JDO Datastore - answerstu - answerstu.com answerstu

gcloud - Managed VM JDO Datastore

I am trying to migrate an AppEngine project to MVM, custom runtime environment.

I faced an issue with Memcache, which was solved by replacing:

CacheManager.getInstance().getCacheFactory().createCache ...
...

with:

new XMemcachedClient(
   System.getenv.get("MEMCACHE_PORT_11211_TCP_ADDR"), 
   Integer.parseInt(System.getenv.get("MEMCACHE_PORT_11211_TCP_PORT")))
...

(BTW, if anyone is having same issues, then maven for XMemcached is:)

<dependency>
   <groupId>com.googlecode.xmemcached</groupId>
   <artifactId>xmemcached</artifactId>
   <version>2.0.0</version>
</dependency>

I am now facing an issue with DataStore JDO and PersistenceManager (using DataNucleus in the project).

Basically, I am looking to replace this:

JDOHelper.getPersistenceManagerFactory("xxx").getPersistenceManager() ...
...

with ?...

Are there any "magic" environment variables I can use for composing the address (like the MEMCACHE_PORT_11211_TCP_ADDR and MEMCACHE_PORT_11211_TCP_PORT is the case of Memcache)? Any other means I can communicate the datasource with (from a MVM project)?

Thanks in advance,

Ohad

1 Answer

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>