[Red5] shared objects with flex

marius pena pitziilu at yahoo.com
Tue Dec 18 04:31:46 PST 2007


Hello everyone,

I got the chat application with red5 and flex from here : http://renaun.com/blog/2006/10/13/111/
and tried to upgrade it.

on the client side I invoke a method on the connection I have with the server : 
nc.call("test", new Responder(this.defaultResult, this.defaultStatus), "arg1", "arg2");

on the server side : 

public void test(String ... args) {

Boolean soCreated;
IConnection conn = Red5.getConnectionLocal();
IScope privateChatScope = conn.getScope();

try    {
    soCreated = createSharedObject(privateChatScope, sharedObjectName, true);
    }    catch (SharedObjectException e) {
        System.out.println("shared object create failed");
    }    catch (Exception e) {
        System.out.println("tralalala" + e);
    }
}

ISharedObject privateChatSO = getSharedObject(privateChatScope, sharedObjectName);
---------------------------------------------------------
The problems are:
1. The shared object called "sharedObjectName" does not seem to be created. soCreated is false, but a file on the "persistence" folder gets created.
2. The shared object : privateChatSO is null after I try to get it with "getSharedObject" method.

what is wrong with my code? 

thank you
marius

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20071218/055171cf/attachment.html 


More information about the Red5 mailing list