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
THISpage. 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:
/**
* ChangeBackEnd.java
*/
package tony.contact;
import flex.data.DataServiceTransaction;
public class ChangeBackEnd
{
public static void main(String[] args)
{
DataServiceTransaction dtx =
DataServiceTransaction.begin(false);
try
{
ContactVO ct = new ContactVO(1, "test", "serverAPI");
dtx.updateItem("tony.dms.contact", ct, null, null);
new ContactDAO().update(ct, ct);
}
finally
{
dtx.commit();
}
}
}
And when I try to run it I get this error.
"Exception in thread "main" java.lang.NoClassDefFoundError:
ChangeBackEnd (wrong
name: tony/contact/ChangeBackEnd)"
Is there any way around this?