ORA-03113: end-of-file on communication channel

fzapata

Member
I have a 3 tier application, on the server side I have a TDataModule where I placed the TOracleSession; on the TRemoteDataModule I have TOracleDataSets and TOracleQuery, when several users generates some transactions simultaneouly the TOracleSession disconects and generates an "ORA-03113: end-of-file on communication channel" error.

I intercepted this error because every execute command is in a Try...except clause.

------------------
Francisco Zapata C.
 
If this data module is accessed by multiple threads, then I assume that the components in the data module are accessed in a thread safe manner?

------------------
Marco Kalter
Allround Automations
 
I don't know what you mean for a "thread safe manner".

basically we migrated an application working with TDataBase and TQuery to TOracleSession and TOracleDataSet, working with the same database.

------------------
Francisco Zapata C.
 
I changed TOracleSession.ThreadSafe := true and seems to be working fine, but under certain circumstances, when the RemoteDataModule is not loaded and several users connect at the same time it hangs.

------------------
Francisco Zapata C.
 
Originally posted by fzapata:
I changed TOracleSession.ThreadSafe := true and seems to be working fine, but under certain circumstances, when the RemoteDataModule is not loaded and several users connect at the same time it hangs.


We are having the same problem using DOA 3.4x. DOA 3.3.x does not have the problem. We are on Oracle 8.1.5

Our server consists of a main remotedatamodule with a
TOracleSessionComponent. The server also has multiple child datamodules
with TOracleDataSets and TOracleQueries. When a child datamodule is
created, the main rdm session is assigned to the Session property of the
child datamodule's queries and datasets.

This is how we create a typical child datamodule com object:

function TAMSBusinessServer.Get_dmdBRANCHPartySvr: IdmdBRANCHPartySvr;
begin
if not Assigned( FdmdBRANCHPartySvr ) then
FdmdBRANCHPartySvr := TComponentFactory.Create(ComServer,
TdmdBRANCHPartySvr, Class_dmdBRANCHPartySvr, ciInternal,
tmApartment);
Result := FdmdBRANCHPartySvr.CreateComObject( nil ) as IdmdBRANCHPartySvr;
Result.MainRDM := Self;
end;

When the MainRDM property is set, a side effect is to set the session :

procedure TdmdBaseSession.SetSession;
var
ASession : TOracleSession;
i : Integer;
begin
ASession := nil;
if Assigned( FMainRDM ) then
ASession := TOracleSession( FMainRDM.OracleSession );

if ASession = nil then
raise Exception.Create( 'Session initialization failed' );

for i := 0 to ComponentCount - 1 do begin
if Components is TOracleDataSet then
TOracleDataSet( Components ).Session := ASession;
if Components is TOracleQuery then
TOracleQuery( Components ).Session := ASession;
end;
end;

procedure TdmdBaseSession.Set_MainRDM(const Value: IAMSBusinessServer);
begin
FMainRDM := Value;
SetSession;
end;
 
Back
Top