Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Hibernate OGM Deployment on OpenShift

DZone's Guide to

Hibernate OGM Deployment on OpenShift

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. Brought to you in partnership with MongoDB.

Hibernate Object/Grid Mapper (OGM) is used to provideJava Persistence (JPA) support for NoSQL data stores.  At this year's JUDCon London, Hardy Ferentschik presented a talk on how to deploy this Hibernate variant on JBoss AS 7 and OpenShift Express.  But lucky for you, he posted the code on GitHub - ogm-kitchensink, and gave a link to the README.md so you can get started even if you couldn't attend.  The demo uses OGM 3.0 Alpha 2 so you'll need to define a Hibernate 3 module even though AS 7 comes with Hibernate 4.  Use these instructions.  The demo comes with a handy Arquillian test and last but not least, tells you how to deploy on RedHat's PaaS - OpenShift Express:

Last but not least, let's push the demo into OpenShift Express. This is as simple as signing up for OpenShift, installing the rhc command line tools and then running:

 $ rhc-create-domain -n <domain>
 $ rhc-create-app -a <app> -t jbossas-7.0 --nogit
...
Success!  Your application is now published here:

      http://<name>-<domain>.rhcloud.com/

The remote repository is located here:

    <repo-url>
...
 $ git remote add openshift <repo-url>
 $ git push -f openshift master
The interesting bit here is to get the required modules installed on the server side. It turns out, all you have to do is to check add them to the git repository under .openshift/modules.  -- Hardy Ferentschik

If you still have holes in your understanding of the demo, go ahead and read through the README.md, script.md and the presentation slides for more information.

Source: http://relation.to/Bloggers/JUDCon2011LondonOGMIntroductionDemo

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}