Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DFF6B115AE for ; Thu, 31 Jul 2014 18:54:31 +0000 (UTC) Received: (qmail 39721 invoked by uid 500); 31 Jul 2014 18:54:31 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 39675 invoked by uid 500); 31 Jul 2014 18:54:31 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 39664 invoked by uid 99); 31 Jul 2014 18:54:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2014 18:54:31 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christoph.weiss@de.ibm.com designates 195.75.94.111 as permitted sender) Received: from [195.75.94.111] (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2014 18:54:25 +0000 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 31 Jul 2014 19:54:01 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 31 Jul 2014 19:53:58 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 869CC1B08023 for ; Thu, 31 Jul 2014 19:54:45 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s6VIrwcB34930898 for ; Thu, 31 Jul 2014 18:53:58 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s6VIrwS3019696 for ; Thu, 31 Jul 2014 12:53:58 -0600 Received: from d06mc035.portsmouth.uk.ibm.com (d06mc035.portsmouth.uk.ibm.com [9.149.76.97]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s6VIrwR2019693 for ; Thu, 31 Jul 2014 12:53:58 -0600 To: users@openjpa.apache.org MIME-Version: 1.0 Subject: Fw: How to Trace the used Transaction from the EntityManager X-KeepSent: 4743AE2B:E742283B-C1257D26:0067C1DF; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0 March 08, 2013 From: Christoph Weiss Message-ID: Date: Thu, 31 Jul 2014 20:53:57 +0200 X-MIMETrack: Serialize by Router on D06MC035/06/M/IBM(Release 8.5.3FP5IF1HF3|November 07, 2013) at 31/07/2014 20:53:57, Serialize complete at 31/07/2014 20:53:57 Content-Type: multipart/alternative; boundary="=_alternative 0067C613C1257D26_=" X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14073118-0342-0000-0000-0000009E0527 X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 0067C613C1257D26_= Content-Type: text/plain; charset="US-ASCII" Dear User Group, I am using OpenJPA in combination with WebSphere 8 within a customer project. In the project we are using multiple Stateless EJB and typically we are calling multiple EJBs for a piece of business logic. Each EJB is performing some JPA actions (database read / update). Now we want to make sure that a "piece of business logic" is running one transaction. For this we are using the @TransactionAttribute REQUIRED annotation. However taking a look at the EJBs (during the debugging) we see that each EJB seems to work with an own EntityManager (at least based on the object id). So we are not sure if the "business logic is really carried out at one piece". Thus following questions: 1.) Is there any way to trace / log the Transaction that is used by the EntityManager (at the end of the day) ? We activated the openjpa.jdbc,SQL Trace and see the following log statement: [29.07.14 10:17:34:692 CEST] 000000db jdbc_SQL 3 openjpa.jdbc.SQL: Trace: executing prepstmnt -341855657 Is "t 1902712361" the transaction used? (or is this just another identifier in the SQL context) 2.) Is there any trace providing further information? 3.) Is it the "expected behaviour" to have different EntityManager for each EJB (well they might be coordinated by the EJB container .... )? (EntityManager is created by injection, using @PersitenceContext Any feedback would be appreciated. Thanks in advance. Cheers Christoph Weiss --=_alternative 0067C613C1257D26_=--