File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes POJOs and GAE/JDO Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "POJOs and GAE/JDO" Watch "POJOs and GAE/JDO" New topic


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

I am planning to use Google App Engine for my application. I went through the documentation and did a trial run. Looks like I will end up needing a converter for the POJO<->JDO because of the annotations.
Anybody else encountered this situation before? Any recommendations?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

My previous post was actually on fixing an error when using Gilead and GWT 2.0.

Gilead is a neat little project that strips JPA entities of their JPA baggage and sends them across the network as just your basic POJOs. I've found it quite easy to work with, and it seems to do exactly what I need it to do.

Gilead stands for Generic Light Entity Adapter

It permits you to send Persistent entities (and especially the partially loaded ones) outside the JVM (GWT, Flex, Web-Services, Google AppEngine ...) without pain.No LazyInitialisationException. No DTO mapping. Just POJO and Domain Driven Design !

Gilead intensively uses BeanLib : I wouldn't have done anything without this wonderful library !

Gilead was previously known as hibernate4gwt : the library has been renamed to reflect a more general purpose than just these two target frameworks, but of course, it still supports them.

-Cameron McKenzie
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

Thanks Cameron. Will check it out.
Also found this interesting workaround.

Need to evaluate which one of the two is easier for me.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

Looks like I jumped into the discussion without a proper grounding in the Google App Engine.

I'm seeing that it supports both JDO and JPA? I'd lean towards JPA, but it does seem most of the tutorials are JDO. Too bad.

Seems like DataNucleus is the open-source JPA implementation of choice:

GAE JDO/JPA Implementation Provider: DataNucleus

I writing a GWT application right now with plans on deployment to an Amazon cloud. Seems like perhaps I should get on this DataNucleus bandwagon and just deploy it to GAE?

You said you'd need to convert a POJO to a JDO because of the annotations?

POJO<->JDO because of the annotations

I'm wondering what you mean by that? Are you saying that you're simply going to have to add some annotations to your POJOs? Or are you saying you're going to have to change existing annotations? Or are you saying you're going to have to remove the annotations? If DataNucleus, and thus GEA, support JPA1 and have forward looking JPA 2.0 support, JPA annotations should be fully supported.

GAE's DataNucleus Access Platform iprovides JPA1 Java standards and providing previews of many JPA2 features.

Version 2.0 includes the following over 1.1

Addition of plugin for persistence to HBase (HADOOP) datastores
Support for persistence to Amazon S3 datastores
Support for persistence to Oracle Timesten datastores
Addition of plugin for persistence of JodaTime types
Change default for non-transactional read/write to true for JDO
Support atomic non-transactional write persist/delete operations
Level 2 Cache is now enabled by default (soft)
Cache : Support for pinning/unpinning of query results with Memcache/javax.cache
Split query cache into 3 components : generic compilation, datastore compilation and query results. Added API for managing caching of query results (using JDO or JPA).
Enhancer : add ability to generate PK classes (including composite)
JDO : Support for JDO 2.3 Query cancel, and datastore read/write timeout
JPA : Support for extended persistence context
JPA2 : Support for metamodel API
JPA2 : Support for bean validation API
JPA2 : Support for various JPQL keywords
JPA2 : Support for 1-N FK bidirectional relations
JPA2 : Support for 1-N collection/map of non-persistable objects.
JPA2 : Support for TypedQuery
RDBMS : Support for update/delete-by-query for JPQL
RDBMS : Rewritten JPQL implementation building on generic query compiler. This is now the default JPQL implementation for RDBMS, and can be used with the query caching mechanism.
RDBMS : Rewritten JDOQL implementation building on generic query compiler. This is not currently the default JDOQL implementation but is available to be used, and can be used with the query caching mechanism.
LDAP : Support for persistence of recursive object graph to hierarchical structure
Add support for PMF/EMF singleton pattern, via persistence property
Spatial : Many fixes to handling of JTS types.
Many bug fixes, and minor feature additions.

-Cameron McKenzie

Jagadesan Ganesan

Joined: May 28, 2011
Posts: 1
An option is to use the persistence engine from There is no need for JPA/JDO. One can save the POJO object graph from the client-side code. The down side is that you can not host in GAE.

I agree. Here's the link:
subject: POJOs and GAE/JDO
It's not a secret anymore!