I am using MS4W (MapServer 4 Windows with Java Mapscript) - v 3.0.3 for a GIS web application hosted over Tomcat 6.0.33 with Java jdk1.6.0_13 and PostgreSQL 9.1 with PostGIS 1.5.2 @ the database end. The GIS application has polygon,line and point spatial layers.
The problem is that ms4w(MapServer) crashes the JVM & Tomcat very frequently for simple map functionalities such as pan, zoom-in and sometimes even at first time loading of the map. Attached is log file generated in E:\Program Files\apache-tomcat-6.0.33-for-ME\bin\ folder.hs_err_pid3848.log
Is the MapServer MS4W Java API thread safe? Will making the method declarations in
edu.umn.gis.mapscript.mapObj classes as
synchronized effect the API adversely?
I did try marking all the method declarations as
synchronized in the
edu.umn.gis.mapscript.mapObj class and few methods such as
edu.umn.gis.mapscript.mapscriptJNI class. This helped reduce the tomcat crashing issue.
Is there any particular way to create (thread-safe)
mapObj and using it? I have a common
mapObj with all its properties like
boundingBox coords shared by different mapping functionality methods such as zoom-in,zoom-out,pan,fullExtent,etc.
Can anybody suggest me about the best way (thread-safe) to create and use the mapObj in MapServer Java Mapscript API?