Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Pushing changes to clients from Java

Level 1
Level 1

I have created a Flex 2 client that polls a webservice every
minute or so which inturn returns data from a DB table (The table
contains data that changes every couple of minutes). This is of
course very DB intensive once you start having multiple clients all
polling at the same time.

I am now looking at doing it in FDS but my problem is how do
I get FDS to update the interal java objects with new data from the
DB (which is updated from an external source)? I read here :

that using the DataServiceTransaction might be an option.
Perhaps from a seperate java client that some how uses the
DataServiceTransaction class to update the data every 2 minutes of
so? That way pushing any changes that have occured to all the
currently connected Flex clients.

Or am I missing a setting in the FDS that you can set to
refresh the current java objects?

Any help would be greatly appreciated.

3 Replies
Level 3
Level 3
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
Level 1
Level 1
Hey Pete.

Any luck finding some example code for this?

Level 1
Level 1
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 object on
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 =



ContactVO ct = new ContactVO(1, "test", "serverAPI");

dtx.updateItem("", 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

name: tony/contact/ChangeBackEnd)"

Is there any way around this?