----- Original Message -----
From: "Mike Kolesnik" <mkolesni(a)redhat.com>
To: "engine-devel" <engine-devel(a)ovirt.org>
Cc: "Itamar Heim" <iheim(a)redhat.com>, "Allon Mureinik"
<amureini(a)redhat.com>
Sent: Sunday, January 13, 2013 3:16:01 PM
Subject: Re: [Engine-devel] jpa annotations
----- Original Message -----
>
>
> ----- Original Message -----
> > From: "Itamar Heim" <iheim(a)redhat.com>
> > To: "Laszlo Hornyak" <lhornyak(a)redhat.com>
> > Cc: "engine-devel" <engine-devel(a)ovirt.org>
> > Sent: Tuesday, December 18, 2012 11:52:39 PM
> > Subject: Re: [Engine-devel] jpa annotations
> >
> > On 12/18/2012 03:55 PM, Laszlo Hornyak wrote:
> > > Hi,
> > >
> > > We have JPA annotations on the backend entity beans, but they
> > > have
> > > never been actually used as far as I know and now that I looked
> > > into VmTemplate for example we do not even have a vm_template
> > > table anymore, while VmTemplate still refers to it.
> > > Any plans with the JPA?
> > >
> >
> > I'm assuming they are from the work on moving to hibernate
> > started
> > a
> > long time ago, and question is are we going to finish it anytime
> > soon.
Yes it was done a couple of year ago but never made it past a "POC"
state.
> It's not a case of finishing it, it's a case of redoing it.
> These annotations are not being maintainted anymore, and a large
> percent of them are now irrelevant.
Indeed, they are mostly getting in the way and interfering with
understanding the code..
As I see it there are 3 options:
1. Do nothing and just live with them.
2. Remove them completely and all hibernate related work.
3. Write DAOs that work with hibernate and start using them.
For me #1 is not that great since currently it's just garbage that
sits there unmaintained..
I would like to see #3 happen but I think that it's easier to do #2
first, and then each DAO can be treated separately (there's already
the infrastructure for that in place).
I know it might seem wasteful to do #2 instead of #3 but:
* We don't have anyone to pick up #3 and work on it to get it to a
good state.
* The hibernate work that's been done is really cross product, but I
don't see why we wouldn't do it in an iterative way instead of
forcing all DAOs to switch in one fell swoop..
* The work that has been done, is not that much that we would "cry"
over deleting it..
#1 is just bad, as I think we can all agree.
As Edmund Burke (probably did not) say - "All that is necessary for the triumph of
evil is that good men do nothing."
re #2 and #3 - considering the state that these annotation are currently in, #3 probably
includes removing more than 50% of the current annotations, so...
+2 on doing #2.
Your thoughts?
Regards,
Mike