I'm having the same issues that Dimitrios had below(changes to
properties of items in managed collections not "showing up").

I was wondering if Jeff Vroom's advice is still the preferred method
for LCDS2.6.

<quote>
To update those properties, you need to call "dts.updateItem" for each
item where the properties have changed.
</quote>

--- In flexcoders@yahoogroups.com, "Dimitrios Gianninas"
<[EMAIL PROTECTED]> wrote:
>
> Ah, thank you very much for the enlightment Jeff, that explains things.
>  
> Perhaps in a future release there can be a method called
refreshFillFromDB() (or something like that) that will cause LCDS to
make the same call to retrieve the items from the DB - as the first
call to fill() - and push those changes out to affected clients only -
rather than rely on updateItem for each item. This will probably be
more performant in my case as in some cases only the properties of a
batch of items change.
>  
> Dimitrios Gianninas
> Developer
> Optimal Payments Inc.
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Jeff Vroom
> Sent: Monday, June 18, 2007 9:27 PM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] FDS (or LCDS) and refreshFill() from Java
> 
> 
> 
> That is the right code to refresh a fill from server side code that
is not part of your assembler methods.  It could be the case that for
some reason the fill parameters are not matching the fill parameters
used by your clients or that when FDMS calls the "fill" method on the
assembler, it sees the same item ids returned that are already on the
client.  Turning on the server debug logging for the pattern
"DataService.*" (in 2.0.1) and "Service.Data.*" (in 2.5) would provide
more diagnostics about what is happening.
> 
> One other problem with refreshFill is that if the properties of the
items have changed but the identities of the items in the filled
collection have not, the refreshFill won't pick it up.  RefreshFill is
just about refreshing the membership of the objects in the filled
collection - i.e. which items are in that list.  It is not about
updating the properties of the items in the filled collection.  To
update those properties, you need to call "dts.updateItem" for each
item where the properties have changed.  
> 
> If bandwidth/performance is not too much of a problem, you can
simply call updateItem for each item id in the list where you just
pass in null for the "previous item" and null for the list of
properties that have changed.  This is similar in performance to just
having the clients re-execute the fill since they will be pushed all
of the items in the collection and will update their local copies of
all of the items with these changes.
> 
> Part of the rationale for this behavior is that we don't want to
necessarily cache a copy of every managed item on the server.  That is
really the only way we can know whether an item has changed (by
comparing the old and new versions) and is somewhat expensive.  That
said, if you do have the cache-items setting turned on, we should be
able to do a better job of this even if it takes a few CPU cycles.  I
think we already have an enhancement filed for this feature but I'll
check and if not file one.
> 
> Jeff
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Dimitrios Gianninas
> Sent: Monday, June 18, 2007 6:04 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] FDS (or LCDS) and refreshFill() from Java
> 
> Hi,
> 
> Basically I have a requirement to refresh a list which all clients
pull in via FDS from the Java side. I thought the code below would
cause all clients to refresh but it doesn't. Any ideas of what is
missing or what is incorrect?
> 
> List x = new ArrayList();
> 
> x.add( new Integer(16) );
> 
> x.add( InboxConstants.INBOX_DISPLAY_ACTIVE );
> 
> DataServiceTransaction dts = DataServiceTransaction.begin( false );
> 
> dts.setSendMessagesToPeers( true ); // notify other nodes in a cluster
> 
> dts.refreshFill( "inboxDS", x );
> 
> dts.commit();
> 
> Dimitrios Gianninas
> 
> Developer
> 
> Optimal Payments Inc.
> 
> AVIS IMPORTANT
> 
> WARNING
> 
> Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé. L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation. Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système. La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.
> 
> This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient. No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message. If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system. The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful. If you have received this e-mail
in error, please notify the sender.
> 
>  
> 
> -- 
> WARNING
> -------
> This electronic message and its attachments may contain
confidential, proprietary or legally privileged information, which is
solely for the use of the intended recipient.  No privilege or other
rights are waived by any unintended transmission or unauthorized
retransmission of this message.  If you are not the intended recipient
of this message, or if you have received it in error, you should
immediately stop reading this message and delete it and all
attachments from your system.  The reading, distribution, copying or
other use of this message or its attachments by unintended recipients
is unauthorized and may be unlawful.  If you have received this e-mail
in error, please notify the sender.
> 
> AVIS IMPORTANT
> --------------
> Ce message électronique et ses pièces jointes peuvent contenir des
renseignements confidentiels, exclusifs ou légalement privilégiés
destinés au seul usage du destinataire visé.  L'expéditeur original ne
renonce à aucun privilège ou à aucun autre droit si le présent message
a été transmis involontairement ou s'il est retransmis sans son
autorisation.  Si vous n'êtes pas le destinataire visé du présent
message ou si vous l'avez reçu par erreur, veuillez cesser
immédiatement de le lire et le supprimer, ainsi que toutes ses pièces
jointes, de votre système.  La lecture, la distribution, la copie ou
tout autre usage du présent message ou de ses pièces jointes par des
personnes autres que le destinataire visé ne sont pas autorisés et
pourraient être illégaux.  Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.
>


Reply via email to