Hi there,
We have a COM+ application, which is basically a wrapper for the TOracleQuery component, allowing us to execute dyanamic sql.
-> Transactional support is set to 'Supported'
-> Database behaviour / mts transactional behaviour is correct.
-> we are using MTS pooling, with moImplicit
However, when the COM+ application is shut down, we get an application error in dllhost.exe.
If we change the pooling to be spInternal, all is fine.
Here is a code snippet to reproduce the problem:
function TDynamicQuery.Execute(): integer;
var
lQuery : TOracleQuery;
begin
lQuery := TOracleQuery.Create(nil);
lQuery.Session := TOracleSession.Create(lQuery);
lQuery.Session.LogonUsername := 'username';
lQuery.Session.LogonPassword := 'password';
lQuery.Session.LogonDatabase := 'database';
lQuery.Session.Pooling := spMTS;
lQuery.Session.MTSOptions := [moImplicit];
lQuery.Session.LogOn;
lQuery.SQL.Text := 'select * from TableName';
lQuery.Execute;
SetComplete;
lQuery.Session.LogOff;
FreeAndNil(lQuery);
result := 0;
end;
If you put this into a COM+ (server) application, and call it from a client app, then it appears to run Ok, until you manually close the COM+ application from the Components Services Explorer.
This then (intermittently) gives a dllhost.exe application error.
if you then change the pooling method to be spInternal, it works fine,and does not ccause the crash in dllhost.exe
Other Info:
OS: Windows XP
DOA Version: 346
Delphi: 7
Oracle: 9i
Will upgrading to the new DOA 4 overcome this issue? Any help much appreciated.
Regards,
Rohan
We have a COM+ application, which is basically a wrapper for the TOracleQuery component, allowing us to execute dyanamic sql.
-> Transactional support is set to 'Supported'
-> Database behaviour / mts transactional behaviour is correct.
-> we are using MTS pooling, with moImplicit
However, when the COM+ application is shut down, we get an application error in dllhost.exe.
If we change the pooling to be spInternal, all is fine.
Here is a code snippet to reproduce the problem:
function TDynamicQuery.Execute(): integer;
var
lQuery : TOracleQuery;
begin
lQuery := TOracleQuery.Create(nil);
lQuery.Session := TOracleSession.Create(lQuery);
lQuery.Session.LogonUsername := 'username';
lQuery.Session.LogonPassword := 'password';
lQuery.Session.LogonDatabase := 'database';
lQuery.Session.Pooling := spMTS;
lQuery.Session.MTSOptions := [moImplicit];
lQuery.Session.LogOn;
lQuery.SQL.Text := 'select * from TableName';
lQuery.Execute;
SetComplete;
lQuery.Session.LogOff;
FreeAndNil(lQuery);
result := 0;
end;
If you put this into a COM+ (server) application, and call it from a client app, then it appears to run Ok, until you manually close the COM+ application from the Components Services Explorer.
This then (intermittently) gives a dllhost.exe application error.
if you then change the pooling method to be spInternal, it works fine,and does not ccause the crash in dllhost.exe
Other Info:
OS: Windows XP
DOA Version: 346
Delphi: 7
Oracle: 9i
Will upgrading to the new DOA 4 overcome this issue? Any help much appreciated.
Regards,
Rohan