Hi Jeff,

I am not using the version or timestamp features of hibernate, however
I am using the cascade="all" feature to manage sets of child objects
off of the main managed object. In fact, it is this collection of
child objects that has changed (removed one, added one, etc.)

Should the "transitive persistence" work correctly using cascade="all"
? Could this be part of the cause of the conflict?

Also, setting <update-conflict-mode>NONE</update-conflict-mode> has
fixed the conflict issue, and with it the closed session exception.

If you were to send me those fixes, how difficult would it be for me
to encorporate them into my version of FDS? Do I need to build the
entire project? I have not done so before, but if needed, and I should
have all the source necessary, I'm comfortable attempting it.

thanks,
Thunder

--- In flexcoders@yahoogroups.com, "Jeff Vroom" <[EMAIL PROTECTED]> wrote:
>
> Are you using either the "version" or "timestamp" features of hibernate?
> This causes improper conflicts to be detected in the GMC version (though
> we have fixed this already in house).  To workaround that problem, you
> can turn off conflict detection:
> 
>  
> 
>                 <update-conflict-mode>NONE</update-conflict-mode>
> 
>  
> 
> in your destination's <server> tag.   If that is not a suitable
> workaround, let me know.   We distribute the HibernateAssembler source
> so I could send you a version with the fix in it.
> 
>  
> 
> I may also see the problem with the lazy initialization exception...
> there is code in the hibernate assembler which goes through and does a
> "deep fetch" of all properties which are not lazy="true" associations in
> FDS's configuration.  Hibernate by default has all of its properties
> marked with its own setting of lazy="true" which means that those
> properties are not fetched when the parent object is fetched.  Since we
> need to serialize the state of all non-lazy properties and do not want
> to keep the hibernate session open for this process, we do this deep
> fetch ahead of time to be sure the state will be available for sending
> to the client.  Unfortunately, when we are throwing a DataSyncException
> for the conflict we are not doing the fetch of the object properties for
> the "serverVersion" of the object which also gets sent back to the
> client.  If my theory is correct, this error will go away when the
> conflict goes away but of course it still needs to be fixed.   I just
> made this fix locally so I could send that along as well.  
> 
>  
> 
> Jeff
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Thunder Stumpges
> Sent: Wednesday, August 23, 2006 6:05 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] FDS + Hibernate exception committing updates
> 
>  
> 
> Hi all,
> 
> I have loaded a collection of managed objects, made some changes to
> one of them, and called the DataService.commit() to commit these
> changes back to the database.
> 
> My DataService is connected to a HibernateAssembler destination, and
> this destination worked to create the initial version of the objects,
> however when I attempt to update them, I get this exception. I can
> tell there was a data sync conflict (not sure why, I'm only using one
> client, one session, one update to the object). However what concerns
> me more is that it's attempting to do something afterwards, and I get
> this Hibernate exception about the session being closed. Any ideas?
> thanks in advance,
> Thunder
> ____________________-
> 
> [Flex] 17:17:47.860 [DEBUG] [DataService.General] DataSyncException
> processing message: Flex Message (flex.data.messages.DataMessage)
> operation = update
> id = ASObject(8582034){id=1156377452946003871262}
> clientId = BBE8D031-993E-E344-F36B-3D89CE3F5AE7
> correlationId = B51D63E2-AC1F-9B5F-4554-3D8A2A895B15
> destination = Dashboard
> messageId = 215422DE-07CE-6AB4-21AF-3D8A07CE87DF
> timestamp = 1156378667672
> timeToLive = 0
> body =
> [
> 
> [
> visualizations
> ],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> ]
> hdr(DSEndpoint) = my-rtmp
> exception: flex.data.DataSyncException: Data Synchronization Conflict
> conflictCause: Flex Message (flex.data.messages.DataMessage)
> operation = update
> id = ASObject(8582034){id=1156377452946003871262}
> clientId = BBE8D031-993E-E344-F36B-3D89CE3F5AE7
> correlationId = B51D63E2-AC1F-9B5F-4554-3D8A2A895B15
> destination = Dashboard
> messageId = 215422DE-07CE-6AB4-21AF-3D8A07CE87DF
> timestamp = 1156378667672
> timeToLive = 0
> body =
> [
> 
> [
> visualizations
> ],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> ]
> hdr(DSEndpoint) = my-rtmp
> serverObject: [EMAIL PROTECTED]
> propertyNames: [visualizations]
> at
> flex.data.assemblers.HibernateAssembler.updateItem(HibernateAssembler.ja
> va:713)
> at flex.data.adapters.JavaAdapter.doUpdateItem(JavaAdapter.java:504)
> at
> flex.data.adapters.JavaAdapter.invokeAssemblerSync(JavaAdapter.java:391)
> at
> flex.data.adapters.JavaAdapter.invokeBatchOperation(JavaAdapter.java:248
> )
> at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:232)
> at
> flex.messaging.services.MessageService.serviceMessage(MessageService.jav
> a:138)
> at flex.data.DataService.sendBatchToAdapter(DataService.java:1326)
> at flex.data.DataService.serviceTransactedMessage(DataService.java:505)
> at flex.data.DataService.serviceMessage(DataService.java:241)
> at
> flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:54
> 8)
> at
> flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoin
> t.java:302)
> at
> flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac
> tRTMPServer.java:682)
> at
> flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo
> nnection.java:665)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> .runTask(ThreadPoolExecutor.java:643)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> .run(ThreadPoolExecutor.java:668)
> at java.lang.Thread.run(Thread.java:595)
> 
> [Flex] 17:17:47.891 [DEBUG] [DataService.Transaction] Rolledback
> transaction
> Aug 23, 2006 5:17:47 PM org.hibernate.LazyInitializationException <init>
> SEVERE: failed to lazily initialize a collection of role:
> com.mycompany.config.presentation.Dashboard.dashboardcriterias, no
> session or session was closed
> org.hibernate.LazyInitializationException: failed to lazily initialize
> a collection of role:
> com.mycompany.config.presentation.Dashboard.dashboardcriterias, no
> session or session was closed
> at
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializ
> ationException(AbstractPersistentCollection.java:358)
> at
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializ
> ationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
> at
> org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractP
> ersistentCollection.java:97)
> at org.hibernate.collection.PersistentSet.size(PersistentSet.java:114)
> at java.util.ArrayList.<init>(ArrayList.java:133)
> at flex.messaging.io.ArrayCollection.<init>(ArrayCollection.java:44)
> at
> flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:40
> 7)
> at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:147)
> at
> flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215
> )
> at
> flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
> at
> flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
> at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
> at
> flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215
> )
> at
> flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
> at
> flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
> at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
> at
> flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:730)
> at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:386)
> at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:151)
> at
> flex.messaging.io.amf.Amf3Output.writeObjectProperty(Amf3Output.java:215
> )
> at
> flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:495)
> at
> flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:467)
> at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:165)
> at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:157)
> at
> flex.messaging.io.tcchunk.TCCommand.getCommandResponse(TCCommand.java:41
> 9)
> at
> flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac
> tRTMPServer.java:752)
> at
> flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo
> nnection.java:665)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> .runTask(ThreadPoolExecutor.java:643)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> .run(ThreadPoolExecutor.java:668)
> at java.lang.Thread.run(Thread.java:595)
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to