[mapguide-internals] Strange multithreading issue / slow dbxml access

Andreas Morf a.morf at fkl.ch
Fri May 20 05:44:12 EDT 2011

Hi all,

While customizing my runtime map within java-webtier I am using following
code seqence: 
resourceService.SetResource(newLayerResId, layerDefContent, null);
layer.SetLayerDefinition(newLayerResId, resourceService);

Using this code in a sequential manner there is no problem but it is quite
slow because the map building process allways has to wait for SetResource
(see below).
Trying to parallelize and outsourcing execution of the code sequence to
different threads (ThreadPoolExecutor) leads to following problem:

resourceService.SetResource(newLayerResId, layerDefContent, null); -->
execution ok in different threads
layer.SetLayerDefinition(newLayerResId, resourceService); --> allways throws

I was able to debug in Layerbase.cpp until the last line of
which always throwed that Exception but i was not able to determine why...

..and again, with parallel resourceService.SetResource there are these

> (8096) An exception occurred in DB XML component.
> Please try your operation later as the repository was busy.

coming up again..

Besides, storing about 40 layer-xml to dbxml always takes around 3 seconds -
my opinion: this is really slow  (on a quite fast XEON machine)
Any hints for optimisation places?

So I'm stuck with tuning mgserver on a multi-processor machine again.


More information about the mapguide-internals mailing list