From b227c90e3b10e3ac44aa59c15ec0583f5f91a04a Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 21 Dec 2011 16:47:30 +0100 Subject: [PATCH] officially deprecated TopLinkJpaDialect in favor of EclipseLink and Spring's EclipseLinkJpaDialect; updated supported version ranges for EclipseLink and OpenJPA --- .../orm/jpa/vendor/EclipseLinkJpaDialect.java | 6 +++--- .../orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java | 5 +++-- .../springframework/orm/jpa/vendor/OpenJpaDialect.java | 7 +++---- .../orm/jpa/vendor/OpenJpaVendorAdapter.java | 6 +++--- .../orm/jpa/vendor/TopLinkJpaDialect.java | 6 ++++-- .../orm/jpa/vendor/TopLinkJpaVendorAdapter.java | 9 +++++---- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaDialect.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaDialect.java index a3a5005727..7962f6a715 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaDialect.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaDialect.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package org.springframework.orm.jpa.vendor; import java.sql.Connection; import java.sql.SQLException; - import javax.persistence.EntityManager; import javax.persistence.PersistenceException; @@ -35,7 +34,8 @@ import org.springframework.transaction.TransactionException; /** * {@link org.springframework.orm.jpa.JpaDialect} implementation for Eclipse - * Persistence Services (EclipseLink). Developed and tested against EclipseLink 1.0. + * Persistence Services (EclipseLink). Developed and tested against EclipseLink + * 1.0 as well as 2.0-2.3. * *

By default, this class acquires a EclipseLink transaction to get the JDBC Connection * early. This allows mixing JDBC and JPA/EclipseLink operations in the same transaction. diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java index 38439cb5a5..fcc3afd86e 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,8 @@ import org.springframework.orm.jpa.JpaDialect; /** * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Eclipse - * Persistence Services (EclipseLink). Developed and tested against EclipseLink 1.0. + * Persistence Services (EclipseLink). Developed and tested against EclipseLink + * 1.0 as well as 2.0-2.3. * *

Exposes EclipseLink's persistence provider and EntityManager extension interface, * and supports {@link AbstractJpaVendorAdapter}'s common configuration settings. diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java index 328f9ce5dd..c6ba980f12 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package org.springframework.orm.jpa.vendor; import java.sql.Connection; import java.sql.SQLException; - import javax.persistence.EntityManager; import javax.persistence.PersistenceException; @@ -34,8 +33,8 @@ import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; /** - * {@link org.springframework.orm.jpa.JpaDialect} implementation for - * Apache OpenJPA. Developed and tested against OpenJPA 0.9.7. + * {@link org.springframework.orm.jpa.JpaDialect} implementation for Apache OpenJPA. + * Developed and tested against OpenJPA 1.1 as well as 2.0/2.1. * * @author Costin Leau * @author Juergen Hoeller diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java index 7253b75b51..cc3a7d79d3 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,8 @@ import org.apache.openjpa.persistence.PersistenceProviderImpl; import org.springframework.orm.jpa.JpaDialect; /** - * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for - * Apache OpenJPA. Developed and tested against OpenJPA 1.0.0. + * {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Apache OpenJPA. + * Developed and tested against OpenJPA 1.1 as well as 2.0/2.1. * *

Exposes OpenJPA's persistence provider and EntityManager extension interface, * and supports {@link AbstractJpaVendorAdapter}'s common configuration settings. diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java index 42693f59c8..3cf55ffed0 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ package org.springframework.orm.jpa.vendor; import java.sql.Connection; import java.sql.SQLException; - import javax.persistence.EntityManager; import javax.persistence.PersistenceException; @@ -50,7 +49,10 @@ import org.springframework.transaction.TransactionException; * @since 2.0 * @see #setLazyDatabaseTransaction * @see org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy + * @deprecated as of Spring 3.1, in favor of the EclipseLink project and + * Spring's corresponding {@link EclipseLinkJpaDialect} */ +@Deprecated public class TopLinkJpaDialect extends DefaultJpaDialect { private boolean lazyDatabaseTransaction = false; diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java index d865f89d3a..573b0a85bf 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,11 +16,9 @@ package org.springframework.orm.jpa.vendor; -import java.util.Map; -import java.util.Properties; import java.util.HashMap; +import java.util.Map; import java.util.logging.Level; - import javax.persistence.EntityManager; import javax.persistence.spi.PersistenceProvider; @@ -42,7 +40,10 @@ import org.springframework.orm.jpa.JpaDialect; * @since 2.0 * @see oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider * @see oracle.toplink.essentials.ejb.cmp3.EntityManager + * @deprecated as of Spring 3.1, in favor of the EclipseLink project and + * Spring's corresponding {@link EclipseLinkJpaVendorAdapter} */ +@Deprecated public class TopLinkJpaVendorAdapter extends AbstractJpaVendorAdapter { private final PersistenceProvider persistenceProvider = new EntityManagerFactoryProvider();