Hi guys,

I'll use your approach, thanks for your explanations :-)
About my current code, my method worked since about 6/8 months, from a SVN
version copy.
I don't understand why this worked, but i'm sure that have worked on a 6.0RC.

Thanks again :-)

2007/6/5, Joachim Bauch <[EMAIL PROTECTED]>:

Hi Guillaume,

Guillaume Lecanu schrieb:
> Is anybody can help me about this change between 6.0rc to 6.1 please ?
>
> 2007/5/30, Guillaume Lecanu <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]
>>:
> [ERROR] 15858 pool-3-thread-1:( RTMPHandler.onInvoke ) Error connecting
> java.lang.ClassCastException: java.util.LinkedHashMap
[...]
> Hashtable publishers  = new Hashtable();
> app.setAttribute("publishers", publishers);
> publishers = (Hashtable)app.getAttribute("publishers");

you should always use the generic classes like "Hash" or "List" when
getting attributes from a Red5 object. The attributes are serialized
similar to how AMF0 objects are handled, so for these types, the exact
class is lost.

Thus, a better approach would be:
----- snip -----
Hashtable publishers  = new Hashtable();
app.setAttribute("publishers", publishers);
Map publishers2 = app.getMapAttribute("publishers");
Map publishers3 = (Map) app.getAttribute("publishers");
----- snap -----

Hope that helps,
  Joachim

BTW: This has been since the first version of the persistence code, so
I can't imagine how the "Hashtable" code worked before... Maps were
always loaded as "HashMap" or "LinkedHashMap".

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to