diff options
author | Jim Hahn <jrh3@att.com> | 2018-02-14 12:52:31 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2018-02-14 16:14:17 -0500 |
commit | c83e35bab5aa44f01cb7a9089701ef963ee0c131 (patch) | |
tree | d76dfcdb85ecdde91202da22053876ab57f46204 /feature-session-persistence/src/test/resources | |
parent | c5d5a9058d47eca9d4ac90308514ff8f1f9d0ca3 (diff) |
Replace bitronix and eclipselink in persistence
Replaced bitronix transaction manager, which is not intended for production,
with jboss transaction manager.
Eliminated eclipselink so that only hibernate is used for
persistence for both JPA and drools-persistence.
Added more test cases to EntityMgrTrans to provide coverage for
various exception types.
Moved object store to features/session-persistence/jta.
Wrapped RuntimeException in specific type.
Modified test to throw specific exception type.
Converted GenSchema from an @Test to a main().
Logged caught exceptions in junit tests.
Change-Id: I4b02efc8da43d20b2dbb3c0b25adc382e80474ec
Issue-ID: POLICY-191
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-session-persistence/src/test/resources')
-rw-r--r-- | feature-session-persistence/src/test/resources/META-INF/persistence.xml | 12 | ||||
-rw-r--r-- | feature-session-persistence/src/test/resources/feature-session-persistence.properties | 3 |
2 files changed, 3 insertions, 12 deletions
diff --git a/feature-session-persistence/src/test/resources/META-INF/persistence.xml b/feature-session-persistence/src/test/resources/META-INF/persistence.xml index 6794e24e..5cc1badc 100644 --- a/feature-session-persistence/src/test/resources/META-INF/persistence.xml +++ b/feature-session-persistence/src/test/resources/META-INF/persistence.xml @@ -23,16 +23,8 @@ xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> - <persistence-unit name="junitDroolsSessionEntityPU" transaction-type="RESOURCE_LOCAL"> - <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> - <class>org.onap.policy.drools.persistence.DroolsSessionEntity</class> - <properties> - <property name="javax.persistence.schema-generation.database.action" value="create"/> - </properties> - </persistence-unit> - - <persistence-unit name="junitPersistenceFeaturePU" transaction-type="RESOURCE_LOCAL"> - <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> + <persistence-unit name="junitDroolsSessionEntityPU" transaction-type="JTA"> + <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <class>org.onap.policy.drools.persistence.DroolsSessionEntity</class> <properties> <property name="javax.persistence.schema-generation.database.action" value="create"/> diff --git a/feature-session-persistence/src/test/resources/feature-session-persistence.properties b/feature-session-persistence/src/test/resources/feature-session-persistence.properties index 6b448dc8..a1e9cc43 100644 --- a/feature-session-persistence/src/test/resources/feature-session-persistence.properties +++ b/feature-session-persistence/src/test/resources/feature-session-persistence.properties @@ -23,6 +23,5 @@ javax.persistence.jdbc.url=jdbc:h2:mem:TestPersistenceFeature javax.persistence.jdbc.user=testuser javax.persistence.jdbc.password=testpass -hibernate.dataSource=org.h2.jdbcx.JdbcDataSource - persistence.sessioninfo.timeout=10 +persistence.objectstore.dir=target/jta |