[Design of POJO Server] - VFS thread safety issues
by jason.greene@jboss.com
It is not very clear what the thread access semantics are supposed to be for the VFS. Can someone explain what the intended thread access patterns are supposed to be (i.e. which classes are supposed to be multi-thread accessable, and which ones are supposed to be allocated and used by a single thread)? Assuming the cases where there is some form of locking are correct, it is not consistently applied, or there are other races.
As an example AbstractVFSContext uses a synchronizedMap (previously a CHM) to store temporary information. However, all other fields on this class are mutable, yet not guarded or volatile (vfs, rootPeer, and options). Also, now that this class is using a synchronized map, the iterator usage by getTempInfos and cleanupTemp is not safe, since synchronized maps do not protect iterators. It looks like switching to a ConcurrentSkipListMap would solve this particular safety issue, and provide faster search performance (it's an O(log n) sorted map). It is JDK 6 but we can pull in the source to common-core (public domain). However CHM could be restored if putIfAbsent() was used.
A number of the classes which extend AbstractVFSContext have guard issues on their fields as well (FileSystemContext, TempContext, ZipEntryContext, AbstractVirtualFileHandler (and its subclases), etc).
There are also cases of non-volatile double checked-locking (VirtualFile, DefaultOptions, VFSCacheFactory)
Somewhat related but not a thread safety issue (yet), is the odd interaction between the VFS and the cache policy code in common-core. The default thread safety flag for IterableTimed is true, which is logged, however the policy is constructed with it being false. It turns out that the policy does synchronization on some methods regardless of the setting, and it looks like the VFSCache stuff uses locking in the calling methods, so it seems to work out ok.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226025#4226025
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226025
16 years, 11 months
[Design of JBoss jBPM] - Re: GWT Console login problem
by kukeltje
I was just going to provide some additional info, mainly regarding b), but to answer in order:
a) FF 3.0.8 with Firebug 1.3.3 (will try without firebug tonight)
b) Initially none, but patient as I am, I left it open and after 5 minutes of 100% cpu (one cpu lucky I have two :-) so I did not notice it) this error occured:
anonymous wrote :
| [ERROR] [ERROR] Failed to load remote data
| com.gwtext.client.data.StoreLoadException: [object Object]
| at com.gwtext.client.data.Store.createStoreLoadException(Store.java:907)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.lang.reflect.Method.invoke(Method.java:616)
| at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
| at com.google.gwt.dev.shell.moz.MethodDispatch.invoke(MethodDispatch.java:80)
| at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
| at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428)
| at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
| at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
| at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
| at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226016#4226016
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226016
16 years, 11 months
[Design of JBoss jBPM] - Re: schema for mail template and activity
by tom.baeyens@jboss.com
i've looked at the branch and it looks like i thought.
the library dependency is a showstopper for me. we need to depend only on JavaMail
the other two points (2 and 3) are basically taste and hence less important to me.
the configuration of the templates and the jpdl language are important. that needs to be discussed as we build out the examples.
in the test with the mail template configurations, all looks good except for the actors attribute. that should now be changed into attributes users or groups specifically.
i'm surprised to see so much code without a single end-to-end example that we can discuss in detail. we should go in smaller iterations and discuss sooner. otherwise the risk throwing away a lot of work in case the discussions lead to different outcome
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226014#4226014
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226014
16 years, 11 months