Session Pooling OCI_ATTR_SPOOL_GETMODE set to NOWAIT hangs on OCISessionGet
518089Jun 13 2006 — edited Jun 15 2006Hi,
I am running Oracle 10g (Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP and Data Mining options) and I need to setup session pooling. I this working but need to set the OCI_ATTR_SPOOL_GETMODE attribute to OCI_SPOOL_ATTRVAL_NOWAIT. I have attempted to do that with the following:
int spoolMode =OCI_SPOOL_ATTRVAL_NOWAIT;
printf("Input Session Pool Mode = %d -- sizoe of spoolMode = %d\n",spoolMode, sizeof(spoolMode));
checkerr(errhp, OCIAttrSet((dvoid *) poolhp,
(ub4) OCI_HTYPE_SPOOL, &spoolMode, sizeof(spoolMode),
OCI_ATTR_SPOOL_GETMODE, errhp));
However, when I attempt to see the value of this attribute using the code below it comes back to me as a 0 (OCI_SPOOL_ATTRVAL_WAIT).
ub4 getMode = 0;
OCIAttrGet((CONST dvoid *)poolhp ,OCI_HTYPE_SPOOL,
&getMode,(ub4*)sizeof(getMode),
OCI_ATTR_SPOOL_GETMODE,errhp);
printf("Get Mode = %d\n", getMode);
Actually it doesn't even seem to be setting getMode on the OCIAttrGet call to anything because if I set it to any number, then do the get, I see the number I had set it to.
And when I exceed the number of sessions I have setup the session pool up for, the OCISessionGet call hangs.
If anyone can shed any light on what this problem might be I would appreciate it. I noticed a similar problem that was supposed to be fixed on 9.2.0.5.
Thanks - Anette