[java-opensaml COMMIT] in /trunk: opensaml-parent/pom.xml opensaml-storage-impl/pom.xml opensaml-storage-impl/src/tes...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Jun 13 01:43:02 EDT 2014
Author: dfisher
Date: Fri Jun 13 01:42:55 2014
New Revision: 3928
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3928&view=rev
Log:
Use spring entity manager factory.
Remove persistence.xml, move configuration to a spring context file.
Added:
trunk/opensaml-storage-impl/src/test/resources/org/opensaml/storage/impl/jpa-spring-context.xml
Modified:
trunk/opensaml-parent/pom.xml
trunk/opensaml-storage-impl/pom.xml
trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java
trunk/opensaml-storage-impl/src/test/resources/META-INF/
Modified: trunk/opensaml-parent/pom.xml
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-parent/pom.xml?rev=3928&r1=3927&r2=3928&view=diff
==============================================================================
--- trunk/opensaml-parent/pom.xml (original)
+++ trunk/opensaml-parent/pom.xml Fri Jun 13 01:42:55 2014
@@ -48,6 +48,7 @@
<properties>
<svn.relative.location>java-opensaml</svn.relative.location>
<java-support.version>3.0-SNAPSHOT</java-support.version>
+ <spring-extensions.version>1.2-SNAPSHOT</spring-extensions.version>
</properties>
<repositories>
@@ -124,6 +125,13 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>net.shibboleth.ext</groupId>
+ <artifactId>spring-extensions</artifactId>
+ <version>${spring-extensions.version}</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: trunk/opensaml-storage-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/pom.xml?rev=3928&r1=3927&r2=3928&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/pom.xml (original)
+++ trunk/opensaml-storage-impl/pom.xml Fri Jun 13 01:42:55 2014
@@ -34,10 +34,10 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
- <dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency>
<!-- Provided Dependencies -->
<dependency>
@@ -49,6 +49,10 @@
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${spring.groupId}</groupId>
+ <artifactId>spring-orm</artifactId>
</dependency>
<!-- Test Dependencies -->
@@ -79,6 +83,18 @@
</dependency>
<dependency>
+ <groupId>${spring.groupId}</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.shibboleth.ext</groupId>
+ <artifactId>spring-extensions</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<scope>test</scope>
Modified: trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java?rev=3928&r1=3927&r2=3928&view=diff
==============================================================================
--- trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java (original)
+++ trunk/opensaml-storage-impl/src/test/java/org/opensaml/storage/impl/JPAStorageServiceTest.java Fri Jun 13 01:42:55 2014
@@ -19,17 +19,23 @@
import java.io.IOException;
import java.security.SecureRandom;
+import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
+import net.shibboleth.ext.spring.util.SpringSupport;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import org.opensaml.storage.StorageRecord;
import org.opensaml.storage.StorageService;
import org.opensaml.storage.StorageServiceTest;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
@@ -59,17 +65,32 @@
}
/**
+ * Creates the shared instance of the entity manager factory.
+ */
[... 49 lines stripped ...]
More information about the commits
mailing list