Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 74074 invoked from network); 29 Jun 2006 21:11:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jun 2006 21:11:56 -0000 Received: (qmail 52754 invoked by uid 500); 29 Jun 2006 21:11:53 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 52708 invoked by uid 500); 29 Jun 2006 21:11:52 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 52697 invoked by uid 99); 29 Jun 2006 21:11:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jun 2006 14:11:52 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.206.237] (HELO smtp104.plus.mail.mud.yahoo.com) (68.142.206.237) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 29 Jun 2006 14:11:50 -0700 Received: (qmail 3056 invoked from network); 29 Jun 2006 21:11:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=psulkPG507hXFrknMZmqm/vfIBGRQWCrArvcMItwo+1TnHMItuX2WY/shxJWh8PCV0hhuULQ89yuldWwFdEo8doiJH/AVxVtV8PGiYus2OkupRIGiMtFsJOhnHdx77nbuMUM5Kny9M/ix0EWoMmglkskFhIWZbFHPlfEeRToSD8= ; Received: from unknown (HELO ?192.168.1.5?) (david?jencks@66.93.38.137 with plain) by smtp104.plus.mail.mud.yahoo.com with SMTP; 29 Jun 2006 21:11:29 -0000 Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <70C7F68E-522C-4089-B2EC-345894570AEF@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: daytrader with Tranql Oracle XA resource adapter Date: Thu, 29 Jun 2006 14:12:43 -0700 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.749.3) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Jun 29, 2006, at 1:42 PM, Lin Sun wrote: > Hi there, > > I have been playing with the daytrader with Tranql Oracle XA resource > adapter (tranql-connector-oracle-xa-1.1.rar). After I tweaked the > plan a bit and I am able to get daytrader running well with oracle! > > One thing I noticed is that if I perform any trading activities as a > user (say uid:1, account_id 50), I get the message that my order has > been completed almost immediately. However, the order isn't committed > into the oracle database until quite a while. I don't know the exact > timing but seems to be over 20-30 minutes. > > Here is what I did to check if the order is recorded in the database: > > Select * from orderejb where account_id=50; > > If the order is committed into the database, I would expect a row that > represents my previous order to be returned as the output of the sql > command. > > If I run the same scenario with db2 or derby, I can see my order > recorded in the orderejb table immediately. > > I looked at the tranql oracle vendor code but I didn't see anywhere > specifying the commit timing thing. The generic resource adapter does > offer an param called CommitBeforeAutCommit and by setting it to true > would force the commit to happen immediately. Can someone shed some > light on this? > Can you figure out what transaction demarcation is being used for this work? Is the connection supposed to be autocommit, is connection.commit() being used, or is there a JTA transaction? If it's autocommit, it might be worth investigating what connection.getAutocommit() says. thanks david jencks > Thanks, Lin