Re: [json-lib-user] JsonConfig & Threads
Brought to you by:
aalmiray
From: Andres A. <aal...@ya...> - 2007-08-30 00:04:32
|
Hi Matt,=0ACurrently there is no workaround for it. I'm thinking that=0Athe= best choice is an hybrid approach:=0A1) JsonConfig will not be a singleton= =0A2) JSONSerializer and *.fromObject will accept a JsonConfig parameter=0A= =0AAt first JsonConfig was a ThreadLocal bound singleton but then=0AI chang= ed my mind, that's why it is a singleton now. This=0Aquestion has already a= ppeared at the forums and I think=0Ait is important to have it solved quick= ly. I'll have the fix by=0Athe next week and available in the snapshot repo= .=0A=0ACheers,=0AAndres=0A =0A-------------------------------------------= =0Ahttp://jroller.com/page/aalmiray=0Ahttp://www.linkedin.com/in/aalmiray= =0A--=0AWhat goes up, must come down. Ask any system administrator.=0AThere= are 10 types of people in the world: Those who understand binary, and thos= e who don't.=0ATo understand recursion, we must first understand recurs= ion.=0A=0A----- Mensaje original ----=0ADe: Matt Small <msmall@activegrid.c= om>=0APara: jso...@li....=0AEnviado: mi=E9rcoles, 29= de agosto, 2007 18:55:34=0AAsunto: [json-lib-user] JsonConfig & Threads=0A= =0AI'm taking a look at the new json-lib 2.0, it looks great!=0A=0AIt seems= as though a lot of the general configuration about =0Aserialization has be= en taken out in the JsonConfig object. This doesn't =0Aappear to be Thread= -safe; if you have two threads serializing different =0Aobjects (presumably= with different configurations), one will clobber the =0Aother's JsonConfig= .=0A=0AIs this correct? Any workarounds, or is there a different/better wa= y to =0Ado the serialization configuration (particularly excludes for me, r= ight =0Anow) in a Thread-safe manner?=0A=0AThanks,=0AMatt=0A=0A------------= -------------------------------------------------------------=0AThis SF.net= email is sponsored by: Splunk Inc.=0AStill grepping through log files to f= ind problems? Stop.=0ANow Search log events and configuration files using = AJAX and a browser.=0ADownload your FREE copy of Splunk now >> http://get.= splunk.com/=0A_______________________________________________=0Ajson-lib-us= er mailing list=0Aj...@li...=0Ahttps://lists.sourc= eforge.net/lists/listinfo/json-lib-user=0A=0A=0A=0A=0A=0A=0A=0A ______= ___________________________________________________________________________= ___=0A=A1S=E9 un mejor asador!=0AAprende todo sobre asados. = =0Ahttp://mx.yahoo.com/promos/mejorasador.html |