diff options
Diffstat (limited to 'ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources')
3 files changed, 80 insertions, 0 deletions
diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/META-INF/persistence.xml b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/META-INF/persistence.xml new file mode 100644 index 0000000..1e194c6 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,43 @@ +<persistence 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" + version="2.1"> + + <persistence-unit name="templatePU" transaction-type="RESOURCE_LOCAL"> + + <description>Hibernate test case template Persistence Unit</description> + <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> + + <exclude-unlisted-classes>false</exclude-unlisted-classes> + + <properties> + <property name="hibernate.archive.autodetection" value="class, hbm"/> + + <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> + <property name="hibernate.connection.driver_class" value="org.h2.Driver"/> + <property name="hibernate.connection.url" value="jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1"/> + <property name="hibernate.connection.username" value="sa"/> + + <property name="hibernate.connection.pool_size" value="5"/> + + <property name="hibernate.show_sql" value="true"/> + <property name="hibernate.format_sql" value="true"/> + <property name="hibernate.hbm2ddl.auto" value="create-drop"/> + + <property name="hibernate.max_fetch_depth" value="5"/> + + <property name="hibernate.cache.region_prefix" value="hibernate.test"/> + <property name="hibernate.cache.region.factory_class" + value="org.hibernate.testing.cache.CachingRegionFactory"/> + + <!--NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle--> + <property name="hibernate.jdbc.batch_versioned_data" value="true"/> + + <property name="javax.persistence.validation.mode" value="NONE"/> + <property name="hibernate.service.allow_crawling" value="false"/> + <property name="hibernate.session.events.log" value="true"/> + </properties> + + </persistence-unit> +</persistence> diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties new file mode 100644 index 0000000..9b7d955 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/hibernate.properties @@ -0,0 +1,29 @@ +# +# Hibernate, Relational Persistence for Idiomatic Java +# +# License: GNU Lesser General Public License (LGPL), version 2.1 or later. +# See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. +# + +hibernate.dialect org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class org.h2.Driver +#hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE +hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1 +hibernate.connection.username sa + +hibernate.connection.pool_size 5 + +hibernate.show_sql false +hibernate.format_sql true + +hibernate.max_fetch_depth 5 + +hibernate.cache.region_prefix hibernate.test +hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory + +# NOTE: hibernate.jdbc.batch_versioned_data should be set to false when testing with Oracle +hibernate.jdbc.batch_versioned_data true + +javax.persistence.validation.mode=NONE +hibernate.service.allow_crawling=false +hibernate.session.events.log=true
\ No newline at end of file diff --git a/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/log4j.properties b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/log4j.properties new file mode 100644 index 0000000..d42ce42 --- /dev/null +++ b/ransim/ransimctrlr/RANSIM-CTRLR/src/test/resources/log4j.properties @@ -0,0 +1,8 @@ +# Root logger option +log4j.rootLogger=INFO, stdout + +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n |