Groups > BEA > BEA AquaLogic > Re: DS sends updates to DB only in commit (can't find modified data in




Re: DS sends updates to DB only in commit (can't find
modified data in

Re: DS sends updates to DB only in commit (can't find modified data in
Fri, 11 Apr 2008 09:35:09 -070
Let me get your scenario straight

client starts a transaction
  client calls submit to update a data services
  client calls read to re-read the update value (does not see update)
client ends the transaction
If you read now, you will see the update

And you're wondering why the first  read doesn't seem the update values?

By default, ALDSP 2.5 reads are through an EJB that has
trans-attrib=NotSupported - which means if you do a read within a transaction,
that transaction is suspended the call is made without any transaction, then the
transaction is resumed. So this is one reason you don't see the read.  To do the
read via an EJB method with trans-attribute=Required.  See TRANSACTION SUPPORT
at
http://e-docs.bea.com/aldsp/docs25/javadoc/com/bea/dsp/dsmediator/client/DataSer
viceFactory.html

If you are using the control, the control will need to specify

@jc:LiquidData ReadTransactionAttribute="Required" 

That is only part of the solution.  You will also need to configure your
connection pool with the property KeepXAConnTillTxComplete="true" to
ensure that your read is on the same connection as your write.

<JDBCConnectionPool CapacityIncrement="2" 
...
       KeepXAConnTillTxComplete="true" />


Then I have to ask - if your client already has the modified DataObject in
memory, what's the purpose of re-reading it?  If all you need is a clean
ChangeSummary so you can do more changes (the ChangeSummary is not cleared when
you call submit), you can simply call myDataObject..getDataGraph().getCh
Post Reply
about | contact