Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#77: EntityManager(Factory) should implement AutoCloseable #312

Merged
merged 2 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/persistence/EntityManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -51,7 +51,7 @@
*
* @since 1.0
*/
public interface EntityManager {
public interface EntityManager extends AutoCloseable {

/**
* Make an instance managed and persistent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -32,7 +32,7 @@
*
* @since 1.0
*/
public interface EntityManagerFactory {
public interface EntityManagerFactory extends AutoCloseable {

/**
* Create a new application-managed <code>EntityManager</code>.
Expand Down
8 changes: 6 additions & 2 deletions spec/src/main/asciidoc/appendixes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation
// Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation
//

[appendix]
Expand Down Expand Up @@ -71,4 +71,8 @@ Packages of all API classes were changed to _jakarta.persistence_. These changes
Schema namespaces were changed from http://xmlns.jcp.org/xml/ns/persistence and http://xmlns.jcp.org/xml/ns/persistence/orm
to https://jakarta.ee/xml/ns/persistence and https://jakarta.ee/xml/ns/persistence/orm

References to schema versions lower than 2.2 were removed.
References to schema versions lower than 2.2 were removed.

=== Jakarta Persistence 3.0

EntityManagerFactory and EntityManager interfaces extend java.lang.AutoCloseable interface
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/ch03-entity-operations.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation
// Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation
//

== Entity Operations [[a1060]]
Expand Down Expand Up @@ -84,7 +84,7 @@ import jakarta.persistence.criteria.CriteriaDelete;
*
* @since 1.0
*/
public interface EntityManager {
public interface EntityManager extends AutoCloseable {

/**
* Make an instance managed and persistent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation
// Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation
//

== Entity Managers and Persistence Contexts [[a11431]]
Expand Down Expand Up @@ -223,7 +223,7 @@ import jakarta.persistence.criteria.CriteriaBuilder;
*
* @since 1.0
*/
public interface EntityManagerFactory {
public interface EntityManagerFactory extends AutoCloseable {

/**
* Create a new application-managed <code>EntityManager</code>.
Expand Down