Dequeuer in direct mode leaves open cursors
Dequeuer in direct mode leaves open cursors
When using the Dequeuer in Direct Mode and no message is received, it leaves two open cursors on the server.
Using OCI mode the number of cursors do not increase.
Using OCI mode the number of cursors do not increase.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
I couldn't reproduce the problem with the latest 5.55.97 Beta build. Please try it:
http://www.devart.com/dotconnect/oracle/download.html
If you are still encountering the problem with the new version, please send us a small test project.
http://www.devart.com/dotconnect/oracle/download.html
If you are still encountering the problem with the new version, please send us a small test project.
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Please see the following sample. In our environment, it behaves as described in both Direct and OCI modes:
Please specify if you are encountering a different behaviour when running this sample, or what should be changed in the sample to reproduce the
error.
Also, please note that cursors are not closed after the connection is closed because the connection pooling feature is enabled. When I disable pooling, the cursors close on oracleConnection.Close().
Code: Select all
// Open the connection.
OracleConnection oracleConnection = new OracleConnection(
//"User Id=Scott;Password=tiger;Server=ora;Direct=False;");
"User Id=Scott;Password=tiger;Server=server;SID=ora;Port=1521;Direct=True;");
oracleConnection.Open();
// Initialize the Queue table and the queue.
OracleQueueTable oracleQueueTable = new OracleQueueTable
("QUEUE_TABLE_MESSAGE", oracleConnection);
oracleQueueTable.Options.PayloadTypeName = "RAW";
OracleQueueAdmin oracleQueueAdmin = new OracleQueueAdmin
("MESSAGE_QUEUE", "QUEUE_TABLE_MESSAGE", oracleConnection);
oracleQueueTable.CreateQueueTable();
oracleQueueAdmin.CreateQueue();
oracleQueueAdmin.StartQueue();
// Create a dequeuing object
OracleQueue oracleDequeueQueue = new OracleQueue("MESSAGE_QUEUE", oracleConnection);
oracleDequeueQueue.DequeueOptions.WaitTimeout = 1;
// Try to dequeue a message. As no messages were enqueued, a timeout exception will be thrown.
// At this moment, several cursors are opened.
try
{
OracleQueueMessage msg = oracleDequeueQueue.Dequeue();
}
catch (OracleException ex)
{
// Check that exception was thrown because of timeout.
if (ex.Code != 25228)
{
throw ex;
}
}
// The cursors are still opened.
oracleConnection.Close();
// The cursors are still opened. They close after the application is terminated.
error.
Also, please note that cursors are not closed after the connection is closed because the connection pooling feature is enabled. When I disable pooling, the cursors close on oracleConnection.Close().
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We have fixed the problem. The fix is available in the new 5.60.120 build of dotConnect for Oracle.
The build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to
http://www.devart.com/forums/viewtopic.php?t=17514 .
The build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to
http://www.devart.com/forums/viewtopic.php?t=17514 .