Threadsafety/Exceptions for Java Mapscript?
Sean Gillies
sgillies at FRII.COM
Mon Apr 18 09:34:46 PDT 2005
BTW,
Last week I surveyed of MapServer's thread safety issues and published
the results at
http://zcologia.com/news/24
There may be issues that I did not find, but these are the majors.
cheers,
Sean
On Apr 17, 2005, at 5:32 PM, Daniel Caldeweyher wrote:
> Sean, Umberto,
>
> thank you for your prompt replies and help.
>
> For the past couple of days I've been testing using synchronized
> blocks and
> methods:
>
> mapObj mapobj = null;
> synchronized(mapobj) {
> mapobj = new mapObj(path);
> }
> ......
> synchronized(map) {
> mapURL = mapbean.renderImage(map.draw(), "_mainmap");
> }
> ......
> public synchronized String renderImage(imageObj img, String suffix) {
> long rnd = Math.abs(new java.util.Random().nextLong());
> String imgfile = rnd + suffix + '.' + img.getFormat().getExtension();
> img.save(img.getImagepath() + imgfile, map);
> return img.getImageurl() + imgfile;
> }
>
> Using synchronized has certainly improved stability. However I haven't
> yet
> compiled Java Mascript using the latest CVS because I am developing on
> Windows XP and and there exists no java mapscript make file for Win32.
>
> Once we put the first version of my project up for public testing it
> will
> be on a Linux machine, I will then be able to test the latest CVS.
>
> Until then I will hope that a pre-compiled Java mapscript will be
> uploaded
> to http://hobu.stat.iastate.edu/mapserver/build_output;
>
> Thanks,
>
> Daniel
>
>
> On Mon, 11 Apr 2005 10:01:38 -0600, Sean Gillies <sgillies at FRII.COM>
> wrote:
>
>> On Apr 11, 2005, at 3:49 AM, Umberto Nicoletti wrote:
>>
>>> On Mon, 2005-04-11 at 03:33 -0500, Daniel Caldeweyher wrote:
>>>> Hi everyone,
>>>>
>>>> first of all I would like to thank all the developers for this great
>>>> piece
>>>> of software.
>>>>
>>>> I am working on a GIS project for my University using JavaMascript
>>>> on
>>>> Tomcat 5.5.7. My supervisor would to like to go online with my
>>>> solution in
>>>> a month or two for public testing. In the beginning 'public' means
>>>> open to
>>>> all University members, other Stakeholders and for presentations.
>>>> However
>>>> in the (near) future it is very likely that my project will be made
>>>> available to the general public, initially targetted at South East-
>>>> Queensland only, but the whole of the state and an Australian-wide
>>>> installation are likely to follow. That is why I gave scalablity and
>>>> maintainability a high priority and chose Java Servlet/JSP/struts as
>>>> the
>>>> development basis.
>>>>
>>>> When I started Umberto Nicoletti's website indicated that "A patch
>>>> that
>>>> enables exceptions in mapscript, so that mapscript errors don't
>>>> crash
>>>> your
>>>> JVM (and Tomcat) anymore." will come soon. Well its two-three months
>>>> later
>>>> now and I was wondering when it will be released? It is very
>>>> important to
>>>> me as I would not be very happy if i had to port my entire site to
>>>> php or
>>>> python.
>>>>
>>>
>>> The patch is in mainstream mapserver, I'll update my web site asap.
>>> There has been some discussion on thread safety lately so make sure
>>> you
>>> check out the archives: search the subject for 'Java MapScript issues
>>> Servlet'.
>>>
>>> You could find this link interesting (or search bugzilla for threads)
>>>
>>> http://mapserver.gis.umn.edu/bugs/buglist.cgi?
>>> bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=
>>> RE
>>> OPENED&field0-0-0=product&type0-0-0=substring&value0-0
>>> -0=thread&field0-0-1=component&type0-0-1=substring&value0-0
>>> -1=thread&field0-0-2=short_desc&type0-0-2=substring&value0-0
>>> -2=thread&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0
>>> -3=thread
>>>
>>> Regards,
>>> Umberto
>>>
>>
>> Daniel, Umberto,
>>
>> I just committed a change to CVS related to bug 1203
>>
>> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1203
>>
>> I'd appreciate it very much if you would read the discussion there,
>> and
>> if possible, update your CVS mapserver and help me test.
>>
>> cheers,
>> Sean
>>
>> --
>> Sean Gillies
>> sgillies at frii dot com
>> http://users.frii.com/sgillies
>
More information about the MapServer-users
mailing list