My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GaeConnectionProviderSetup  
Setup instructions of GAEConnectionProvider
Updated Jan 8, 2012 by antti.le...@foyt.fi

Installation

First you need to add hibernate-gae-connection-provider-VERSION.jar into WEB-INF/lib folder.

You can find jar from Downloads, build it from the Source or use Maven dependecy management by adding following into your pom.xml file:

<dependencies>
  ...
  <dependency>
    <groupId>fi.foyt.hibernate.gae</groupId>
    <artifactId>connection-provider</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <type>jar</type>
  </dependency> 
  ...
</dependencies>

if you havent yet added this project's Maven repository into your pom.xml, you should do that first. Instructions for that can be found from MavenRepository

Setup

To enable connection pooler all you have to do is set hibernate.connection.provider_class property to fi.foyt.hibernate.gae.connection.GAEConnectionProvider, hibernate.gae_connection.instance to your cloud sql instance and hibernate.gae_connection.database to your database.

Example persistence.xml

<persistence-unit name="myPU" transaction-type="RESOURCE_LOCAL">
  <properties>
    ...
    <property name="hibernate.connection.provider_class" value="fi.foyt.hibernate.gae.connection.GAEConnectionProvider"/>
    <property name="hibernate.gae_connection.instance" value="instance:name"/>
    <property name="hibernate.gae_connection.database" value="database"/>
    ...
  </properties>
</persistence-unit>
Comment by roland.b...@arcus-business.com, Dec 20, 2014

The maven repository is not working anymore... I used the source code instead. I have already an issue, is this project still alive?

Powered by Google Project Hosting