I am using BlazeDS for data-push feature in my Flex application project. From the official tutorial, Getting started with BlazeDS, it shows messaging example with producer/consumer from API.
but how can I implement server side which doesn’t need to be invoke from Flex client, but from within server-side instead. I got some idea but I don’t know how to do because I’m a Flex developer, not Java developer, so I think you can help me.
-
In Google, there’s a tutorial show about I need to extend
ServiceAdapterclass in Java-side, which extendsInvokemethod. Do I need to extend other class instead of this to do what I want? -
How to configure the
message-config.xmlto get the result like I describe above?
Here is test code I wrote and use, at times, to test sending data to our client. It’s a stripped down, bare bones Java example of a ServiceAdapter implementation. It removes a lot of unnecessary code from the existing examples on the web. It Compiles, works and I use it often in testing.
You need to set a few properties in tomcat to get this to work.
In
messaging-config.xml, you need to add an adapter and destination:Add this line to the existing
<adapters>tag:Add this destination to that same
messaging-config.xmlfile:Finally, make sure the “my-streaming-amf” channel is defined in
services-config.xml, as in:Note that in blazeDS, these two config files (messaging-config.xml and services-config.xml) are located in the following directory:
where
[nameOfYourApp]is the directory your webapp lives in.I hope all that helps!
-kg