DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Spring + Hibernate + Google AppEngine's Cloud SQL = Awesome!

Spring + Hibernate + Google AppEngine's Cloud SQL = Awesome!

Mitch Pronschinske user avatar by
Mitch Pronschinske
·
Nov. 05, 11 · Cloud Zone · Interview
Like (0)
Save
Tweet
24.80K Views

Join the DZone community and get the full member experience.

Join For Free
Java developers like Keith Mukai are doing some pretty awesome things with Google's preview of Cloud SQL for Google AppEngine.  Keith created a proof-of-concept app using Spring and Hibernate that was approved by Google to be part of the Cloud SQL limited preview which began last month.

Keith decided to use Hibernate because of his familiarity with using its annotations for his ORM layer.  After being out of the Hibernate world for so long, it felt like being in 2003 again, because he had to use Hibernate Tools and reveng.xml to generate the Hibernate *.hbm.xml mapping files.  He had to do this because annotations wouldn't work in AppEngine due to their limitations which don't support the JPA 2.0 spec.  Maybe there's a way around this, but Keith couldn't find it, so it was a little bit tedious.  However, the end result was worth it:

Once the basics were working I retrofitted my Java generics-based approach to the DAO layer that I had built for the App Engine datastore with Objectify. It gets a little complicated, but basically there's only ONE class that's actually implementing all the standard DAO CRUD. Java generics do the rest to apply that code to each domain entity. It's pretty damn cool.  --Keith Mukai

Keith also decided that Hibernate would work better through Spring for his app, so maybe the frequent Spring users out there can find some interesting code in Keith's app.

Download the project code here. And let Keith know if there are any issues with the code.  He doesn't claim to be a Java expert.

The approach he used is discussed in more detail here:
http://blog.essaytagger.com/2011/07/elegant-coding-with-objectify-java.html

The question now is, have all the recent changes to Google's AppEngine offerings alienated developers?  And is Cloud SQL a lucretive addition that will continue to bring in developer interest?

Source: http://blog.essaytagger.com/2011/11/spring-hibernate-on-google-app-engines.html

Hibernate Google (verb) sql Cloud Spring Framework Awesome (window manager)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Modernize Legacy Code in Production: Rebuild Your Airplane Midflight Without Crashing
  • OPC-UA, MQTT, and Apache Kafka: The Trinity of Data Streaming in IoT
  • Deployment of Low-Latency Solutions in the Cloud
  • Open Source Security Risks

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo