Oh well... a "good" thing is that no one will use hibernate to actually 
"persist" anything here.
It's JUST that this legacy thing has a few classes that I need to use (Address, 
Country...) that actually implement some Hibernate interfaces (or extend some 
Hibernate classes) -do not ask me why :)

So I need to have those objects here (therefore I need some hibernate jar) but 
they won't actually be used for any ORM purposes.

So if you say that those do not work as in "you might have trouble when 
persisting/reading from DB", I'm quite happy I won't actually use that.

-m

Ps: by the by, I'm kind of using it right now. It was just a hassle to have to 
go find all it's deps (dom4j, javassist and so on...). 
could I somehow have done it by just adding spring ebr repo in karaf (some sort 
of "addurl" trick)?


-----Original Message-----
From: Achim Nierbeck [mailto:bcanh...@googlemail.com] 
Sent: venerdì 11 febbraio 2011 12:42
To: user@karaf.apache.org; Marco Firrincieli
Subject: Re: newbie question: hibernate-core bundle (with deps)

Hi Marco,

to be honest, from what I experienced the spring-hibernate jars don't
really work :(

what I have done before is to wrap up a bundle containing all the
required hibernate jars and exporting all needed classes.

The DAO-Classes needed a special handling. We did a aop wrapping
around setting the Thread.contextClassloader to the bundle
classloader. With that it did run more smoothly :)
I think there is a blog of Peter Kriens about this.

Another thing would be to use OpenJPA as provider, that should work
out better :)

Regards, Achim

2011/2/11 Marco Firrincieli <marco.firrinci...@lbigroup.it>:
> Hi all,
>
> i've only started "now" working on making a legacy application deployable on 
> karaf.
> Right now I'm fighting de-coupling a few things, and I've come to find a 
> strong dependency with hibernate.
>
> Googling around couldn't really come up with the correct "way to do", so 
> that's why I'm asking.
>
> I found out that spring sort or releases the bundle for hibernate 
> (com.springsource.org.hibernate) but when I deploy it on karaf, it still says 
> I miss so many other stuff.
>
> Any "easy" way to have it all without looking for every little dependencies 
> here and there?
>
> Thanks
>
> -m
>

Reply via email to