I apologize for the slow response, but I wanted to say Thanks. The flex.data.DataServiceTransactionis just what I needed. Now, to transparently monitor the changes made during a service call...
Thanks again, Luke Pillow http://deepthoughts.orsomethinglikethat.com --- In [email protected], "Jeff Vroom" <[EMAIL PROTECTED]> wrote: > > Hi Luke, > > > > Take a look at the javadoc for the class: > flex.data.DataServiceTransaction. This is an api you can use to tell > FDMS about changes made to objects that did not originate from flex > clients using the AS DataService object to initiate these changes. It > assumes those changes have already been applied to the database - it > only manages updating the clients with those changes. This is used by > the flexcab sample and to some extent by the "crm" sample. So probably > after your remote object calls which update the database, you need to > add a few lines of code to use this api to let clients know about those > changes. > > > > Jeff > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Luke Pillow > Sent: Monday, January 22, 2007 2:20 PM > To: [email protected] > Subject: [flexcoders] Flex Data Management, Remoting, and Enterprise > Integration > > > > My question/problem involves the use of Data Management Services in > conjunction with Flex Remoting and/or other enterprise java "services" > > The following scenario is based on "Mind The Gap: My First Hibernate > Enabled Flex Application" > (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> > ): > > Given: > - A Hibernate persistent data managed Employee object (Employee.java, > and Employee.as) with properties; id, firstname, and lastname. > - An EmployeeService (.java) object that is being accessed via a Flex > RemoteObject or other Java code. > > I am having no problems updating an Employee's properties via a Flex > UI app and seeing those changes being "pushed" to all other flex > clients that are viewing that Employee - Basic FDMS right? > > The problem I am having (and maybe it's by design), is when I invoke a > remote method on EmployeeService that takes an Employee (FDMS managed) > as a parameter and changes the name and saves the changes to the > database via Hibernate. That name change (or any persisted value > change) is not being "pushed" to any Flex clients - including the one > that invoked the service - and is only visible upon forcing a data > refresh from the Flex client. > > How can I force database changes being made through non-flex clients > to be "pushed" to the flex clients via FDMS? Is there a way to notify > FMDS that object/row with id=# was updated and the updates should be > "pushed" to the clients? > > I would think that this would be a common problem since you wouldn't > want to put your business logic in the client action script and > instead move that logic to a back end/middle tier that would surely > alter the object state while processing business logic. > > I've been looking at the HibernateAssember, HibernateManager, and > HibernateType classes in hopes to gain some insight, but all that I > found is that maybe any of the data changes made to an object needs to > be done through a hibernate session that was created from the same > "syncSessionFactory" that is built in HibernateManager using a > modified Hibernate configuration that has the following property > "hibernate.current_session_context_class" property set to > "flex.data.adapters.FlexHibernateSessionContext" > > I would love for someone to tell me that I'm over complicating things > and I should use <fill_in_the_blank> simple solution. > > Thanks in advance, > Luke Pillow. >

