RE: Blocked remote calls with COM+ and MSDTC

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Piers Lawson (Piers_at_NOSPAM.com)
Date: 02/27/04


Date: Fri, 27 Feb 2004 05:41:06 -0800

As a follow up to this, we have found that the Remote Call is not a factor in the lock... well I mean the remote call is not actually a remote call! With the following code:

   SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
   BEGIN TRANSACTION
   SET REMOTE_PROC_TRANSACTIONS OFF

   EXEC RemoteDatabase.DBName.dbo.RemoteStoredProc @pReturn OUT

   ROLLBACK

The RemoteStoredProc is run in its own transaction which is not rolled back. However, with the following SQL:

   SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
   BEGIN DISTRIBUTED TRANSACTION -- Simulates COM+ better
   SET REMOTE_PROC_TRANSACTIONS OFF

   EXEC RemoteDatabase.DBName.dbo.RemoteStoredProc @pReturn OUT

   ROLLBACK

The RemoteStoredProc is enlisted in the distributed transaction regardless. So we may as well not have the remote call at all. Which means the problem is to do with the Client / COM+ / SQL Server interaction than the remote call.

Our problem appears to be that, with our long running transactions, the transaction that holds a lock on the Key table is occasionally being blocked from completeing its work. Whether this is because:

   a) COM+ is not allowing the client to call back and execute a commit
   b) The commit method is being executed in COM+ but it can't call into
       the database
   c) Something else completely

I have yet to establish!

Piers



Relevant Pages

  • Re: J2EE - entities - When do JPA entity units get saved into the database
    ... as JPA entities and EJB 2 Entity Beans have ... remote stub pointing to a server object. ... field changes back to the database if the changes occur within the ... same transaction that the entity was loaded in AND if the object has ...
    (comp.lang.java.programmer)
  • Re: Replication, GUIDs and PKs
    ... It does sound like you could get away without using GUIDS. ... I would probably use transactional replication for something like this. ... although it stores data for all remote locations is ... and web, works like a distributed transaction, but again the remote is the ...
    (microsoft.public.sqlserver.replication)
  • Re: J2EE - entities - When do JPA entity units get saved into the database
    ... as JPA entities and EJB 2 Entity Beans have ... serialized as-is and returned across remote calls. ... field changes back to the database if the changes occur within the ... same transaction that the entity was loaded in AND if the object has ...
    (comp.lang.java.programmer)
  • Re: 3-tier now and then
    ... application server and access remotely from .net client? ... Another issue is the transaction attribute can only be defined as class ... > I would not use remoting in this situation either. ... Now it might be that all you need is remote object ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DX Lock problem
    ... We are facing some problems w/ this type of lock. ... Sometimes a session ... during an distributed transaction would be greatly valuable for my ... This means that a query on a remote object is a transaction ...
    (comp.databases.oracle.server)