Re: [hibernate-dev] Health check status API

2018-05-31 Thread Vlad Mihalcea
We could do it via the Statistics mechanism which can be made available via
JMX.

We just have to add whatever info they are interested in to monitor.

Vlad

On Thu, May 31, 2018 at 7:40 PM, Sanne Grinovero 
wrote:

> It was suggested to me that Hibernate ORM could help people developing
> microservices on Kubernetes / Openshift by making "health checks"
> easier.
>
> In short, how to expose to some management API that we're being able
> to connect to the database and do our usual things.
>
> This could be done by connection pools as well but I suspect there
> could be benefits in exposing this information in a unified way at an
> higher level API; also on top of using ad-hoc specific connection
> APIs, or Dialect specific instructions, I guess we could monitor
> timeout exceptions, etc.. happening on the application sessions.
>
> Wrote some notes on:
>  - https://hibernate.atlassian.net/browse/HHH-12655
>
> Probably best to explore this in ORM first, but then Search and OGM
> could expose/implement it too for their respective services?
>
> Or maybe people would prefer to just run a query?
>
> Thanks,
> Sanne
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] Health check status API

2018-05-31 Thread Sanne Grinovero
It was suggested to me that Hibernate ORM could help people developing
microservices on Kubernetes / Openshift by making "health checks"
easier.

In short, how to expose to some management API that we're being able
to connect to the database and do our usual things.

This could be done by connection pools as well but I suspect there
could be benefits in exposing this information in a unified way at an
higher level API; also on top of using ad-hoc specific connection
APIs, or Dialect specific instructions, I guess we could monitor
timeout exceptions, etc.. happening on the application sessions.

Wrote some notes on:
 - https://hibernate.atlassian.net/browse/HHH-12655

Probably best to explore this in ORM first, but then Search and OGM
could expose/implement it too for their respective services?

Or maybe people would prefer to just run a query?

Thanks,
Sanne
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] JDK 11 Early Access build 15 is available for download.

2018-05-31 Thread Rory O'Donnell
Thanks Sanne, we are looking into it.

Rgds,Rory


On 31/05/2018 15:59, Sanne Grinovero wrote:
> Hi Rory,
>
> I was trying to download the OpenJDK / Linux distribution from
> http://jdk.java.net/11/, but it seems to link to [1] which returns a
> 404 error page.
>
> I'll use the Oracle / Linux build in the meantime.
>
> Thanks,
> Sanne
>
> 1 - 
> https://download.java.net/java/early_access/jdk11/15/GPL/openjdk-11-ea+15_linux-x64_bin.tar.gz
>
>
> On 29 May 2018 at 10:51, Rory O'Donnell  wrote:
>> Hi Sanne,
>>
>> **JDK 11 EA build 15 , *under both the GPL and Oracle EA licenses,
>> is now available at **http://jdk.java.net/11**. **
>> *
>>
>>* Newly approved Schedule, status & features
>>o http://openjdk.java.net/projects/jdk/11/
>>* Release Notes:
>>o http://jdk.java.net/11/release-notes
>>* Summary of changes
>>o http://jdk.java.net/11/changes
>>
>> *Notable changes in JDK 11 EA builds since last email:*
>>
>>* b15 - JDK-8201627 
>>  - Kerberos sequence number issues
>>* b13 - JDK-8200146 
>>  - Removal of appletviewer launcher
>>o deprecated in JDK 9 and has been removed in this release
>>* b13 - JDK-8201793 
>>  - java.lang.ref.Reference does not support cloning
>>
>> **
>>
>> **
>>
>> JEPs proposed to target JDK 11 (review ends 2018/05/31 23:00 UTC)
>>
>>  330: Launch Single-File Source-Code Programs
>>  
>>
>>  JEPs targeted to JDK 11, so far
>>
>>  309: Dynamic Class-File Constants 
>>  318: Epsilon: A No-Op Garbage Collector
>>  
>>  320: Remove the Java EE and CORBA Modules
>>  
>>  321: HTTP Client (Standard) 
>>  323: Local-Variable Syntax for Lambda Parameters
>>  
>>  324: Key Agreement with Curve25519 and Curve448
>>  
>>  327: Unicode 10 
>>  328: Flight Recorder 
>>  329: ChaCha20 and Poly1305 Cryptographic Algorithms
>>  
>>
>> Finally, Initial TLSv1.3 implementation Released to the Open Sandbox.
>> Please note well: this branch is under
>> very active development and is not final by any means. Also note: by
>> releasing this code, we are not committing
>> a specific release or timeframe. We will continue development and fixing
>> bugs until the code is ready for inclusion
>> in the JDK. We welcome your feedback, more info [1]
>>
>>
>> Regards,
>> Rory
>>
>> [1]
>> http://mail.openjdk.java.net/pipermail/security-dev/2018-May/017139.html
>>
>> --
>> Rgds,Rory O'Donnell
>> Quality Engineering Manager
>> Oracle EMEA, Dublin,Ireland
>>
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev

