Re: [hibernate-dev] Lazy attribute loading group support

2015-11-18 Thread Gunnar Morling
+1 it's a useful thing. Instead of using Strings to identify loading groups, would it be better to use class literals? It'd prevent wrong loads due to typos and would help to identify the attributes of one group e.g. in the IDE. But it would add the overhead for defining the groups: public in

[hibernate-dev] Accessing metadata when SF is build the legacy way

2015-11-18 Thread Koen Serneels
Hi. I'm digging up an older question (https://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg12872.html)I asked about modifying mapping metadata in H5. In short; I want to change the mutability flag of mappings programmatically. Using H4 there was a method called "getClassMappings" on or

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread John O'Hara
Gail, Tests on hibernate-core in 5.0 branch are failing due to https://github.com/hibernate/hibernate-orm/commit/7633d2fce540a979fc0eb5b229023c815b6c5528 lazyPropertiesAreUnfetched should be passed after disableVersionIncrement. I will make the change for steve to pull in John On 18/11/15 06:

Re: [hibernate-dev] Sub entities and Multi-version support

2015-11-18 Thread Gunnar Morling
Hi Vlad, 2015-11-13 23:22 GMT+01:00 Vlad Mihalcea : > I've been seeing many blogs and articles against single-version optimistic > locking, which can cause a transaction to abort even if two concurrent > transactions don't modify the same records. Could you give a pointer to such blog? If a TX ro

Re: [hibernate-dev] Sub entities and Multi-version support

2015-11-18 Thread Vlad Mihalcea
Hi Gunnar, The best article on this subject is this one: http://www.anyware.co.uk/2005/2012/11/12/the-false-optimism-of-gorm-and-hibernate/ Another one which captures the same idea, although it's not as good as the former one: https://dzone.com/articles/jpa-in-case-of-asynchronous-processing I

Re: [hibernate-dev] Why does Hibernate has aggressive connection releasing for JTA

2015-11-18 Thread Steve Ebersole
It was to work around certain containers (not just EE containers) that implement "resource containment" checks. The Hibernate Session defers getting a JDBC Connection until it actually needs one, which can lead to cases like the following where 2 beans share a Session/EM: Bean1: get Session, but

Re: [hibernate-dev] Lazy attribute loading group support

2015-11-18 Thread Steve Ebersole
Personally I find that to be too much work to set up. On Wed, Nov 18, 2015 at 2:52 AM Gunnar Morling wrote: > +1 it's a useful thing. > > Instead of using Strings to identify loading groups, would it be > better to use class literals? It'd prevent wrong loads due to typos > and would help to id

Re: [hibernate-dev] Accessing metadata when SF is build the legacy way

2015-11-18 Thread Steve Ebersole
This is a list for the discussion of HIbernate development. Your question is not a Hibernate development discussion, its a user question. In the future, please refrain from asking usage questions on a developer list. Thanks. I will address this one quickly though... Unfortunately that method is

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread Steve Ebersole
As John pointed out the 39 are from attempting to apply a perf patch to 5.0. The hibernate-infinispan tests have been an ongoing issue, which is why I disabled them. In fact I think after 5.0.4 we ought to stop accepting patches against hibernate-infinispan until the tests are fixed. On Wed, Nov

Re: [hibernate-dev] Sub entities and Multi-version support

2015-11-18 Thread Steve Ebersole
On Wed, Nov 18, 2015 at 6:08 AM Vlad Mihalcea wrote: > Hi Gunnar, > > The best article on this subject is this one: > > > http://www.anyware.co.uk/2005/2012/11/12/the-false-optimism-of-gorm-and-hibernate/ To be honest I stop reading after I read things like This is because Hibernate caches th

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread Steve Ebersole
So if I understand correctly, I just inverted the 2 booleans arguments when trying to apply this to 5.0? On Wed, Nov 18, 2015 at 4:27 AM John O'Hara wrote: > Gail, > > Tests on hibernate-core in 5.0 branch are failing due to > > https://github.com/hibernate/hibernate-orm/commit/7633d2fce540a979

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread John O'Hara
Yes, you can see the difference between the call to createEntityEntry for the Mutable and Immutable case here: https://github.com/hibernate/hibernate-orm/blob/7633d2fce540a979fc0eb5b229023c815b6c5528/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java#L505

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread Radim Vansa
I've been trying to fix the testsuite, and I managed to get rid of some of the issues, but without 100% success - I can't reproduce certain problems with logs on and I can't fix them without knowing what's going on (without the logs). So, honestly, I've given up for a while. ATM about every 20t

Re: [hibernate-dev] Sub entities and Multi-version support

2015-11-18 Thread Vlad Mihalcea
I agree that @Version is simplistic, but then we only have one choice, the @DynamicUpdate solution. Now, the @DynamicUpdate has one major drawback: it doesn't work with detached entities. In the following article I detailed how it can lead to "lost updates": http://vladmihalcea.com/2014/12/08/the

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread Steve Ebersole
Yes, the inconsistent/transient nature is the most frustrating part. On Wed, Nov 18, 2015 at 9:08 AM Radim Vansa wrote: > I've been trying to fix the testsuite, and I managed to get rid of some > of the issues, but without 100% success - I can't reproduce certain > problems with logs on and I ca

Re: [hibernate-dev] Why does Hibernate has aggressive connection releasing for JTA

2015-11-18 Thread Vlad Mihalcea
Thanks for the explanation. I found a discussion from 2006 where you explained this behavior: http://lists.jboss.org/pipermail/hibernate-dev/2006-December/000903.html I am currently testing the AFTER_TRANSACTION release mode with Spring and Bitronix and I think it can give some performance gain o

Re: [hibernate-dev] hibernate-core and hibernate-infinspan failures

2015-11-18 Thread Steve Ebersole
http://ci.hibernate.org/job/hibernate-orm-5.0-h2/13/changes Fixed. Sorry, I inadvertently inverted those I guess as I cherry-picked that PR to 5.0. Master does not use that boolean anymore. On Wed, Nov 18, 2015 at 8:43 AM John O'Hara wrote: > Yes, you can see the difference between the call t

Re: [hibernate-dev] Why does Hibernate has aggressive connection releasing for JTA

2015-11-18 Thread Steve Ebersole
Yes, I think that's a good idea. I also think working on ConnectionAcquisitionMode is the best option. The fact that Hibernate delays getting the Connection is so generally not useful. On Wed, Nov 18, 2015 at 9:42 AM Vlad Mihalcea wrote: > Thanks for the explanation. I found a discussion from

Re: [hibernate-dev] Sub entities and Multi-version support

2015-11-18 Thread Steve Ebersole
That is kind of true for real re-attachment. But realize that merge() e.g. is not actually a re-attachment API. merge() first loads the state and then applies the detached state over that managed state. So @DynamicUpdate does still work. And even with real re-attachment via update() the same ca

[hibernate-dev] Starting 5.0.4 release

2015-11-18 Thread Steve Ebersole
Per $subject ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev

[hibernate-dev] Fourth bug-fix release of Hibernate ORM 5.0

2015-11-18 Thread Steve Ebersole
http://in.relation.to/2015/11/18/hibernate-orm-504-final-release/ ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev

[hibernate-dev] Fwd: Sub entities and Multi-version support

2015-11-18 Thread Vlad Mihalcea
Actually both merge() and update() can still cause a "write skew" phenomena, especially when using dynamic updates + OptimisticLockType DIRTY or OptimisticLockType ALL