[Migrated content. Thread originally posted on 05 January 2012]
Is the CVM() singleton? As in, you can only have a single instance of this object? I've attempted to create multiple objects, but when I 'think' I have 2 instances of the object it appears to really only be a single object.I'm able to work around it by just accessing a single COBOL program at a time, but I'm curious if this is a limitation.
Also, I'm having a performance problem with using this on a server. On my development workstation, the response time is rather decent. When I deploy my solution to a test server, requests that were taking 10-14 seconds balloon up to several minutes. The requests complete if I turn off the timeout features, so I know I'm not having a security problem with file access. I also removed the network from the equation by moving the files all onto the same directory to be sure I wasn't seeing network lag as a problem.
I've tried to use the following to attempt to use the debugging features that are suppose to be built into the object, but I can't seem to find the right combination to get those features working. They are commented out now, but if someone knows where I'm going wrong there, perhaps I can move forward and figure out what is causing my issues on the server.
public errorTypes ErrCode;
private CVM COBOL = default(CVM);
try
{
if (COBOL == null)
{
COBOL = new CVM();
}
//COBOL.ListConfig = true;
//COBOL.ExtendedError = true;
//COBOL.ZipErrorFile = true;
//COBOL.ErrorsOut = "\\\\\\\\server\\\\wwwroot\\\\test\\\\error123.txt";
//COBOL.TerminalOut = "\\\\\\\\server\\\\wwwroot\\\\test\\\\error123.txt";
//COBOL.ErrorsOut = "";
//COBOL.Switches = "-lxe \\\\\\\\server\\\\wwwroot\\\\test\\\\tracefile2.txt";
//COBOL.Initialize();
//COBOL.
COBOL.Debug = false;
COBOL.ConfigFile = ConfigFile;
//COBOL.Debug = true;
//COBOL.ExtendedError = true;
COBOL.RunPath = RunPath;
COBOL.Cache = false;
//COBOL.Initialize("-lxe");
}
catch (Exception ex)
{
// Create a file that catches the exception
}
}Thanks, Martin
