Not able to read committed data
Posted by: Rahul Phadnis
Date: October 06, 2009 06:33PM

We are using MySQL 5.0.51a-community version of MySQL with mysql-connector-java-5.0.4-bin driver.

We are using the Driver in JBoss 4.2.2 container. The jboss container has an xa mysql datasource configured.

The database has a mix of MyISAM and InnoDB tables.

I have two separate J2EE applications. App1 one inserts data into the database and App2 reads the data. The applications are running in separate Java VMs. The inserts are in two tables; one MyISAM and other is InnoDB.

App1 inserts data into the database. In some cases (not always) App2 can't read the inserted data (it doesn't find the inserted rows). App2 is invoked almost at the same instant after App1 is done. If a similar request is sent to App2 a few minutes later it can successfully read the data.

To ensure that App1 is committing the data before the request is sent to App2, I set a break point in App1 before it returns and after committing the transaction. When App1 stops at the break point I can read the inserted data using say mysql command line client.

I am stuck. I have read a lot of documentation but can't seem to figure out what may be the issue.

Any pointers ?

Rahul Phadnis

Options: ReplyQuote

Written By
Not able to read committed data
October 06, 2009 06:33PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.