Proposal: Hibernate 4 & OSGi
Java
Latest commit cdcc18a Jun 7, 2013 @sleicht sleicht Update Maven Tycho to 0.18.0
- updates maven-tycho plugin from 0.17.0-SNAPSHOT to 0.18.0
- changes orbit url in target to the current Release
- changes min. version of imported org.osgi.framework to 1.5 and sets
max version to 2.0
Permalink
Failed to load latest commit information.
org.hibernate4.lib.fragment
org.hibernate4.osgi.example.person Fix maven build Apr 11, 2013
org.hibernate4.osgi.h2.fragment Update Maven Tycho to 0.18.0 Jun 7, 2013
org.hibernate4.osgi.parent
org.hibernate4.osgi Update Maven Tycho to 0.18.0 Jun 7, 2013
.gitattributes
.gitignore Set gitattributes and gitignore files Feb 14, 2013
README.md First version of the example Apr 5, 2013

README.md

org.hibernate4.osgi

Proposal: Hibernate 4 & OSGi

How to lunch the sample

The following instructions assume that you have imported the following projects into an Eclipse workspace:

  • org.hibernate4.lib.fragment
  • org.hibernate4.osgi
  • org.hibernate4.osgi.example.person
  • org.hibernate4.osgi.h2.fragment

Instructions:

  1. Open "Run configurations..." and create a new "OSGi Framework" run configuration

  2. Choose all four OSGi bundles from the workspace plus "org.eclipse.osgi" wich should come with your Target Platform

  3. Finally you're ready to lunch the application. Along with several log messages from Hibernate you should see the fllowing output on the console:

    Hibernate: insert into Person (firstname, lastname, id) values (?, ?, ?)
    Hibernate: insert into Event (date, person_id, title, id) values (?, ?, ?, ?)
    Hibernate: insert into Event (date, person_id, title, id) values (?, ?, ?, ?)
    Hibernate: select person0_.id as id0_, person0_.firstname as firstname0_, person0_.lastname as lastname0_ from Person person0_
    Person [Id= 1, Firstname=Scott, Lastname=Tiger]
        Event [Id= 1, Title=Meet Alice, Date=Thu Apr 04 22:16:43 CEST 2013]
        Event [Id= 2, Title=Meet Bob, Date=Thu Apr 04 22:16:43 CEST 2013]