[hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Vlad Mihalcea
Hi, While reviewing this PR: https://github.com/hibernate/hibernate-orm/pull/1198/files I realized that we have some static fields which might cause some problems when we deploy two or more SessionFactories in the same container (e.g. Spring). The fix suggests that we should use synchronised, as

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Sanne Grinovero
Hi Vlad, there are several components which can safely use static fields, of course as you say only if their state is not affected by which SessionFactory is using them. So I would agree on treating those with care: it should always be a warning sign during code reviews and warrant an in-depth ch

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Vlad Mihalcea
Hi, I agree with. I'll open a new issue and link to this PR and your comment as well. Vlad On Thu, Apr 28, 2016 at 1:05 PM, Sanne Grinovero wrote: > Hi Vlad, > > there are several components which can safely use static fields, of > course as you say only if their state is not affected by whic

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Gunnar Morling
Or, yet better, change the method definition in the upstream component (HCANN) so its accessible without jumping through reflective hoops. --Gunnar 2016-04-28 12:57 GMT+02:00 Vlad Mihalcea : > Hi, > > I agree with. > > I'll open a new issue and link to this PR and your comment as well. > > Vlad

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Hardy Ferentschik
Hi, On Thu, 28-Apr-2016 13:15, Gunnar Morling wrote: > Or, yet better, change the method definition in the upstream component > (HCANN) so its accessible without jumping through reflective hoops. +1 :-) --Hardy signature.asc Description: PGP signature _

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Steve Ebersole
Or better better yet let's get moving from HCANN to Jandex! :) Bottom line, this depends on specific cases. On Thu, Apr 28, 2016 at 7:38 AM Hardy Ferentschik wrote: > Hi, > > On Thu, 28-Apr-2016 13:15, Gunnar Morling wrote: > > Or, yet better, change the method definition in the upstream compo

Re: [hibernate-dev] Usage of static fields throughout Hibernate Core

2016-04-28 Thread Hardy Ferentschik
On Thu, 28-Apr-2016 12:49, Steve Ebersole wrote: > Or better better yet let's get moving from HCANN to Jandex! :) Amen! :-) --Hardy signature.asc Description: PGP signature ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jb

[hibernate-dev] Jackson vs Gson

2016-04-28 Thread Sanne Grinovero
I'm wondering why the Elasticsearch client for Hibernate Search is using Gson, and not Jackson as JSON codec? Especially as we already have Jackson as a dependency for both Search (via Avro), OGM (via Couchbase), and it's also used within WildFly and Camel, we might need to change this. Sorry if

[hibernate-dev] hibernate and transaction using method annotation

2016-04-28 Thread Bhuvan Gupta
Hello All, Link to question and discussion: http://stackoverflow.com/questions/36920695/hibernate-and-transaction-using-method-annotation Below i have pasted whats in the link: Help/suggestion/advise/data points is really appreciated. Thanks in Advance: ---

Re: [hibernate-dev] hibernate and transaction using method annotation

2016-04-28 Thread Vlad Mihalcea
Hi, I answered your question on SO, but, next time, please use the forum ( https://forum.hibernate.org/ ) or Twitter to send the SO question link. This mailing list is dedicated to discussions about developing Hibernate. Thanks, Vlad On Fri, Apr 29, 2016 at 7:10 AM, Bhuvan Gupta wrote: > Hell

Re: [hibernate-dev] hibernate and transaction using method annotation

2016-04-28 Thread Bhuvan Gupta
Got it On Fri, Apr 29, 2016 at 11:46 AM, Vlad Mihalcea wrote: > Hi, > > I answered your question on SO, but, next time, please use the forum ( > https://forum.hibernate.org/ ) or Twitter to send the SO question link. > This mailing list is dedicated to discussions about developing Hibernate. >