Showing posts from May, 2009

Eclipse RCP+Spring+EMF+Teneo – hibernate and plugin versions

Ran into a bit of trouble the other day using teneo. A particular plugin, org.eclipse.emf.teneo.hibernate.libraries is a provider of the hibernate libraries. However in my application, I have defined a target plug-in profile that also includes the springsource osgi hibernate bundles. Hence, I kept getting a bundle “uses” error. By creating an OSGi launch profile and launching just the OSGi prompt (add –console to the argument list in the launch profile), I discovered that these two plugins were both trying to provide hibernate classes but specified at different levels. The uses clause error detected that I could have a potential conflict and signalled an error that bundles dependent on hibernate could not be resolved. This is a good thing for detecting errors.  The bad thing is that I then worked to eliminate the plugin uses clause and went down a path of trying to find the right set of versioned plugins that satisfied all dependencies. That can be hard work but I was happy that it oc

Eclipse RCP+Spring+EMF+Teneo

One issue for using these technologies together is using spring and the teneo HbSessionDataStore versus the LocalSessionFactoryBean that is seen in most spring tutorials. To use the teneo approach, you need to define your beans and DAOs like the following: <!-- Should get persistence properties and hibernate properties from property files. --> < bean id = "sessionFactory" scope = "singleton" lazy - init = "true" class = "org.eclipse.emf.teneo.hibernate.HbSessionDataStore" p : name = "MyDataStore" > < property name = "EPackageClasses" > < util : list > < value > org.yourmodel.impl.YourPackageImpl </ value > < value > org.yourmodel2.impl.Your2PackageImpl </ value > </ util : list > </ property > </ bean > < util : constant static - field = "org.yo