Return-Path: Delivered-To: apmail-openejb-users-archive@www.apache.org Received: (qmail 39446 invoked from network); 4 Aug 2008 09:50:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 09:50:22 -0000 Received: (qmail 17323 invoked by uid 500); 4 Aug 2008 09:50:21 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 17301 invoked by uid 500); 4 Aug 2008 09:50:21 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 17290 invoked by uid 99); 4 Aug 2008 09:50:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 02:50:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mkwapisz@zsk.p.lodz.pl designates 212.51.220.3 as permitted sender) Received: from [212.51.220.3] (HELO zskl.zsk.p.lodz.pl) (212.51.220.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 09:49:25 +0000 Received: from localhost (zskl.zsk.p.lodz.pl [127.0.0.1]) by zskl.zsk.p.lodz.pl (Postfix) with ESMTP id D90812C0084 for ; Mon, 4 Aug 2008 11:49:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at zsk.p.lodz.pl Received: from zskl.zsk.p.lodz.pl ([127.0.0.1]) by localhost (zskl.zsk.p.lodz.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kl7kwxd9BAVG for ; Mon, 4 Aug 2008 11:49:16 +0200 (CEST) Received: from phoenix (unknown [172.16.0.22]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by zskl.zsk.p.lodz.pl (Postfix) with ESMTP id 6D70E2C0081 for ; Mon, 4 Aug 2008 11:49:16 +0200 (CEST) From: "Marcin Kwapisz" To: Subject: Propblem with OpenEJB + Toplink unit tests Date: Mon, 4 Aug 2008 11:49:23 +0200 Message-ID: <001c01c8f617$60505fe0$20f11fa0$@p.lodz.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acj2F2AXI/wvEdEtT3a7VfuABm93eQ== Content-Language: pl X-Virus-Checked: Checked by ClamAV on apache.org Hi, Configuration: OpenEJB 3.0, ToplinkEssentials 2.1, Maven2, JUnit 4, = Derby 10.2.2 I have modified that example -> = http://openejb.apache.org/3.0/testing-transactions-example.html to use Toplink as persistence provider. The problem is, that Toplink = does not persists entities at all. With OpenJPA or Hibernate all work = fine. As You may see below, sequences are updated properly. [TopLink Finest]: 2008.08.04 = 11:17:31.359--ServerSession(13948523)--Thread(Thread[main,5,main])--end = deploying Persistence Unit barPU; state Deployed; factoryCount 1 [TopLink Finer]: 2008.08.04 = 11:17:31.406--ServerSession(13948523)--Thread(Thread[main,5,main])--clien= t acquired [TopLink Finest]: 2008.08.04 = 11:17:31.406--UnitOfWork(19780920)--Thread(Thread[main,5,main])--Execute = query DoesExistQuery() [TopLink Finest]: 2008.08.04 = 11:17:31.406--UnitOfWork(19780920)--Thread(Thread[main,5,main])--PERSIST = operation called on: = pl.zsk.samples.ejbaccess.entities.Person[id=3Dnull;Marcin]. [TopLink Finest]: 2008.08.04 = 11:17:31.406--ClientSession(9876930)--Thread(Thread[main,5,main])--Execut= e query DataModifyQuery() [TopLink Finest]: 2008.08.04 = 11:17:31.406--ClientSession(9876930)--Thread(Thread[main,5,main])--reconn= ecting to external connection pool [TopLink Fine]: 2008.08.04 = 11:17:31.406--ClientSession(9876930)--Connection(7789321)--Thread(Thread[= main,5,main])--UPDATE SEQUENCE SET SEQ_COUNT =3D SEQ_COUNT + ? WHERE = SEQ_NAME =3D ? bind =3D> [50, PERSONENT] [TopLink Finest]: 2008.08.04 = 11:17:31.421--ClientSession(9876930)--Thread(Thread[main,5,main])--Execut= e query ValueReadQuery() [TopLink Fine]: 2008.08.04 = 11:17:31.421--ClientSession(9876930)--Connection(7789321)--Thread(Thread[= main,5,main])--SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME =3D ? bind =3D> [PERSONENT] [TopLink Finest]: 2008.08.04 = 11:17:31.421--ClientSession(9876930)--Connection(7789321)--Thread(Thread[= main,5,main])--local sequencing preallocation for PERSONENT: objects: 50 = , first: 1, last: 50 [TopLink Finest]: 2008.08.04 = 11:17:31.421--UnitOfWork(19780920)--Thread(Thread[main,5,main])--assign = sequence to the object (1 -> = pl.zsk.samples.ejbaccess.entities.Person[id=3Dnull;Marcin]) 2008-08-04 11:17:31 pl.zsk.samples.ejbservice.AccountEntBeanTest = testCreatePersonEnt INFO: Get Persons from Database. [TopLink Finest]: 2008.08.04 = 11:17:31.531--UnitOfWork(19780920)--Thread(Thread[main,5,main])--Execute = query ReportQuery(pl.zsk.samples.entities.PersonEnt) [TopLink Finest]: 2008.08.04 = 11:17:31.546--ServerSession(13948523)--Thread(Thread[main,5,main])--recon= necting to external connection pool [TopLink Fine]: 2008.08.04 = 11:17:31.546--ServerSession(13948523)--Connection(13305839)--Thread(Threa= d[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM PERSONENT [] 2008-08-04 11:17:31 pl.zsk.samples.ejbservice.AccountEntBeanTest = testCreatePersonEnt INFO: [] When I call flush just after persist I get the EJBException: javax.ejb.EJBException: The bean encountered a non-application = exception.; nested exception is:=20 javax.ejb.EJBTransactionRolledbackException: The transaction has = been marked rollback only because the bean encountered a non-application = exception :javax.persistence.TransactionRequiredException :=20 Exception Description: No transaction is currently active This is strange. Why transaction does not begin? Any suggestions how to = configure Toplink to make it work. Thanks in advance --=20 Marcin Kwapisz Division of Computer Networks Technical Univeristy of Lodz, Poland