Hi David, I am using daytrader direct mode and Synchronous order processing mode. >From reading the daytrader code and adding some trace, the connection is obtained from the pool and connection.commit() is used to commit a buy or sell order. My guess is that the delayed (20+ minutes) committing behavior can be related to something unique with the Oracle jdbc driver or the fact that connection is obtained from the pool.
Thoughts? Lin -----Original Message----- From: David Jencks [mailto:[EMAIL PROTECTED] Sent: Thursday, June 29, 2006 5:13 PM To: dev@geronimo.apache.org Subject: Re: daytrader with Tranql Oracle XA resource adapter 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