Re: Microsoft.Dynamics.GP.eConnect.eConnectMethods.InitializeResources() - TransactionStartedEventHandler
Unless someone says otherwise I'm calling this a bug in the Microsoft.Dynamics.GP.eConnect.dll. Just need to figure out where to report it so it can be validated and handled accordingly.
Assembly:
Microsoft.Dynamics.GP.eConnect.dll
Namespace:
Microsoft.Dynamics.GP.eConnect
eConnectMethods.InitializeResources()
- the cause:
private void IntializeResources()
{
this.RequireProxyService = Configuration.RequireProxyService;
TransactionManager.DistributedTransactionStarted
+= new TransactionStartedEventHandler(this.DistributedTransactionStarted);
}
eConnectMethods.Dispose() –
the root cause:
public void Dispose()
{
SqlConnection.ClearAllPools();
if ((ServiceProxy.ServiceProxyMethods != null) &&
(ServiceProxy.ServiceProxyMethods.State == CommunicationState.Opened))
{
ServiceProxy instance = ServiceProxy.GetInstance(true);
if (instance != null)
{
instance.Dispose();
}
}
ActivityTracing.Dispose();
}
eConnectMethods.Dispose() –
the fix:
public void Dispose()
{
SqlConnection.ClearAllPools();
if ((ServiceProxy.ServiceProxyMethods != null) &&
(ServiceProxy.ServiceProxyMethods.State == CommunicationState.Opened))
{
ServiceProxy instance = ServiceProxy.GetInstance(true);
if (instance != null)
{
instance.Dispose();
}
}
TransactionManager.DistributedTransactionStarted
-= this.DistributedTransactionStarted;
ActivityTracing.Dispose();
}