[GitHub] [tomee] rzo1 commented on a change in pull request #789: TOMEE-3741 New Example and documentation JPA Hibernate 5 with arquillian
rzo1 commented on a change in pull request #789: URL: https://github.com/apache/tomee/pull/789#discussion_r629877489 ## File path: examples/jpa-hibernate-arquillian/pom.xml ## @@ -0,0 +1,163 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + 4.0.0 + org.superbiz + jpa-hibernate-arquillian + jar + 8.0.7-SNAPSHOT + TomEE :: Examples :: JPA with Hibernate and arquillian + +UTF-8 + 8.0.7-SNAPSHOT + + +install + + +org.apache.maven.plugins +maven-compiler-plugin +3.5.1 + + 1.8 + 1.8 + + + +org.tomitribe.transformer +org.eclipse.transformer.maven +0.1.1a + + jakartaee9 + + + + + run + +package + + + + + + + + apache-m2-snapshot + Apache Snapshot Repository + https://repository.apache.org/content/groups/snapshots + + + jboss-public-repository-group + JBoss Public Maven Repository Group + https://repository.jboss.org/nexus/content/repositories/releases/ + default + +true +always + + +true +always + + + + + + + + +org.jboss.shrinkwrap.resolver +shrinkwrap-resolver-bom +3.1.4 +import +pom + + + +org.jboss.arquillian +arquillian-bom +1.0.3.Final +import +pom + + + + + + + + org.apache.tomee + javaee-api + [8.0,) + provided + + + junit + junit + 4.12 + test + + Review comment: Looks like formatting is off-scale here? ## File path: examples/jpa-hibernate-arquillian/README.adoc ## @@ -0,0 +1,323 @@ += JPA Hibernate Arquillian +:index-group: JPA +:jbake-type: page +:jbake-status: published + +This example shows the persist, remove and creation a query in JPA Hibernate 5 using arquillian for the test. + +The Java Persistence API (JPA) is a Java specification for accessing, persisting, and managing data between Java objects / classes and a relational database. + +To exemplify the use of JPA, we will persist an Object (Movie) in the database. + +Links to the documentation have been added in key parts of the example for the case of doubts and as a way to encourage their reading for details. + +== Movie + +Here we have a class with some details. See the annotation +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/Entity.html[@Entity] +above the declaration, with it we are saying that this class is an entity (a table in the database). We still have two more annotations above the attribute id, one of them is +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/Id.html[@Id] +annotation, it indicates that this attribute is the identifier of the entity and the other annotation +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/GeneratedValue.html[@GeneratedValue] +indicates that the unique identifier value generation of the entity will be managed by the persistence provider. + +[source,java] + +package org.superbiz.injection.h3jpa; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Movie { + +@Id +@GeneratedValue(strategy = GenerationType.AUTO) +private long id; + +private String director; +private String title; +private int year; + +public Movie() { +} + +public Movie(String director, String title, int year) { +this.director = director; +this.title = title; +this.year = year; +} + +public String getDirector() { +return director; +} + +public void setDirector(String director) { +this.director = director; +} + +public String getTitle() { +return title; +} + +public void setTitle(String title) { +this.title = title; +} + +public int getYear() { +return year; +} + +public void setYear(int year) { +this.year = year; +} + +} + + +== Movies + +Now we have two important things: +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/PersistenceContext.html[@PersistenceContext] +annotation and the +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/EntityManager.html[EntityManager] +declaration. +The +link:https://tomee.apache.org/tomee-8.0/javadoc/javax/persistence/EntityManager.html[EntityManager]
AW: Converting "release-tools" from svn to git
Sounds good. Thanks! Von: David Blevins Gesendet: Dienstag, 11. Mai 2021 00:50:26 An: dev@tomee.apache.org Betreff: Converting "release-tools" from svn to git We have some tools to help with release tasks in svn here: - http://svn.apache.org/repos/asf/tomee/sandbox/release-tools/ I think I'm going to try to convert that over to git and put some love into them. Not sure what runs and what doesn't. I have to do the finishing steps for the 8.0.7 and 9.0.0-M7 so we'll see :) -David
Converting "release-tools" from svn to git
We have some tools to help with release tasks in svn here: - http://svn.apache.org/repos/asf/tomee/sandbox/release-tools/ I think I'm going to try to convert that over to git and put some love into them. Not sure what runs and what doesn't. I have to do the finishing steps for the 8.0.7 and 9.0.0-M7 so we'll see :) -David smime.p7s Description: S/MIME cryptographic signature
Re: [RESULT] Release Apache TomEE 8.0.7 and 9.0.0-M7
Hello, very good :) -- *Daniel Dias dos Santos* Java Developer SouJava & JCP Member GitHub: https://github.com/Daniel-Dos Linkedin: www.linkedin.com/in/danieldiasjava Twitter: http://twitter.com/danieldiasjava Em seg., 10 de mai. de 2021 às 17:58, David Blevins escreveu: > Vote passes with 8 +1s and more positive votes than negative votes. Based > on the corresponding discussion thread we'll leave the 8.0.7 off the > website. > > Huge thank you to everyone who voted or helped with the release in any > way. This one is truly historic :) > > > +1 > Daniel Dias Dos Santos > David Jencks > Jean-Louis Monteiro > Cesar Hernandez > Alex The Rocker > Jonathan Gallimore > Mark Struberg > David Blevins > > +0 > Richard Zowalla > > -0 > Martin Wiesner > > Unspecified: > Alex Rabelo Ferreira > > > > -David > > > On May 3, 2021, at 8:01 AM, David Blevins > wrote: > > > > Ok, folks, > > > > Here we go. Again, bear in mind we need these binaries for the Jakarta > EE 9.1 release ballot today. Any issues and we can roll a Apache TomEE > 8.0.8 and Apache TomEE 9.0.0-M8 asap. I think we should plan on doing that > anyway, so feel free to say call it straight out when reporting "I found x > issue we should fix in 8.0.8" > > > > > > TomEE Patch Plugin v0.5 > > https://repository.apache.org/content/repositories/orgapachetomee-1182/ > > > > Apache TomEE 8.0.7 > > https://repository.apache.org/content/repositories/orgapachetomee-1183/ > > > > Apache TomEE 9.0.0-M7 > > https://repository.apache.org/content/repositories/orgapachetomee-1184/ > > > > This vote will be open for 72 hours. Please vote +1, 0, -1. When > voting -1, please state the reason. > > > > > > > > -- > > David Blevins > > http://twitter.com/dblevins > > http://www.tomitribe.com > > > >
[RESULT] Release Apache TomEE 8.0.7 and 9.0.0-M7
Vote passes with 8 +1s and more positive votes than negative votes. Based on the corresponding discussion thread we'll leave the 8.0.7 off the website. Huge thank you to everyone who voted or helped with the release in any way. This one is truly historic :) +1 Daniel Dias Dos Santos David Jencks Jean-Louis Monteiro Cesar Hernandez Alex The Rocker Jonathan Gallimore Mark Struberg David Blevins +0 Richard Zowalla -0 Martin Wiesner Unspecified: Alex Rabelo Ferreira -David > On May 3, 2021, at 8:01 AM, David Blevins wrote: > > Ok, folks, > > Here we go. Again, bear in mind we need these binaries for the Jakarta EE > 9.1 release ballot today. Any issues and we can roll a Apache TomEE 8.0.8 > and Apache TomEE 9.0.0-M8 asap. I think we should plan on doing that anyway, > so feel free to say call it straight out when reporting "I found x issue we > should fix in 8.0.8" > > > TomEE Patch Plugin v0.5 > https://repository.apache.org/content/repositories/orgapachetomee-1182/ > > Apache TomEE 8.0.7 > https://repository.apache.org/content/repositories/orgapachetomee-1183/ > > Apache TomEE 9.0.0-M7 > https://repository.apache.org/content/repositories/orgapachetomee-1184/ > > This vote will be open for 72 hours. Please vote +1, 0, -1. When voting -1, > please state the reason. > > > > -- > David Blevins > http://twitter.com/dblevins > http://www.tomitribe.com > smime.p7s Description: S/MIME cryptographic signature
Re: [VOTE] Release Apache TomEE 8.0.7 and 9.0.0-M7
Here's my +1 -David > On May 3, 2021, at 8:01 AM, David Blevins wrote: > > Ok, folks, > > Here we go. Again, bear in mind we need these binaries for the Jakarta EE > 9.1 release ballot today. Any issues and we can roll a Apache TomEE 8.0.8 > and Apache TomEE 9.0.0-M8 asap. I think we should plan on doing that anyway, > so feel free to say call it straight out when reporting "I found x issue we > should fix in 8.0.8" > > > TomEE Patch Plugin v0.5 > https://repository.apache.org/content/repositories/orgapachetomee-1182/ > > Apache TomEE 8.0.7 > https://repository.apache.org/content/repositories/orgapachetomee-1183/ > > Apache TomEE 9.0.0-M7 > https://repository.apache.org/content/repositories/orgapachetomee-1184/ > > This vote will be open for 72 hours. Please vote +1, 0, -1. When voting -1, > please state the reason. > > > > -- > David Blevins > http://twitter.com/dblevins > http://www.tomitribe.com > smime.p7s Description: S/MIME cryptographic signature
Re: [VOTE] Release Apache TomEE 8.0.7 and 9.0.0-M7
Got some time to give it a try. No other comment. +1 -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Fri, May 7, 2021 at 12:14 PM Mark Struberg wrote: > +1 > > LieGrue, > strub > > > > Am 03.05.2021 um 17:01 schrieb David Blevins : > > > > Ok, folks, > > > > Here we go. Again, bear in mind we need these binaries for the Jakarta > EE 9.1 release ballot today. Any issues and we can roll a Apache TomEE > 8.0.8 and Apache TomEE 9.0.0-M8 asap. I think we should plan on doing that > anyway, so feel free to say call it straight out when reporting "I found x > issue we should fix in 8.0.8" > > > > > > TomEE Patch Plugin v0.5 > > https://repository.apache.org/content/repositories/orgapachetomee-1182/ > > > > Apache TomEE 8.0.7 > > https://repository.apache.org/content/repositories/orgapachetomee-1183/ > > > > Apache TomEE 9.0.0-M7 > > https://repository.apache.org/content/repositories/orgapachetomee-1184/ > > > > This vote will be open for 72 hours. Please vote +1, 0, -1. When > voting -1, please state the reason. > > > > > > > > -- > > David Blevins > > http://twitter.com/dblevins > > http://www.tomitribe.com > > > >