From commits-return-46429-archive-asf-public=cust-asf.ponee.io@tomee.apache.org Sat Jan 26 01:55:09 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 29E4C180771 for ; Sat, 26 Jan 2019 01:55:09 +0100 (CET) Received: (qmail 17319 invoked by uid 500); 26 Jan 2019 00:55:08 -0000 Mailing-List: contact commits-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tomee.apache.org Delivered-To: mailing list commits@tomee.apache.org Received: (qmail 17302 invoked by uid 500); 26 Jan 2019 00:55:08 -0000 Delivered-To: apmail-openejb-commits@openejb.apache.org Received: (qmail 17299 invoked by uid 99); 26 Jan 2019 00:55:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Jan 2019 00:55:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BAA4CC13B3 for ; Sat, 26 Jan 2019 00:55:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id p90RJVVTQheF for ; Sat, 26 Jan 2019 00:55:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 238896100F for ; Sat, 26 Jan 2019 00:55:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C7B60E26A8 for ; Sat, 26 Jan 2019 00:55:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7C5A2243AB for ; Sat, 26 Jan 2019 00:55:02 +0000 (UTC) Date: Sat, 26 Jan 2019 00:55:02 +0000 (UTC) From: "Roberto Cortez (JIRA)" To: commits@openejb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (TOMEE-2295) Persistence Unit mapping-file ignored by CmpJpaConversion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TOMEE-2295?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Roberto Cortez updated TOMEE-2295: ---------------------------------- Fix Version/s: (was: 8.0.0-M2) 8.0.0-M3 > Persistence Unit mapping-file ignored by CmpJpaConversion > --------------------------------------------------------- > > Key: TOMEE-2295 > URL: https://issues.apache.org/jira/browse/TOMEE-2295 > Project: TomEE > Issue Type: Bug > Affects Versions: 1.7.5, 7.0.5, 7.1.0, 8.0.0-M1 > Reporter: Jonathan Gallimore > Assignee: Jonathan Gallimore > Priority: Major > Labels: pull-request-available > Fix For: 1.7.6, 7.0.6, 7.1.1, 8.0.0-M3 > > > The CmpJpaConversion code enables TomEE to run CMP entity beans by conver= ting them to JPA "on the fly". It does this by using a persistence unit it = creates on the app module named "cmp", and generating an orm.xml file for t= he persistence component to use. > =C2=A0 > However, if you create a persistence.xml file and a custom orm.xml file (= using the `openejb.descriptors.output=3Dtrue` system property, for example)= and reference the=C2=A0custom orm.xml in persistence.xml, it is ignored. > =C2=A0 > One possible workaround is to remove the mapping file reference from pers= istence.xml and package it in the artifact as META-INF/openejb-cmp-orm.xml = (or WEB-INF/openejb-cmp-orm.xml for .war files): [https://github.com/apache= /tomee/blob/0165264d37f9cb6ce6d2585f2f6b0fbd926ad5c4/container/openejb-core= /src/main/java/org/apache/openejb/config/ReadDescriptors.java#L553]=C2=A0an= d [https://github.com/apache/tomee/blob/0165264d37f9cb6ce6d2585f2f6b0fbd926= ad5c4/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/s= rc/test/java/org/apache/openejb/arquillian/tests/cmp/CmpMappingTest.java#L4= 5] > =C2=A0 > However, it should be possible to also check for the presence of an exist= ing mapping file on the cmp persistence unit, and use that as opposed to ge= nerating a new one. -- This message was sent by Atlassian JIRA (v7.6.3#76005)