Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Design question: OCI & batch processing & sessions & transaction
Hi everybody,
I have a question about what design more suitable for next task:
So, there is a library that receives requests and executes them on
Oracle database (it is written using OCI). Library is multithreading
(the same as application).
Now there is need to add next facility to the library: batch
processing.
Each batch would have id and part number. Each batch is a transaction
(not a batch part, but the whole batch)
So, the library should understand next (inside one thread):
ExecuteRequest(req_no_batch); // executed inside one transaction ExecuteRequest(req_batch1_p1); // transaction for batch1 part1 open ExecuteRequest(req_batch1_p2); ExecuteRequest(req_batch2_p1); // transaction for batch2 part1 open ExecuteRequest(req_batch2_p0); // transaction for batch2 committed ExecuteRequest(req_no_batch); // again, executed inside onetransaction
ExecuteRequest(req_batch1_p0); // transaction for batch1 committed
So, after I read documentation I found this way to solve it: to use
sessions.
My idea is to use one session for no batch processing requests (where
one request is a transaction), and a pool of sessions for each batch
request
(map by id or smth like that).
And to substitute during each active session id in service handle
(OCISvcCtx).
And here my question come:
Looking forward to your replies,
Alex
Received on Fri Aug 06 2004 - 10:28:29 CDT
![]() |
![]() |