Oracle-Connection-Pooling in Java

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Mon Jan 9 08:43:22 PST 2006


A quick look at maporaclespatial.c reveals the following global variables:

/* local status */
static int last_oci_call_ms_status = MS_FAILURE;
static text last_oci_call_ms_error[2048] = "";

therefore I think we can mark Oracle spatial support not thread safe.
Most importantly to use the OCI libraries in multithreaded
environments one *must* explicitly request the multi-threading
features by passing a special flag to the OCI init functions. For more
see:

http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10779/oci15re3.htm#556151
http://download-west.oracle.com/docs/cd/B12037_01/appdev.101/b10779/oci09adv.htm#469037

(requires registration)
or search google for OCIEnvCreate.

Best regards,
Umberto

On 1/9/06, umn-ms at hydrotec.de <umn-ms at hydrotec.de> wrote:
>
> Hi
>
> The hs_err*.log file show functions in the
> oracle-libs. (Unfortunately there is no stack-trace, so I cannot
> say, which function/line in maporacle.c produced this.)
>
> Example for a hs_err*.log:
> An unexpected exception has been detected in native code outside the VM.
> Unexpected Signal : 11 occurred at PC=0x9B0025D8
> Function=kpufhndl0+0x3E
> Library=/opt/oracle/OraHome1/lib/libclntsh.so.10.1
>
> Current Java thread:
>         at
> edu.umn.gis.mapscript.mapscriptJNI.mapObj_drawQuery(Native
> Method)
>         at
> edu.umn.gis.mapscript.mapObj.drawQuery(mapObj.java:402)
>         ....
>
> I spent some time to analyse the problem, but in the end I was not able to
> give a better
> report  than "It crashes". Therefore I didn't post a bug :-(
>
> Benedikt
>
>
> UMN MapServer Users List <MAPSERVER-USERS at LISTS.UMN.EDU> schrieb am
> 09.01.2006 16:04:58:
>
>
>  > On 1/9/06, Benedikt Rothe <umn-ms at hydrotec.de> wrote:
>  > >
>  > > Ciao Umberto
>  > >
>  > > This seemes to be an misunderstanding. Sorry for my poor english.
>  > >
>  > > Umberto Nicoletti <umberto.nicoletti at gmail.com> schrieb am 09.01.2006
>  > > 15:01:52:
>  > >
>  > >  > Hi Benedikt!
>  > > ...
>  > >  >
>  > >  > >
>  > >  > > - After using synchronized "enough" I didn't have crashes of
> Tomcat.
>  > >  > >
>  > > ...
>  > > > Do you still have them?
>  > >
>  >
>  > I meant the files.
>  >
>  > > I do not have crashes any more.
>  > >
>  > > - I used to have crashes in the past
>  > > - I added "synchronized"
>  > > - I added even more "synchronized"  :-)
>  > > - The crashes disappeard.
>  > >
>  > > I posted "Oracle-Connection-Pooling in Java" because
>  > > 1. It was new to me, that one can use Mapserver inside Tomcat with
>  > > Connection-Pooling
>  > >    without crashes. I wanted to report it, because I'm proud and happy.
>  >
>  > You are right to be proud and to be happy, but if we could find were
>  > the creashes occurred we cut incorporate the necessary changes in
>  > mapserver so that we all be happy (and your name will be remembered
>  > among the glorious Mapserver users and devs :-) ).
>  >
>  > Best regards,
>  > Umberto
>  >
>  > > 2. I still had these Memory-Leaks, which could solve to some degree.
>  > >
>  > > Benedikt
>



More information about the MapServer-users mailing list