[hibernate-dev] [OGM] Demarcating units of work

Hardy Ferentschik hardy at hibernate.org
Wed May 6 16:10:57 EDT 2015


On Wed, May 06, 2015 at 03:16:16PM +0200, Gunnar Morling wrote:
> By introducing @UnitOfWork, you forgo all the integration between
> > application frameworks and transactions. Here you offer a solution for CDI
> > but we would need one for Java EE non CDI and one for Spring and one for
> > Grails and one for…
> The current integrations would continue to work. So e.g. EJB non-CDI would
> still use JTA as is today. I don't find it to be a big problem there, as
> it's much more under the covers (which is why it's nice to show EJBs in
> demos ;). Same for the others basically.


> I understand you reluctance to call a Tiger a Cat but they are commonly
> > referred as Cats.
> > Back to our problem, you either
> > - teach people that transaction is not what they might understand of
> > transactions - if they even know what that means these days ;)
> > - teach them a new concept that suspiciously looks like a transaction
> > anyways and force them to do the integration of that “thing” with their
> > universe.
> >
> I'd prefer the latter. The good thing is that it is up to us to
> describe/document what the "thing" is, so we can manage expectations
> towards it, far better then when using the term "transaction" which
> automatically raises certain expectations (smart people will wonder how we
> make it work, others may even fall into the trap and believe it is actually
> TX).

A clear +1 for the latter options from me as well. It's all about managing expectations 
and right now we conjure the wrong ones for non transactional databases.

This transaction issue is imo one of the big sore points of OGM. The other one
is, that there is no clear separation on what one can and cannot do using JPA.
Some things will never be supported others could work, but are not implemented yet.
One never really knows. It has a bit of a sour after taste.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20150506/20fd82db/attachment.bin 

More information about the hibernate-dev mailing list