Skip to content

Commit

Permalink
WFLY-4870 Added ORM5 jpa suppport
Browse files Browse the repository at this point in the history
  • Loading branch information
johnaohara authored and scottmarlow committed Jul 9, 2015
1 parent 45bf17a commit 0f3691b
Show file tree
Hide file tree
Showing 87 changed files with 5,883 additions and 2 deletions.
11 changes: 11 additions & 0 deletions feature-pack/pom.xml
Expand Up @@ -700,6 +700,17 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>jipijapa-hibernate5</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>jipijapa-hibernate4-3</artifactId>
Expand Down
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2015, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<module xmlns="urn:jboss:module:1.3" name="org.hibernate.jipijapa-hibernate5">
<resources>
<artifact name="${org.wildfly:jipijapa-hibernate5}"/>
</resources>

<dependencies>
<module name="org.hibernate"/>
<module name="asm.asm"/>
<module name="com.fasterxml.classmate"/>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.apache.commons.collections"/>
<module name="org.dom4j"/>
<module name="org.javassist"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.jandex"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.hibernate.commons-annotations"/>
<module name="org.hibernate.infinispan" services="import"/>
<module name="org.infinispan" services="import"/>
</dependencies>
</module>
Expand Up @@ -50,6 +50,6 @@
<module name="org.jboss.vfs"/>
<module name="org.hibernate.commons-annotations"/>
<module name="org.hibernate.infinispan" services="import" optional="true"/>
<module name="org.hibernate.jipijapa-hibernate4-3" services="import"/>
<module name="org.hibernate.jipijapa-hibernate5" services="import"/>
</dependencies>
</module>
149 changes: 149 additions & 0 deletions jpa/hibernate5/pom.xml
@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ JBoss, Home of Professional Open Source
~ Copyright 2013, Red Hat Middleware LLC, and individual contributors
~ by the @authors tag. See the copyright.txt in the distribution for a
~ full listing of individual contributors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~ http://www.apache.org/licenses/LICENSE-2.0
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-jpa-parent</artifactId>
<version>10.0.0.Alpha2-SNAPSHOT</version>
</parent>

<properties>
<version.org.hibernate5>5.0.0-SNAPSHOT</version.org.hibernate5>
<version.org.hibernate5.commons.annotations>4.0.5.Final</version.org.hibernate5.commons.annotations>
<version.org.hibernate.validator>5.0.1.Final</version.org.hibernate.validator>
</properties>

<groupId>org.wildfly</groupId>
<artifactId>jipijapa-hibernate5</artifactId>

<name>jipijapa Hibernate 5.x (JPA 2.1) integration</name>

<dependencies>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
</dependency>

<!-- Internal -->

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>jipijapa-spi</artifactId>
</dependency>

<!-- External -->

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
</dependency>

<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>${version.org.hibernate5.commons.annotations}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${version.org.hibernate5}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>

</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${version.org.hibernate5}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>

</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-infinispan</artifactId>
<version>${version.org.hibernate5}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${version.org.hibernate.validator}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</dependency>

<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</dependency>

</dependencies>
</project>
@@ -0,0 +1,42 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2013, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.as.jpa.hibernate5;

import org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform;
import org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformProvider;


/**
* @author Scott Marlow
*/
public class DefaultJtaPlatform implements JtaPlatformProvider {

private static volatile JBossAppServerJtaPlatform delegate;

public static JBossAppServerJtaPlatform getDelegate() {
return delegate;
}

public static void setDelegate(JBossAppServerJtaPlatform delegate) {
DefaultJtaPlatform.delegate = delegate;
}

@Override
public JtaPlatform getProvidedJtaPlatform() {
return delegate;
}
}
@@ -0,0 +1,32 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2013, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.as.jpa.hibernate5;


import org.hibernate.boot.archive.scan.spi.AbstractScannerImpl;
import org.hibernate.boot.archive.scan.spi.Scanner;

/**
* Annotation scanner for Hibernate. Essentially just passes along the VFS-based ArchiveDescriptorFactory
*
* @author Steve Ebersole
*/
public class HibernateArchiveScanner extends AbstractScannerImpl implements Scanner {
public HibernateArchiveScanner() {
super( VirtualFileSystemArchiveDescriptorFactory.INSTANCE );
}
}

0 comments on commit 0f3691b

Please sign in to comment.