Turned out that Its not the transaction, its OpenSessionInViewFilter's
flag for singleSession which caused my updates fail [For reasons not
known]. 
So, in a nut shell, If you have,
1. singleSession = true, DataServiceTransaction wouldnt send out the
updates
2. singleSession = false, DataServiceTransaction send out the updates
just fine. (problem with this approach is bulk operations will exhaust
resources as every request will fetch a new session object)

Will appreciate comments if any one has witnessed the same behavior.

-Shailesh

--- In [email protected], "Shailesh Mangal"
<[EMAIL PROTECTED]> wrote:
>
> In usecase-2, what should happen when method that begins
> dataServiceTransaction is already within a JTA transaction.
> 
> In our codebase, We have some remote services which send refreshes to
> the client using DataServiceTransaction. All these refreshes were
> working fine until we wrapped my services into Spring
> TransactionProxy. Any clue is highly appreciated. We tried it with
> both useJTA=true and useJTA=false
> 
> One other side query: 
>  If we have one-many relation(parent child) in assembler, which points
> to the same assembler. If a child change, do we need to send refresh
> on the child only or parent only or the recursively from top most
> parent to bottom most child. 
> 
> -Shailesh
> 
> --- In [email protected], "Jeff Vroom" <jvroom@> wrote:
> >
> > There are two use cases where we DMS will use the UserTransaction.   
> > 
> >  
> > 
> > 1)       When your assembler has "use-transactions=true", and you
commit
> > a change or batch of changes, the DMS code will start a transaction
> > before calling your createItem, updateItem, and deleteItem
methods.  If
> > any of those get an error, the transaction is rolled back and all
of the
> > changes are put back into the uncommitted list on the client.   If
they
> > all succeed the transaction is committed and the changes pushed to
other
> > interested clients.
> > 
> >  
> > 
> > 2)       If you use the DataServiceTransaction api to push changes
from
> > the server, when you call begin you can pass in a value of "true"
which
> > causes the DMS stuff to start a JTA transaction in that call.  
When you
> > call commit, the JTA transaction is committed if the setRollbackOnly
> > call was not made.   This is just a convenience if you happen to have
> > some JDBC code which is updating the database.  You want to both
commit
> > those changes and push the changes to other clients or rollback those
> > changes and cancel those changes.
> > 
> >  
> > 
> > For 1), when you are also using Hibernate, the hibernate assembler
will
> > register a hibernate current session context class.   The goal of this
> > class is to ensure that we create one hibernate session for each JTA
> > transaction we create for DMS and commit/roll them back in sync. 
Going
> > forward I'd like to offer another way to do this so that we can more
> > flexibly integrate with other ways of using hibernate sessions.  
> > 
> >  
> > 
> > Jeff
> > 
> >  
> > 
> > ________________________________
> > 
> > From: [email protected]
[mailto:[EMAIL PROTECTED] On
> > Behalf Of den.orlov
> > Sent: Wednesday, December 12, 2007 2:10 AM
> > To: [email protected]
> > Subject: [flexcoders] Flex Data Management and container's
> > UserTransaction
> > 
> >  
> > 
> > As I understand Flex Data Management Services require that application
> > container provide UserTransaction for it. But I can't find any guide
> > about how FDMS uses it.
> > 
> > I was completely confused when I checked several tutorials that used
> > FDMS+HibernateAssempler+Spring or FDMS+hand written
> > Assempler+Hibernate+Spring. 
> > 
> > That tutorial 
> > http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html
> >
<http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html>
> > 
> > specify that Hibernate's SessionFactory use datasource not tied to
> > global transaction manager.
> > 
> > This tutorials:
> >
http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring-
> > and-hibernate/
> >
<http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring
> > -and-hibernate/> 
> >
http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servic
> > e-application/
> >
<http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servi
> > ce-application/> 
> > don't specify that SessionFactory should use global transaction scope
> > for Session and use local transaction management.
> > 
> > So what's the purpose of FDMS to have reference to container's
> > UserTransaction?
> > 
> > Den
> >
>


Reply via email to