-- 
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] JDK 11 Early Access build 15 is available for download.

2018-05-31 Thread Sanne Grinovero
Hi Rory,

I was trying to download the OpenJDK / Linux distribution from
http://jdk.java.net/11/, but it seems to link to [1] which returns a
404 error page.

I'll use the Oracle / Linux build in the meantime.

Thanks,
Sanne

1 - 
https://download.java.net/java/early_access/jdk11/15/GPL/openjdk-11-ea+15_linux-x64_bin.tar.gz


On 29 May 2018 at 10:51, Rory O'Donnell  wrote:
> Hi Sanne,
>
> **JDK 11 EA build 15 , *under both the GPL and Oracle EA licenses,
> is now available at **http://jdk.java.net/11**. **
> *
>
>   * Newly approved Schedule, status & features
>   o http://openjdk.java.net/projects/jdk/11/
>   * Release Notes:
>   o http://jdk.java.net/11/release-notes
>   * Summary of changes
>   o http://jdk.java.net/11/changes
>
> *Notable changes in JDK 11 EA builds since last email:*
>
>   * b15 - JDK-8201627 
> - Kerberos sequence number issues
>   * b13 - JDK-8200146 
> - Removal of appletviewer launcher
>   o deprecated in JDK 9 and has been removed in this release
>   * b13 - JDK-8201793 
> - java.lang.ref.Reference does not support cloning
>
> **
>
> **
>
> JEPs proposed to target JDK 11 (review ends 2018/05/31 23:00 UTC)
>
> 330: Launch Single-File Source-Code Programs
> 
>
> JEPs targeted to JDK 11, so far
>
> 309: Dynamic Class-File Constants 
> 318: Epsilon: A No-Op Garbage Collector
> 
> 320: Remove the Java EE and CORBA Modules
> 
> 321: HTTP Client (Standard) 
> 323: Local-Variable Syntax for Lambda Parameters
> 
> 324: Key Agreement with Curve25519 and Curve448
> 
> 327: Unicode 10 
> 328: Flight Recorder 
> 329: ChaCha20 and Poly1305 Cryptographic Algorithms
> 
>
> Finally, Initial TLSv1.3 implementation Released to the Open Sandbox.
> Please note well: this branch is under
> very active development and is not final by any means. Also note: by
> releasing this code, we are not committing
> a specific release or timeframe. We will continue development and fixing
> bugs until the code is ready for inclusion
> in the JDK. We welcome your feedback, more info [1]
>
>
> Regards,
> Rory
>
> [1]
> http://mail.openjdk.java.net/pipermail/security-dev/2018-May/017139.html
>
> --
> Rgds,Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin,Ireland
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Unidirectional @OneToMany @JoinColumn associations

2018-05-31 Thread Stephen Fikes
The only referenced column is one of the *primary* key columns. I left 
out the word "primary" in my previous reply.

