This content has been marked as final. Show 3 replies
The DataServiceTransaction API is the way to go. Let me ask if there is a sample of this API handy and I'll get back to you.
Any luck finding some example code for this?
Hi, I also have a similar problem with using the DataServiceTransaction object from an external java program.
I'm using flex and FDS to RTMP push data from a DB server to clients and I want to trigger data pushing whenever the DB gets updated by an external java/jdbc program.
The problem is, I can update the DB and call the commit() function of the DataServiceTransaction object from a RemoteObject/rpc called by the flex client very much like the ContactVO.java object on THIS page. But I want to develop an external java program that gets executed separately (Not via RPC) and it will be able to update the DB and call the DataServiceTransaction.commit() method to push the updates to the flex clients.
I built a java class to do just that as you can see below:
public class ChangeBackEnd
public static void main(String args)
DataServiceTransaction dtx = DataServiceTransaction.begin(false);
ContactVO ct = new ContactVO(1, "test", "serverAPI");
dtx.updateItem("tony.dms.contact", ct, null, null);
new ContactDAO().update(ct, ct);
And when I try to run it I get this error.
"Exception in thread "main" java.lang.NoClassDefFoundError: ChangeBackEnd (wrong
Is there any way around this?