bajafresh4life
bajafresh4life

Reputation: 12853

Using an existing GORM data model in standalone Java app

I have an existing Grails app and a separate, existing Java app. I would like the Java app to access the same database schema as the Grails app. Is there a way I can rip out the domain classes and GORM dependencies from the Grails app into a library that the Java app can access?

I'd also be happy to hear alternative approaches that would be less work than rewriting my DAO layer in the Java app.

Upvotes: 6

Views: 1772

Answers (3)

JGFMK
JGFMK

Reputation: 8904

You could use web services and call into grails service classes from the Java app.

Upvotes: 0

Ajay
Ajay

Reputation: 763

Here's another workaround: http://burtbeckwith.com/blog/?p=72

Upvotes: 0

Jared
Jared

Reputation: 39887

This isn't supported and may or may not work. See http://www.grails.org/GORM+-+StandAlone+Gorm You could always use pure Hibernate from your Java app and create the Hibernate model by reverse engineering your existing Grails database scghema.

Upvotes: 1

Related Questions