Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 5908 invoked from network); 17 Sep 2008 06:21:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Sep 2008 06:21:25 -0000 Received: (qmail 17275 invoked by uid 500); 17 Sep 2008 06:21:21 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 17248 invoked by uid 500); 17 Sep 2008 06:21:21 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 17237 invoked by uid 99); 17 Sep 2008 06:21:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Sep 2008 23:21: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: local policy) Received: from [98.136.44.55] (HELO smtp110.prem.mail.sp1.yahoo.com) (98.136.44.55) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 17 Sep 2008 06:20:22 +0000 Received: (qmail 83904 invoked from network); 17 Sep 2008 06:20:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=a8WIyNqVsCbqC0fMaFbcJeAczpS/xXf9HWj+9w/ypndVv6glYScZ+6tVsQKxOAYv/lEAax/qSxC6Q4aKvlwZKr7fgzHpP6jsz/PNArGkJ5VbUzxw46w609dPUJbikOp0G0F/26NXBUT2o1+/o40szXFpsmzXLPCN9IDuRn5NBZg= ; Received: from unknown (HELO ?10.11.55.45?) (david_jencks@63.105.20.225 with plain) by smtp110.prem.mail.sp1.yahoo.com with SMTP; 17 Sep 2008 06:20:53 -0000 X-YMail-OSG: A7XGv9AVM1kADcNNKofXT_uiyZZOxDc1eGkTxpIpJ5lCzhFGSXDGq1_1mpZVuhNkjJdcA0WtqlpKrVdK1E6tskdQVzXL0pC4jrXeGuT6f.ONKiQNG.n10F4GfhXP5W54aGMy9HqqN42RD_xBmBBraZeh X-Yahoo-Newman-Property: ymail-3 Message-Id: <8DA8B254-23FA-444A-B5CE-A188FD8DF046@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: <1221615383.unknowit@sohu.com> Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: Bepuzzlement Date: Tue, 16 Sep 2008 23:20:51 -0700 References: <1221615383.unknowit@sohu.com> X-Mailer: Apple Mail (2.926) X-Virus-Checked: Checked by ClamAV on apache.org This is a user list question. This problem is usually caused by not using an oracle specific tranql =20= wrapper but using the generic tranql wrapper and not setting the =20 commitBeforeAutocommit property to true. The oracle drivers are =20 generally not jdbc spec compliant and need this extra setting to work =20= properly. If you need more help please reply to the user list and include your =20 database connector deployment plan and tell us which tranql adapter =20 you are using. thanks david jencks On Sep 16, 2008, at 6:36 PM, unknowit@sohu.com wrote: > > > Pls read as below code, why database don=92t be updated when =20 > database be commit? > It is very amusing, why database be updated when I shut down =20 > Geronimo (Version2.1.1)? > It was said that database be updated synchronization when a =20 > transaction was commit ? > Is it possible that Geronimo need special setup? > > Remark: I use geronimo2.1.1, database is Oracle 9i > attached file can be deploy on geronimo 2.1.1 > > package zjEntity; > import javax.ejb.*; > import javax.annotation.Resource; > import javax.persistence.EntityManager; > import javax.persistence.PersistenceContext; > import javax.transaction.UserTransaction; > @Stateless > @TransactionManagement(javax.ejb.TransactionManagementType.BEAN) > public class zjempBean implements zjempLocal > { > @PersistenceContext private EntityManager em; > @Resource private javax.transaction.UserTransaction ut; > > public zjempBean() > { > } > > public boolean insertEmp(String empno,String empname) > { > try > { > ut.begin(); > zjemp zjemp1=3Dnew zjemp(); > zjemp1.setEmpno(empno); > zjemp1.setEmpname(empname); > > em.persist(zjemp1); > ut.commit(); /*after execute, no error =20= > message, but why not update to database?*/ > } > catch (Exception e) > { > e.printStackTrace(); > return false; > } > return true; > > } > } > > >