• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

POJOs and GAE/JDO

 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

http://noon.gilead.free.fr/gilead/

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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Cameron. Will check it out.
Also found this interesting workaround.
http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html

Need to evaluate which one of the two is easier for me.
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.



http://www.datanucleus.com/news/access_platform_2_0_release.html

-Cameron McKenzie




 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An option is to use the persistence engine from www.DataStoreGwt.com. 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.

J.Ganesan
www.DataStoreGwt.com
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic