Oracle-Connection-Pooling in Java
Umberto Nicoletti
umberto.nicoletti at GMAIL.COM
Mon Jan 9 23:57:15 PST 2006
Fernando,
I'm glad to hear directly from the oracle developer!
On 1/10/06, Fernando Simon <fsimon at univali.br> wrote:
> Hi folks,
> Sorry for the delay to reply your messages, I'm out from the lab
> since 20 of december and I go back only next monday.
> I already used the Mapserver + Oracle Spatial + Java in one
> project, about it was very unstable, many crashes (in many functions)
> but after some messages in the list I added the syncronized in my
> functions and the crashes down 80%, others 15% I solved after I
> compile my own Mapserver, just with my dependencies (only Oracle and
> Raster support). The 5% was wrong code, wrong server config....
> I never looked the logs to see where the Mapserver crashes, so I
> can't report the logs, sorry.
> About what Umberto spoke about the variables, this code was fixed
> in the bug #1469, that Silke reported:
> "http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1469". This fix
> will be in the next release, 4.8.
This is good news. I have opened a bug for a similar issue in for
postgis, hope the patch will be accepted
(http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1587).
> How was explained before I believe that the maporaclespatial.c
> can
> be improved, and the Pool directly in OCI calls will be better.
> Actually is core of Mapserver that control the connection pool, the
> same code
> for all connections.
And IMHO I think it should stay that way or we could end up having
pooling (in mapserver) of the pool (in the OCI) which is probably a
bad thing.
> I will improve the Oracle Connection with the OCI pool, but I
> don't know when will be finishewd, maybe one ow two months. :)
If I may I'd rather like to see completed the thread safe
initialization of the OCI than the OCI native pooling. But, again,
this is only my point of view and you are free to ignore it.
Best regards,
Umberto
> Best regrads.
>
> ------------------------------------------
> Fernando Simon
> Mapserver and Oracle Spatial developer
> UNIVALI - CTTMar - Brazil
> ------------------------------------------
>
>
> Citando Umberto Nicoletti <umberto.nicoletti at GMAIL.COM>:
>
> > 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
> > >
> >
>
>
>
>
> -------------------------------------------------
> Univali - Webmail - http://webmail.univali.br
>
More information about the MapServer-users
mailing list