.
- */
-package org.hibernate.wildfly.integrationtest;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
-
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.hibernate.Session;
-import org.hibernate.wildfly.model.Kryptonite;
-
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceDescriptor;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceUnitTransactionType;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Integration test for using the current Hibernate ORM version on WildFly.
- *
- * Gradle will unzip the targeted WildFly version and unpack the module ZIP created by this build into the server's
- * module directory. Arquillian is used to start this WildFly instance, run this test on the server and stop the server
- * again.
- *
- * @author Gunnar Morling
- */
-@RunWith(Arquillian.class)
-public class HibernateModulesOnWildflyTest {
-
- private static final String ORM_VERSION = Session.class.getPackage().getImplementationVersion();
- private static final String ORM_MINOR_VERSION = ORM_VERSION.substring( 0, ORM_VERSION.indexOf( ".", ORM_VERSION.indexOf( "." ) + 1) );
-
- @Deployment
- public static WebArchive createDeployment() {
- return ShrinkWrap.create( WebArchive.class )
- .addClass( Kryptonite.class )
- .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
- .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" );
- }
-
- private static PersistenceDescriptor persistenceXml() {
- return Descriptors.create( PersistenceDescriptor.class )
- .version( "2.1" )
- .createPersistenceUnit()
- .name( "primary" )
- .transactionType( PersistenceUnitTransactionType._JTA )
- .jtaDataSource( "java:jboss/datasources/ExampleDS" )
- .getOrCreateProperties()
- // We want to use the ORM from this build instead of the one coming with WildFly
- .createProperty().name( "jboss.as.jpa.providerModule" ).value( "org.hibernate:" + ORM_MINOR_VERSION ).up()
- .createProperty().name( "hibernate.hbm2ddl.auto" ).value( "create-drop" ).up()
- .createProperty().name( "hibernate.allow_update_outside_transaction" ).value( "true" ).up()
- .up().up();
- }
-
- @PersistenceContext
- private EntityManager entityManager;
-
- @Test
- public void shouldUseHibernateOrm52() {
- Session session = entityManager.unwrap( Session.class );
-
- Kryptonite kryptonite1 = new Kryptonite();
- kryptonite1.id = 1L;
- kryptonite1.description = "Some Kryptonite";
- session.persist( kryptonite1 );
-
- // EntityManager methods exposed through Session only as of 5.2
- Kryptonite loaded = session.find( Kryptonite.class, 1L );
-
- assertThat( loaded.description, equalTo( "Some Kryptonite" ) );
- }
-}
diff --git a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/JavassistHibernateModulesOnWildflyTest.java b/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/JavassistHibernateModulesOnWildflyTest.java
deleted file mode 100644
index 3a4e396182..0000000000
--- a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/JavassistHibernateModulesOnWildflyTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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 .
- */
-package org.hibernate.wildfly.integrationtest;
-
-import java.util.Properties;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.hibernate.Session;
-import org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl;
-import org.hibernate.bytecode.spi.BasicProxyFactory;
-import org.hibernate.bytecode.spi.BytecodeProvider;
-import org.hibernate.bytecode.spi.ProxyFactoryFactory;
-import org.hibernate.cfg.AvailableSettings;
-import org.hibernate.cfg.Environment;
-import org.hibernate.wildfly.model.Kryptonite;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.Asset;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceDescriptor;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceUnitTransactionType;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.hamcrest.core.IsNull.notNullValue;
-import static org.junit.Assert.assertThat;
-
-/**
- * The purpose of this test is to check that it's still possible to use Javassist as byte code provider with WildFly.
- */
-@RunWith(Arquillian.class)
-public class JavassistHibernateModulesOnWildflyTest {
-
- private static final String ORM_VERSION = Session.class.getPackage().getImplementationVersion();
- private static final String ORM_MINOR_VERSION = ORM_VERSION.substring( 0, ORM_VERSION.indexOf( ".", ORM_VERSION.indexOf( "." ) + 1) );
-
- @Deployment
- public static WebArchive createDeployment() {
- return ShrinkWrap.create( WebArchive.class )
- .addClass( Kryptonite.class )
- .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
- .addAsResource( persistenceXml(), "META-INF/persistence.xml" );
- }
-
- private static Asset persistenceXml() {
- PersistenceDescriptor persistenceXml = Descriptors.create( PersistenceDescriptor.class )
- .version( "2.1" )
- .createPersistenceUnit()
- .name( "primary" )
- .transactionType( PersistenceUnitTransactionType._JTA )
- .jtaDataSource( "java:jboss/datasources/ExampleDS" )
- .getOrCreateProperties()
- // We want to use the ORM from this build instead of the one coming with WildFly
- .createProperty().name( "jboss.as.jpa.providerModule" ).value( "org.hibernate:" + ORM_MINOR_VERSION ).up()
- .createProperty().name( "hibernate.hbm2ddl.auto" ).value( "create-drop" ).up()
- .createProperty().name( "hibernate.allow_update_outside_transaction" ).value( "true" ).up()
- .up().up();
- return new StringAsset( persistenceXml.exportAsString() );
- }
-
- @PersistenceContext
- private EntityManager entityManager;
-
- @Test
- public void shouldUseHibernateOrm52() {
- Session session = entityManager.unwrap( Session.class );
-
- Kryptonite kryptonite1 = new Kryptonite();
- kryptonite1.id = 1L;
- kryptonite1.description = "Some Kryptonite";
- session.persist( kryptonite1 );
-
- // EntityManager methods exposed through Session only as of 5.2
- Kryptonite loaded = session.find( Kryptonite.class, 1L );
-
- assertThat( loaded.description, equalTo( "Some Kryptonite" ) );
- }
-
- @Test
- public void shouldBeAbleToCreateProxyWithJavassist() {
- Properties properties = new Properties();
- properties.setProperty( AvailableSettings.BYTECODE_PROVIDER, Environment.BYTECODE_PROVIDER_NAME_JAVASSIST );
-
- // hibernate.bytecode.provider is a system property. I don't want to apply it
- // to the arquillian.xml because it will change the other tests as well.
- // I guess this is a more explicit way anyway to test that Javassist is available.
- BytecodeProvider provider = Environment.buildBytecodeProvider( properties );
- assertThat( provider.getClass(), equalTo( BytecodeProviderImpl.class ) );
-
- ProxyFactoryFactory factory = provider.getProxyFactoryFactory();
- BasicProxyFactory basicProxyFactory = factory.buildBasicProxyFactory( Kryptonite.class, null );
- Object proxy = basicProxyFactory.getProxy();
- assertThat( proxy, notNullValue() );
- }
-}
diff --git a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/TransactionRollbackTest.java b/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/TransactionRollbackTest.java
deleted file mode 100644
index 6f4123451d..0000000000
--- a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/integrationtest/TransactionRollbackTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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 .
- */
-package org.hibernate.wildfly.integrationtest;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
-import javax.persistence.PersistenceContext;
-
-import org.hibernate.Session;
-import org.hibernate.engine.transaction.spi.TransactionImplementor;
-import org.hibernate.wildfly.model.Kryptonite;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceDescriptor;
-import org.jboss.shrinkwrap.descriptor.api.persistence21.PersistenceUnitTransactionType;
-
-import static org.junit.Assert.assertFalse;
-
-/**
- * @author Andrea Boriero
- */
-@RunWith(Arquillian.class)
-public class TransactionRollbackTest {
-
- private static final String ORM_VERSION = Session.class.getPackage().getImplementationVersion();
- private static final String ORM_MINOR_VERSION = ORM_VERSION.substring( 0,
- ORM_VERSION.indexOf(
- ".",
- ORM_VERSION.indexOf( "." ) + 1
- )
- );
-
- @Deployment
- public static WebArchive createDeployment() {
- return ShrinkWrap.create( WebArchive.class )
- .addClass( Kryptonite.class )
- .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
- .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" );
- }
-
- private static PersistenceDescriptor persistenceXml() {
- return Descriptors.create( PersistenceDescriptor.class )
- .version( "2.1" )
- .createPersistenceUnit()
- .name( "primary" )
- .transactionType( PersistenceUnitTransactionType._RESOURCE_LOCAL )
- .jtaDataSource( "java:jboss/datasources/ExampleDS" )
- .getOrCreateProperties()
- // We want to use the ORM from this build instead of the one coming with WildFly
- .createProperty()
- .name( "jboss.as.jpa.providerModule" )
- .value( "org.hibernate:" + ORM_MINOR_VERSION )
- .up()
- .createProperty()
- .name( "hibernate.hbm2ddl.auto" )
- .value( "create-drop" )
- .up()
- .createProperty()
- .name( "hibernate.allow_update_outside_transaction" )
- .value( "true" )
- .up()
- .up()
- .up();
- }
-
- @PersistenceContext
- private EntityManager entityManager;
-
- @Test
- public void testMarkRollbackOnlyAnUnactiveTransaction() {
- EntityTransaction transaction = entityManager.getTransaction();
- final TransactionImplementor hibernateTransaction = (TransactionImplementor) transaction;
- hibernateTransaction.markRollbackOnly();
- transaction.rollback();
- assertFalse( transaction.isActive() );
- }
-
- @Test
- public void testMarkRollbackOnlyAnActiveTransaction() {
- EntityTransaction transaction = entityManager.getTransaction();
- final TransactionImplementor hibernateTransaction = (TransactionImplementor) transaction;
- transaction.begin();
- hibernateTransaction.markRollbackOnly();
- transaction.rollback();
- assertFalse( transaction.isActive() );
- }
-}
diff --git a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/AuditedEntity.java b/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/AuditedEntity.java
deleted file mode 100644
index 0d6f48950a..0000000000
--- a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/AuditedEntity.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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 .
- */
-package org.hibernate.wildfly.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Chris Cranford
- */
-@Audited
-@Entity
-public class AuditedEntity {
- @Id
- private Integer id;
-
- private String name;
-
- AuditedEntity() {
-
- }
-
- public AuditedEntity(Integer id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public boolean equals(Object object) {
- if ( this == object ) {
- return true;
- }
- if ( object == null || !( object instanceof AuditedEntity ) ) {
- return false;
- }
-
- AuditedEntity that = (AuditedEntity) object;
- return !( name != null ? !name.equals( that.name ) : that.name != null );
- }
-
- @Override
- public int hashCode() {
- return ( name != null ? name.hashCode() : 0 );
- }
-}
diff --git a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/Kryptonite.java b/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/Kryptonite.java
deleted file mode 100644
index 3ab61e224b..0000000000
--- a/hibernate-orm-modules/src/test/java/org/hibernate/wildfly/model/Kryptonite.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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 .
- */
-package org.hibernate.wildfly.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author Gunnar Morling
- */
-@Entity
-public class Kryptonite {
-
- @Id
- public long id;
-
- public String description;
-}
diff --git a/hibernate-orm-modules/src/test/resources/arquillian.xml b/hibernate-orm-modules/src/test/resources/arquillian.xml
deleted file mode 100644
index 29026d4096..0000000000
--- a/hibernate-orm-modules/src/test/resources/arquillian.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- ${wildFlyInstallDir}
-
-
-
-
- -Dee8.preview.mode=true
- -Djava.net.preferIPv4Stack=true
- -Djgroups.bind_addr=127.0.0.1
-
-
-
-
-
diff --git a/hibernate-orm-modules/wildfly-server-provisioning.xml b/hibernate-orm-modules/wildfly-server-provisioning.xml
deleted file mode 100644
index b7bab85a9b..0000000000
--- a/hibernate-orm-modules/wildfly-server-provisioning.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
diff --git a/settings.gradle b/settings.gradle
index aa16052c52..0ecb383e96 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -63,7 +63,6 @@ include 'hibernate-ehcache'
include 'hibernate-infinispan'
include 'hibernate-jipijapa'
-include 'hibernate-orm-modules'
include 'hibernate-graalvm'
if ( JavaVersion.current().isJava11Compatible() ) {