Hi There,

I am new to jboss cache and would like some help with threading issues. I want 
to use jboss cache to drive a gui for displaying real-time data. Is there any 
way to force all replicated updates coming to the cache to be on a thread or 
executor of my choice (ie the swing event dispatch thread). It seems to me that 
if the updates happen on one thread and and the data is read on another thread 
then the result will be indeterminate. 

As an example imagine a table model connected to an arraylist maintained by 
jbosscache. In the edt(event dispatch thread) the row count is determined from 
the model(1), then the values are accessed for each element using the index of 
the row to access the list(2). If a delete happens on another thread removing 
the last n rows between (1) and (2) then a null pointer will occur. To remove 
this problem one could force all access to the cache on a single thread.

Can i force access to the cache to be single threaded? or have I missed 
something that will prevent this from being an issue.

One other question - how does jbosscache scale - can I connect 100's or 1000's 
of caches - where 95% are read only and only 5% write data infrequently.

cheers,

Greg

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919472#3919472

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919472


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to