- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Do you have any sample code that shows how to do this?
Simply calling dataServiceTransaction.refreshFill(...) doesn't seem to send any data to the client.
Since I am using Fiber, I ultimately need to be able to generically notify the client of updates to the database. Or at least trigger LCDS to check for updates against the database and send the appropriate updates to the client.
Here is the current code that doesn't seem to work:
public void triggerRefresh() {
DataDestination dt = DataDestination.getDataDestination("Test");
DataMessage fillMessage = InternalMessage.createMessage();
fillMessage.setOperation(DataMessage.UPDATE_OPERATION);
DataServiceTransaction tx = DataServiceTransaction.begin(false);
Map identity = new HashMap();
identity.put("id", 184); // ID of record that has changed in db.
ArrayList props = new ArrayList();
props.add("Item"); // Class name and table name of changed object.
PropertySpecifier ps = PropertySpecifier.getPropertySpecifier(dt, props, true);
Object retObj = dt.getItemFromAdapter(identity, ps);
fillMessage.setBody((Object)retObj);
Collection<Object> result = (Collection<Object>)dt.getAdapter().invoke(fillMessage);
System.out.println(result); // MOS added
tx.refreshFill("Test", null, null);
tx.commit();
}
Any suggestions?
Thanks,
Collin
Views
Replies
Total Likes