To create bundle, the easiest way is to use maven-bundle-plugin from Felix.
For instance, all ServiceMix bundles uses this plugin.

On the other hand, Karaf provides wrap support. In a feature or shell, you can use something like:

wrap:mvn:groupId/artifactId/version

Karaf also provides jpa supports leveraging Aries.

Regards
JB

On 01/29/2013 02:45 PM, Gonzalo Aguilar wrote:
Bram Pouwelse wrote
I've used Hibernate in Karaf in the past got it al working based on on
Hibernate bundles created as described in this blog post:
http://iocanel.blogspot.nl/2010/07/wicket-spring-3-jpa2-hibernate-osgi.html

I was able to update these bundles to Hibernate 3.6.2 but switched to
OpenJPA after all.

Yes! I have this guy in my bookmark. Ioannis... I have the project but I
found that he uses maven-jar-plugin to create the bundles something that I
think is not necessary.

I'm able to create the bundle, I used the blog to do it, that's not the
problem. The problem is that it does there is class loader problems if you
try to update. I'm on hibernate 3.6.10.Final and spring 3.0.7.RELEASE but's
something I don't really catch that is causing me headaches.

This packages works well in tomcat for example, no issues there... so there
is something, I say, that I'm issing.

I think I'll take a look to the solutions exposed. Will try to build
completly the project of Ioannis, but I surely will go with traditional
Tomcat aproach until the project is somewhat more stable.

But will keep an eye on it. :D


What I resolved asking here is that I'm not the only one having this kind of
problems.

I have to say that this "library nightmare" is resolved in traditional
environments just installing and removing library versions that does not
much. You don't have to repackage anything.

So where is the advantage of OSGi. I really don't see it.

I have to say that evangelists of OSGi always say that it's a good
provisioning system. But the most commonly program I know built on OSGi is
Eclipse, and I have to say that I have to remove the whole plugin pack if I
make an error with installed versions of the plugins. Because it will not
work!

So again, I don't see the advantage.

I want to build on OSGi, because it seems to be an isolated VM that can do
anything. With the cellar project it looks promissing. But not because the
library handling, it's because seems to be well done.

Let's see the future. Blueprint and iPOJO came to ease the bundle
construction. I hope something arises that will help to distribute libraries
in the way are packaged right now.


Thank you again.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Why-this-library-hell-Hibernate-Spring-Mess-tp4027506p4027514.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to