Our app mixes EJB 2.1 CMP and straight SQL over JDBC. Reason for using SQL is that some queries involve some complicated table joins.
Unfortunately the SQL queries sometimes do not see the most uptodate data. This happens when - within the same transaction - the data is first written using CMP, and then queried using SQL. BTW, this only happens when we use EJBs to update data, not when we create new EJB instances.
We are using commit option A. We have tried other commit options, did not make any difference. We are using JBoss 4.02 on Linux, Oracle 10.
Is there any way to force an EJB update to go to the DB even before the transaction is ultimately committed, such that SQL queries over straight JDBC can see the data?