Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Threaded Pro*C in OAS 4.0.7

Re: Threaded Pro*C in OAS 4.0.7

From: ga <ga_at_alerts.co.il>
Date: Wed, 21 Apr 1999 05:15:10 -0700
Message-ID: <371DC14E.73E0A842@alerts.co.il>


I have tried this with oracle7 on solaris and it also was not thread safe. I wound up puting a lock aroud the access like this   

            pthread_mutex_lock (&xclmtx);
            EXEC SQL EXECUTE
              BEGIN
                corpsrvr_int.getcorp (:sym, :result);
              END;
            END-EXEC;
            pthread_mutex_unlock (&xclmtx);

I then changed my entire appl to OCI and that has no problems with threads.

Erik Domstad wrote:
>
> Hello,
>
> I am writing a C Web cartridge for OAS 4.0.7. For the
> database (Oracle 8.0.5) connections, I use Pro*C and
> a little OCI8 to fetch LOBs. The OS is Solaris 7 on a Sparc Ultra 5.
>
> When I run the application in the console, it seems to be
> thread safe. I can run 100 thread simultaneously calling
> the same functions as the cartridge (with the exception of
> calls to the WRB api that I made stubs for).
>
> When I run it in the OAS, it works fine single threaded but not
> multithreaded.
>
> I have taken the following actions;
>
> Pre-compiling with the option threads=yes
> Calling exec sql enable threads in the init cartridge callback
> Calling OCIInitialize() with OCI_THREADED in the init cartridge callback
> Declaring sqlca locally in each function
>
> What did I miss? Does anyone have any experience on the subject?
>
> Regards,
> Erik
Received on Wed Apr 21 1999 - 07:15:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US