Search Results

Sunday, July 6, 2008

Server Push (data push) in Flex using Blaze DS and Java.


HariKrishna said...

Hi Siva,
I tried your sample application which is there in Scribd and i am getting this error.

[BlazeDS][ERROR] Endpoint with id 'my-streaming-amf' cannot service the streamin
g request as either the supplied FlexClient id 'null is not valid, or the FlexCl
ient with that id is not valid.

Please let me know where things went wrong. I am new to BlazeDS.


shivaspk said...

Hi Hari,

Have you added the following in server-config.xml in your BlazeDS?

<channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel" >



HariKrishna said...

When i run the tomcat i am getting the following error

adapter not found for reference 'RandomDataPushAdapter' in destination 'RandomDataPush'.

When i am running the flex client i am getting the following error

Endpoint with id 'my-streaming-amf' cannot service the streaming
request as either the supplied FlexClient id 'null is not valid,
or the FlexClient with that id is not valid.

I didnt modify remoting-config.xml.

I modified only services-config.xml,messaging-config.xml as per the instructions in the pdf.


shivaspk said...

Please check if you have

<adapter ref="RandomDataPushAdapter"/>

under destination RandomDataPush.

Also make sure all the configurations are as I mentioned in the article, then restart the tomcat or Blaze DS Server and then try.

HariKrishna said...
This comment has been removed by the author.
HariKrishna said...

Hi Siva,
i need one more favour from you. I have Flex client which talks to BlzeDS and inside BlzeDS i have a few POJO classes which should call Java classes which are on server side. Please let me know is there any mechanism BlazeDS provides to make calls from POJOS in BlazeDS to Server side POJOS?

FLEX==>BlazeDS(POJO)==>Server side Java classes

I want to know is there any feature provided by BlazeDS itself to facilitate access to Server side java classes from BlazeDS pojos.


shivaspk said...

Hari that depends on whether the server side classes are in same scope as BlazeDS.

Also depends on what kind of communication you are expecting.

Also can you comment on how did you over come that Flex Client Id problem?

HariKrishna said...

The server side classes are similar to POJOs and we designed to maintani RMI for interacting with them.

For my fate Flex client id problem is still there as a show stopper.

Please let me know if there is a solution to this flex client id problem.

Please send me the MXML,, messaging-config.xml, services-config.xml
so that i can do a cross check how it works for you and y it screws me:) is my email id


HariKrishna said...

Hi Siva,
i am using Vista in my machine and i found from net that it doesnt work properly in Vista.

Can you please confirm whats wrong with Vista and how to overcome it?


clochette said...


I tried to use your application and I've some problem with this instruction (in the invoke function):
MessageService msgService = (MessageService) getDestination().getService();

It seems that it misses something. But I don't know what.
I've tried to write :
MessageService msgService = (MessageService) newMessage.getDestination().getService();
But it doesn't work.
Could you help me ?

chachalaca said...

The problem with XML files is that when you copy and paste (pdf to eclipse) brings rare character "Ê" and "?" that the eclipse is not displayed, but they are interpreted. The solution is to copy the pdf to eclipse, after copy the eclipse to the default text editor (textEdit-mac, "Bloc de notas" inSpanish xD - Windows) and replace "Ê" by " " and "? " by "-".

I have the same problem as clochette.

"The method getDestination() is undefined for the type RandomNumberGenerator"

Can you Help me bro? ^^

Ravi said...

Hi Siva,

Thanks to the article on PUSH. I want to implement Server-Push in my project. We use Flex for UI. On server side, we use Spring with Hibernate. We use LCDS on server. So Flex talks to Spring beans (DAO's) which in turn access the database using Hibernate.

One outside process updates the database directly. Now UI wants the latest data whenever the database is updated by outside process.

Could you tell me briefly how to implement this requirement. I can give you any other info if required.

shivaspk said...

Guys please find the working BlazeDS folder here: