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):

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.




Reply via email to