To make sure I understand, are you saying that a primary key column 
isn't a primary key column when part of a composite primary key? In 
other words, only the complete set of primary key columns that make up 
the composite primary key would be considered primary key columns and 
the individual primary key columns that make it up would not, 
themselves, be considered primary key columns?

Stephen


On 05/30/2018 03:47 PM, Steve Ebersole wrote:
> The spec says " referenced columns that are not primary key 
> columns...".  Nothing in here says full or partial.
>
> I completely agree with Sanne - its not a bug and it is something we 
> have never supported.
>
> On Wed, May 30, 2018 at 3:44 PM Stephen Fikes  > wrote:
>
> The referenced attributes *are* key attributes .. just a subset of
> the
> key. So ... odd mapping ... but I don't think it is included in the
> "optional" category for JPA 2.x.
>
> Stephen
>
>
> On 05/30/2018 03:39 PM, Sanne Grinovero wrote:
> > Hi Gail,
> >
> > I would not consider it a bug to not have documented that we don't
> > support some non-mandatory feature.
> >
> > And it's still optional in JPA 2.2, so I think we're good.
> >
> > Thanks,
> > Sanne
> >
> >
> >
> > On 30 May 2018 at 19:45, Gail Badner  > wrote:
> >> Hi Vlad,
> >>
> >> Thanks for your answer. There are definitely better ways to
> model this
> >> association.
> >>
> >> WRT the second example, where the referenced columns are a
> subset of the PK
> >> columns -- I understand there are better ways to model this.
> >>
> >> In particular, since the subset of PK columns needs to be
> unique (since
> >> they are the referenced columns of a @JoinColumn), there is no
> reason for
> >> any other columns to be in the PK.
> >>
> >> My question is more about what the JPA spec says about whether
> this should
> >> be supported.
> >>
> >> Regards,
> >> Gail
> >>
> >>
> >>
> >>
> >>
> >> On Wed, May 30, 2018 at 12:47 AM, Vlad Mihalcea
> mailto:mihalcea.v...@gmail.com>>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> For the OneToMany with @JoinColumn, the user can workaround this
> >>> limitation by just using the @ManyToOne on the child side on
> any column
> >>> they want
> >>> and turning the unidirectional association into a
> bidirectional one. I
> >>> remember I tested it and it worked just fine.
> >>>
> >>> For the  OneToMany with @JoinTable, the only workaround would
> be if they
> >>> map the join table as an entity and use the @ManyToOne on the
> columns they
> >>> want
> >>> the association to be based on.
> >>>
> >>> Since unidirectional associations don't perform that well, I'm
> not sure
> >>> whether it's worth adding support for these use cases.
> >>>
> >>> Vlad
> >>>
> >>> On Wed, May 30, 2018 at 9:32 AM, Gail Badner
> mailto:gbad...@redhat.com>> wrote:
> >>>
>  Unidirectional OneToMany associations using @JoinColumn that
> reference
>  columns that are not PK columns is not currently supported.
> 
>  The JPA 2.1 documentation for @JoinTable says:
> 
>  "Support for referenced columns that are not primary key
> columns of the
>  referenced table is optional. Applications that use such
> mappings will not
>  be portable."
> 
>  I don't see anything in the user doc that explicitly states
> that Hibernate
>  does not support this.
> 
>  Is this considered a bug?
> 
>  Also, what about a unidirectional OneToMany using a
> @JoinColumn that
>  references some, but not all, of primary key columns?
> Hibernate does not
>  support that either. Should Hibernate support it since they
> are primary
>  key
>  columns?
> 
>  Thanks,
>  Gail
>  ___
>  hibernate-dev mailing list
>  hibernate-dev@lists.jboss.org
> 
>  https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
> >>>
> >> ___
> >> hibernate-dev mailing list
> >> hibernate-dev@lists.jboss.org
> 
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org 
> >