Skip to content
Native MySQL Connections from App Engine (Java)
Java
Branch: master
Clone or download
1
Latest commit b471ff8 Jan 6, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
eclipse-launch-profiles First version Jul 11, 2013
src/main First version Jul 11, 2013
.gitignore First version Jul 11, 2013
CONTRIB.md Add the GoogleCloudPlatform template Jul 11, 2013
LICENSE
README.md First version Jul 11, 2013
log4j.properties First version Jul 11, 2013
nbactions.xml First version Jul 11, 2013
pom.xml

README.md

Google Cloud SQL/App Engine native DataNucleus JDO demo

This demo contains an example program that shows how to use DataNucles JDO with native MySQL connections to connect from Google App Engine to Google Cloud SQL both in development mode and on App Engine.

Requirements

  • Apache Maven 3.0 or greater
  • a local MySQL server (for running locally with devserver)
  • JDK 7+

Clone this repository to a local directory. Maven will download all the other dependencies.

Deploying

To build, run:

mvn package

Local deployment

Make sure the demo database exists on the local MySQL server.

To start the app, use the App Engine Maven Plugin that is included in this demo. Just run the command:

mvn appengine:devserver

App Engine deployment

In pom.xml update the following properties:

  • appengine.app.appId to point to your App Engine application ID
  • cloudsql.url to point to your Cloud SQL instance by replacing your-instance-name with the full name of your instance (this looks either like my_project:my_instance for non-domain specific instances or like my_domain:my_project:my_instance for the domain-specific ones).

Make sure the demo database exists on the Cloud SQL instance.

To deploy the app run the following command:

mvn appengine:update

Contributing changes

Licensing

You can’t perform that action at this time.