Here's the output from the moment that I create a new thread. I don't
see any update message for the destination CategoryDS.
------------------------------------------------------------------
[Flex] Ignoring set property uid for type
nl.hro.gmt.workshop.remote.Thread as a
setter could not be found.
[Flex] Deserializing AMF/RTMP request
Version: 3
(Command method=null (0) trxId=6.0)
null
(Typed Object #0 'flex.data.messages.DataMessage')
operation = 7
body = (Array #1)
[0] = (Typed Object #2 'flex.data.messages.DataMessage')
operation = 0
body = (Typed Object #3 'nl.hro.gmt.workshop.remote.Thread')
uid = "ED351114-8BE5-0C9A-E7BE-3505C9BC77C8"
body = "(body)"
threadID = 0
categoryID = 3
date = null
userName = "Flexcoders"
title = "Test thread"
identity = (Object #4)
threadID = 0
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
clientId = "43C6B38C-CDD7-238D-FB8A-35056FFD31DD"
destination = "ThreadDS"
messageId = "32DA9E95-6CFC-4E6B-46A4-3505C9CB608B"
headers = (Object #5)
timestamp = 0
timeToLive = 0
body = (Ref #3)
[1] = (Typed Object #6
'flex.data.messages.UpdateCollectionMessage')
replace = false
updateMode = 0
collectionId = (Array #7)
[0] = 3
operation = 17
body = (Array #8)
[0] = (Typed Object #9 'flex.data.UpdateCollectionRange')
updateType = 0
identities = (Array #10)
[0] = "32DA9E95-6CFC-4E6B-46A4-3505C9CB608B"
position = 2
identity = null
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
clientId = null
destination = "ThreadDS"
messageId = "391E1458-9346-C7EA-2155-3505C9CBCB7F"
headers = (Object #11)
timestamp = 0
timeToLive = 0
body = (Ref #8)
identity = null
correlationId = ""
clientId = null
destination = "ThreadDS"
messageId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
headers = (Object #12)
DSEndpoint = "my-rtmp"
timestamp = 0
timeToLive = 0
body = (Ref #1)
[Flex] Serializing AMF/RTMP push
Version: 3
(Command method=receive (0) trxId=null)
(Typed Object #0 'flex.data.messages.DataMessage')
destination = "ThreadDS"
identity = (Typed Object #1 'flex.data.ItemIdentity')
threadID = 48
headers = (Object #2)
DSEndpoint = "my-rtmp"
DSDstClientId = "43C6B38C-CDD7-238D-FB8A-35056FFD31DD"
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
messageId = "32DA9E95-6CFC-4E6B-46A4-3505C9CB608B"
timestamp = 1.169120676596E12
clientId = "43C6B38C-CDD7-238D-FB8A-35056FFD31DD"
timeToLive = 0.0
operation = 0
body = (Typed Object #3 'nl.hro.gmt.workshop.remote.Thread')
userName = "Flexcoders"
title = "Test thread"
threadID = 48
categoryID = 3
date = null
body = "(body)"
[Flex] Serializing AMF/RTMP push
Version: 3
(Command method=receive (0) trxId=null)
(Typed Object #0 'flex.data.messages.UpdateCollectionMessage')
destination = "ThreadDS"
headers = (Object #1)
DSEndpoint = "my-rtmp"
DSDstClientId = "43C6B38C-CDD7-238D-FB8A-35056FFD31DD"
identity = null
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
messageId = "391E1458-9346-C7EA-2155-3505C9CBCB7F"
timeToLive = 0.0
operation = 17
collectionId = (Array #2)
[0] = 3
clientId = "9173239A-A70F-6F8D-0334-4278B472AE00"
timestamp = 1.169120676596E12
replace = false
updateMode = 0
body = (Array #3)
[0] = (Typed Object #4 'flex.data.UpdateCollectionRange')
position = 2
identities = (Array #5)
[0] = (Typed Object #6 'flex.data.ItemIdentity')
threadID = 48
updateType = 0
[Flex] Serializing AMF/RTMP response
Version: 3
(Command method=_result (0) trxId=6)
(Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')
destination = null
headers = (Object #1)
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
messageId = "91732C19-F20E-074E-DB79-790C33305B2C"
timestamp = 1.169120677394E12
clientId = "9173239A-A70F-6F8D-0334-4278B472AE00"
timeToLive = 0.0
body = (Array #2)
[0] = (Typed Object #3 'flex.data.messages.DataMessage')
destination = "ThreadDS"
identity = (Typed Object #4 'flex.data.ItemIdentity')
threadID = 48
headers = (Object #5)
DSEndpoint = "my-rtmp"
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
messageId = "32DA9E95-6CFC-4E6B-46A4-3505C9CB608B"
timestamp = 1.169120676596E12
clientId = "43C6B38C-CDD7-238D-FB8A-35056FFD31DD"
timeToLive = 0.0
operation = 0
body = (Typed Object #6 'nl.hro.gmt.workshop.remote.Thread')
userName = "Flexcoders"
title = "Test thread"
threadID = 48
categoryID = 3
date = null
body = "(body)"
[1] = (Typed Object #7
'flex.data.messages.UpdateCollectionMessage')
destination = "ThreadDS"
headers = (Object #8)
DSEndpoint = "my-rtmp"
identity = null
correlationId = "1955AE57-A3C3-5CBE-B08B-3505C9CB337C"
messageId = "391E1458-9346-C7EA-2155-3505C9CBCB7F"
timeToLive = 0.0
operation = 17
collectionId = (Array #9)
[0] = 3
clientId = "9173239A-A70F-6F8D-0334-4278B472AE00"
timestamp = 1.169120676596E12
replace = false
updateMode = 0
body = (Array #10)
[0] = (Typed Object #11 'flex.data.UpdateCollectionRange')
position = 2
identities = (Array #12)
[0] = (Typed Object #13 'flex.data.ItemIdentity')
threadID = 48
updateType = 0
--- In [email protected], "Jeff Vroom" <[EMAIL PROTECTED]> wrote:
>
> As long as you add the refreshFill to the
> "DataServiceTransaction.getCurrentDataServiceTransaction" it will
be run
> after the transaction commits. One way to get more information
about
> what is happening is to turn on debug logging in
> WEB-INF/flex/services-config.xml (search for level=".." change that
to
> Debug and make sure that DataService.* and Message.* are listed in
> <pattern> tags just below). If the output is kind of large, feel
free
> to send the output to be directly ([EMAIL PROTECTED]) and hopefully I can
> figure out what is going on from that.
>
>
>
> Jeff
>
>
>
> ________________________________
>
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of spirit_ryder2k
> Sent: Tuesday, January 16, 2007 5:08 AM
> To: [email protected]
> Subject: [flexcoders] Re: Updating a DataService fill
>
>
>
> Hi Jeff,
>
> I tried your code but it didn't help. The Javadocs gives a little
> information about transactions in an assembler method except that
it
> auto commits after the method ends.
> Maybe the fill refreshes before the item created is commited so it
> refreshes with the same data?
>
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com>
> , "Jeff Vroom" <jvroom@> wrote:
> >
> > Try changing your code to:
> >
> >
> >
> > DataServiceTransaction dtx =
> > DataServiceTransaction.getCurrentDataServiceTransaction();
> >
> > dtx.refreshFill("CategoryDS", null);
> >
> >
> >
> > You also don't want the dtx.commit() in there. The basic problem
is
> > that when your createItem call is made, the current transaction
is
> still
> > open (i.e. not committed). In this case, you want to do the
> refreshFill
> > in the new (i.e. the current) transaction. If you create your own
> new
> > one, it will refresh the fill but before the current change has
been
> > committed to the database.
> >
> >
> >
> > Jeff
> >
> >
> >
> > ________________________________
> >
> > From: [email protected]
<mailto:flexcoders%40yahoogroups.com>
>
> [mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of spirit_ryder2k
> > Sent: Monday, January 15, 2007 5:21 AM
> > To: [email protected]
<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Updating a DataService fill
> >
> >
> >
> > Hi, I'm writing a small forum application which uses multiple
> > DataService destinations.
> >
> > In my CategoryDS destination I fill a datagrid with a list of
forum
> > categories and each category has a property which keeps track of
> the
> > number of threads in it.
> >
> > In my ThreadDS destination I retrieve a list of threads in a
> > category. This works fine. When I create a new thread I want the
> > CategoryDS to refill itself so the thread count is updated:
> >
> > // in my thread assembler
> > public void createItem(Object newVersion)
> > {
> > ...
> > DataServiceTransaction dtx = DataServiceTransaction.begin(false);
> > dtx.refreshFill("CategoryDS", null);
> > dtx.commit();
> > }
> >
> > Unfortunately this does not work :(
> > When I manually refresh the counter is updated. Am I missing
> > something in my code? I can post mxml source or config source if
> > needed.
> >
>