Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 1492 invoked from network); 2 Jun 2010 15:43:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jun 2010 15:43:55 -0000 Received: (qmail 54475 invoked by uid 500); 2 Jun 2010 15:43:55 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 54417 invoked by uid 500); 2 Jun 2010 15:43:54 -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 54409 invoked by uid 99); 2 Jun 2010 15:43:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jun 2010 15:43:54 +0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.18.2.159] (HELO exprod7og103.obsmtp.com) (64.18.2.159) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 02 Jun 2010 15:43:48 +0000 Received: from source ([209.85.160.181]) by exprod7ob103.postini.com ([64.18.6.12]) with SMTP ID DSNKTAZ8Hj7HoEx9Fp7osVkYySh6okXZxO23@postini.com; Wed, 02 Jun 2010 08:43:28 PDT Received: by mail-gy0-f181.google.com with SMTP id 8so4702962gyg.26 for ; Wed, 02 Jun 2010 08:43:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.35.149 with SMTP id p21mr3579775qad.374.1275493406238; Wed, 02 Jun 2010 08:43:26 -0700 (PDT) Received: by 10.229.37.10 with HTTP; Wed, 2 Jun 2010 08:43:26 -0700 (PDT) Date: Wed, 2 Jun 2010 11:43:26 -0400 Message-ID: Subject: Can entity manager join jdbc transaction? From: Daryl Stultz To: OpenJPA User List Content-Type: multipart/alternative; boundary=00c09fa21e20646a8604880df3de --00c09fa21e20646a8604880df3de Content-Type: text/plain; charset=ISO-8859-1 Hello, my project has a lot of work done direct to JDBC and some new work done through OpenJPA. I'm using 1.2.1 on Tomcat (non-container). I have a situation where a JDBC connection is obtained and a transaction is started. Then some OpenJPA querying is done. The Entity Manager obtains an independent connection which means it doesn't read the state with respect to the JDBC transaction. Is there any way to get an Entity Manager to join a JDBC transaction? My setup uses a DataSource to supply a connection to the Entity Manager. It seems I could modify this to return the JDBC connection, but I'm guessing the EM would close it before my JDBC operation is done. Thanks. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com http://www.opentempo.com mailto:daryl.stultz@opentempo.com --00c09fa21e20646a8604880df3de--