From: Jost B. <jos...@ya...> - 2005-08-27 10:17:28
|
Hi Jonathan, > php_mod_java(59): Synchronization problem, rinit > with active connection called. thank you very much for this problem report. Now suddenly PR1202896 ("session still open in rinit") makes sense. The basic problem is the same that Bryan has reported, please see: http://sourceforge.net/mailarchive/forum.php?thread_id=7884155&forum_id=42415) Kai has already explained what what __sleep() means and how to store java objects. During client/server communication both the client and the server build a dictionary of (handle . object) pairs. When you serialize/deserialize a handle without restoring its server-side meaning the server and client suddenly use different dictionaries and very strange things may happen; it is like switching the language in the middle of a conversiation. In a sentence like "hier is gift", the server should better know that "gift" means "poison", otherwise it will get into trouble when the client asks to handle() it. Please use $session=java_get_session(<name>) to store java values. Okay, now how to handle the problem? We could implement the __sleep() and __wakeup() methods and abort script execution if they are called. But I think it shouldn't be too diffcult to implement them correctly: All we need is to move the pair from the globalRef into the session ref when _sleep() is called. __wakeup() is a little bit more complicated because we restore an object which has the old (client-side view) of the object identity and we receive an object from the session ref which has the correct identity. We must "patch" the restored object to contain the correct id and then discard the received object. I have created a ticket for this: PR1274526. In the meantime please use java_get_session() to store your java values. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |