SmartGWT Hibernate Datasource setup for Google Cloud SQL GAE

470 Views Asked by At

I am looking for an example of a project where a SmartGWT Hibernate Datasouce is connected to a Google Cloud SQL database using GAE as the server. I would be surprised to be the first one in this world to have attempted.

1

There are 1 best solutions below

0
On

We'd recommend using SQLDataSource instead (simpler, faster, more flexible). Google documents appropriate JDBC settings here:

https://developers.google.com/appengine/docs/java/cloud-sql/developers-guide#use_with_lang

SmartGWT documents how to provide JBDC settings to SQLDataSource here:

http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/SqlSettings.html

You would use MySQL as the database type since CloudSQL is MySQL-compatible.

If you choose to use Hibernate, we haven't tried this, but presumably the same JDBC settings can be provided to Hibernate - see Hibernate docs.