Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

'Null' being added to ArrayCollection during add/update by Dataservice


Level 1


  • Tomcat 6.0
  • Livecycle 3.1
  • Flex SDK 3.5

We have a data service destination setup like this:

     <destination id="Trades" adapter="java">

                <identity property="uid" type="java.lang.String" />

                <throttle-inbound policy="IGNORE" max-frequency="500" />

We implement a custom assembler by extending the AbstractAssembler.

     The fill and refreshFill methods are implemented.

Updates are pushed to the client using a DataServiceTransaction:

     DataServiceTransaction transaction = DataServiceTransaction.getCurrentDataServiceTransaction();

     transaction.createItem(DESTINATION, trade);


After we create items and push them from the server, the refresh method on the Assmbler gets called. We return 'APPEND_TO_FILL'.

The item shows up in the client side managed ArrayCollection. This ArrayCollection is bound to a datagrid.

Problem description:

The above works fine when we run the server and the client locally on the same machine. When the application is hosted on a another part of the network - we see that for some of the updates - a null gets added to the ArrayCollection, instead of the object pushed from the server. We found this by attaching a CollectionChange event listener to the managed ArrayCollection. This causes blank rows to show up in the Blotter. In some cases we have also seen duplicate rows.

We see that the object is delivered to the client but not applied to the ArrayCollection properly. I attached a screen shot of the client side stack where we loose the update.

ScreenHunter_05 Sep. 13 17.39.gif

Calling the refresh() method on the ArrayCollection after the update, fixes the situation. The nulls disappear and the ArrayCollection now has the right data !

Things tried so far:

  1. Throttling the DataService update rate - down to 1 update/sec
  2. Enabling reliable delivery on the Dataservice destination
  3. Handling conflicts - none detected. Client never updated data.
  4. Setting DataService.resetCollectionOnFill property to true

Any pointers would be very helpful

2 Replies


Former Community Member


We think this could be a bug. PLease reach out to customer support, and we should be able to provide you with a hotfix.




Level 1


We traced this down to the fact that we have multiple threads reading off a JMS queue and pushing the add/update to the client via LCDS.

Each thread has its own instance of DataServiceTransaction - so this should be ok.

Following up with support.