Anderson Apdo de Souza
Member
I have a .NET communication with Progress that is done through a broker, agents that connect to the database, and I'm having problems because some agents are getting their connection stuck, and this is overloading the system, leaving it slow.
Is there any way to track these where these agents are getting stuck in order to solve this problem?
Sample method :
Is there any way to track these where these agents are getting stuck in order to solve this problem?
Sample method :
C#:
public List<Pedido> ObterCotacoesAprovadasPorCompradorEstabelecimento(Comprador pComprador, RH.Model.Estabelecimento pEstabelecimento)
{
ns_scw.StrongTypesNS.dsProcessosAprovadosDataSet myDs = new ns_scw.StrongTypesNS.dsProcessosAprovadosDataSet();
scw appObj = new scw(new InfraProgress("SCW").BuscaBroker(), "", "", "");
appObj.scw_listar_cotacoes_aprovadas_MVC(pComprador.Id, pEstabelecimento.Id, out myDs);
List<Pedido> myLista = null;
if (myDs.Tables[0].Rows.Count > 0)
{
myLista = new List<Pedido>();
foreach (System.Data.DataRow myLinha in myDs.Tables[0].Rows)
{
Pedido myPedido = new Pedido()
{
Processo = new ProcessoRepository().ObterProcessoPorId(new Processo() { Id = int.Parse(myLinha["iProcesso"].ToString()) }),
Fornecedor = new FornecedorRepository().ObterFornecedorPorID(new Fornecedor() { Id = int.Parse(myLinha["iFornecedor"].ToString()) }),
Contato = myLinha["cContato"].ToString()
};
myPedido.Fornecedor.Cidade = myLinha["cCidade"].ToString();
Estado myEstado = new Estado() { Sigla = myLinha["cEstado"].ToString() };
myPedido.Fornecedor.Estado = myEstado;
myLista.Add(myPedido);
}
}
appObj.Dispose();
return myLista;
}