Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Is it possible to use Remote SharedObjects with the LCDS server?

Avatar

Level 1

Hello,

The ActionScript documentation for Remote SharedObject

RSOs are created using the static getRemote function.  This returns a reference to an object that can be shared across multiple  clients by means of a server, such as Flash Media Server. If the shared  object does not already exist, this method creates one.

The following code shows how you assign the returned shared object reference to a variable:

var myRemote_so:SharedObject = SharedObject.getRemote(name, remotePath, persistence);After calling this method, use SharedObject.connect() to connect the  object to the application server, as shown in the following code

var myNC:NetConnection = new NetConnection();
myNC.connect(“rtmp://[yourDomain].com/applicationName”);
var myRemoteSO:SharedObject = SharedObject.getRemote(“mo”, myNC.uri, false);
myRemoteSO.connect(myNC);

To confirm that the local and remote copies of the shared object are synchronized, use the sync event.

All clients that want to share this object must pass the same values for the name and remotePath parameters.

Is it possible to create RSO's using the LCDS server instead of the Flash Media Server? If so, how?

Thanks,

Oscar

4 Replies

Avatar

Employee

No, LCDS does not support Remote Shared Objects.  However you can accomplish the same kind of functionalityt with the Messaging or Data Management features of LCDS.

Tom

Avatar

Level 1

Tom,

Thanks for your response. I decided to test this with the publish/subscribe messaging. Something I thought would work is not. Here is the simple example;

               
                var btn:Button = new Button();
                btn.label = "My Button ";
                msg = new AsyncMessage();

                msg.body = btn;
                producer.send(msg);              

Simple right? Well, this generates a fault;

1/21/2011 10:37:55.462 [ERROR] mx.messaging.Producer 'D7094E2F-2CA1-39C0-1EC6-A9DE3171E836' producer fault for 'A11AE369-8349-8970-0C10-A9DE5113DA2E'.


The LCDS log gets into more detail, AMF Deserialization ERROR....

Please notice the use of Amf0 and Amf3 methods... I thought Amf0 was a thing of the past...

Any ideas? Please help....

[LCDS]01/21/2011 10:37:55.039 [ERROR] [Endpoint.RTMP] Deserialization failed for incoming data: Unknown AMF type '15'.
flex.messaging.io.UnknownTypeException: Unknown AMF type '15'.
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:217)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:437)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
    at flex.messaging.messages.AbstractMessage.readExternalBody(AbstractMessage.java:654)
    at flex.messaging.messages.AbstractMessage.readExternal(AbstractMessage.java:324)
    at flex.messaging.messages.AsyncMessage.readExternal(AsyncMessage.java:98)
    at flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:491)
    at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:420)
    at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:152)
    at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
    at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:123)
    at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:94)
    at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:227)
    at flex.messaging.io.tcchunk.TCCommand.readMessage(TCCommand.java:191)
    at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1024)
    at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:610)
    at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:125)
    at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:864)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Thanks,

Oscar

Avatar

Employee

Do not put the Flex object "Button" in to the message body.  This isn't a serailizable object I would guess, as its a UI control.

How about this:

msg = new AsyncMessage();

msg.body = "The button was pushed";
producer.send(msg);

That should work.

If you want to transfer your own complex data type, simple create an AS class and be sure to include a "[RemoteObject]" above the class definition and send this message along with your data.

Tom

Avatar

Former Community Member

Hi Oscar,

I am having the same

[LCDS]01/21/2011 10:37:55.039 [ERROR] [Endpoint.RTMP] Deserialization failed for incoming data: Unknown AMF type '15'.
flex.messaging.io.UnknownTypeException: Unknown AMF type '15'.

issue.

Did you find any solution?

Jerome