You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@incubator.apache.org by Jason Porter <jp...@ibm.com.INVALID> on 2023/01/30 19:00:25 UTC

[QUESTION] How do Java-based projects handle Hibernate?

Question for the group, since I have seen things that seem contradictory. How do projects handle Hibernate since it's LGPL and as such, a Category X dependency?

It seems like simply using the library is fine. However, then you see things about "linking" to the library, does simply using the classes and the imports mean it's included in the source?

Is that allowed if we're using JPA and OpenJPA for the classes and Hibernate for the implementation?

Along the same lines, what about test libraries?

Jason Porter
Software Engineer
He/Him/His

IBM


Re: [QUESTION] How do Java-based projects handle Hibernate?

Posted by Jason Porter <jp...@ibm.com.INVALID>.
Thanks, Romain.

Jason Porter
Software Engineer
He/Him/His

IBM

On Jan 30, 2023, at 12:10, Romain Manni-Bucau <rm...@gmail.com> wrote:

Hi Jason,

AFAIK it is ok to use it in tests while you don't reference it explicitly
in your code (which means delivering it or implementing its SPI/classes and
you don't let it be transitive in any assembly somehow) so would mean ok to
use in test while you stay under JPA API.
So it would be more JPA for the code, OpenJPA/Hibernate in tests and
OpenJPA for the runtime until you download it at runtime (like Karaf
features can do for ex).

Regards,
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau > |  Blog
<https://rmannibucau.metawerx.net/ > | Old Blog
<http://rmannibucau.wordpress.com > | Github <https://github.com/rmannibucau > |
LinkedIn <https://www.linkedin.com/in/rmannibucau > | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance >


Le lun. 30 janv. 2023 à 20:01, Jason Porter <jp...@ibm.com.invalid> a
écrit :

Question for the group, since I have seen things that seem contradictory.
How do projects handle Hibernate since it's LGPL and as such, a Category X
dependency?

It seems like simply using the library is fine. However, then you see
things about "linking" to the library, does simply using the classes and
the imports mean it's included in the source?

Is that allowed if we're using JPA and OpenJPA for the classes and
Hibernate for the implementation?

Along the same lines, what about test libraries?

Jason Porter
Software Engineer
He/Him/His

IBM




Re: [QUESTION] How do Java-based projects handle Hibernate?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Jason,

AFAIK it is ok to use it in tests while you don't reference it explicitly
in your code (which means delivering it or implementing its SPI/classes and
you don't let it be transitive in any assembly somehow) so would mean ok to
use in test while you stay under JPA API.
So it would be more JPA for the code, OpenJPA/Hibernate in tests and
OpenJPA for the runtime until you download it at runtime (like Karaf
features can do for ex).

Regards,
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 30 janv. 2023 à 20:01, Jason Porter <jp...@ibm.com.invalid> a
écrit :

> Question for the group, since I have seen things that seem contradictory.
> How do projects handle Hibernate since it's LGPL and as such, a Category X
> dependency?
>
> It seems like simply using the library is fine. However, then you see
> things about "linking" to the library, does simply using the classes and
> the imports mean it's included in the source?
>
> Is that allowed if we're using JPA and OpenJPA for the classes and
> Hibernate for the implementation?
>
> Along the same lines, what about test libraries?
>
> Jason Porter
> Software Engineer
> He/Him/His
>
> IBM
>
>