SqlMapSession's OpenConnection writes log message in "if" statement but not in
"else if" statement
--------------------------------------------------------------------------------------------------
Key: IBATISNET-34
URL: http://issues.apache.org/jira/browse/IBATISNET-34
Project: iBatis for .NET
Type: Improvement
Versions: DataMapper 1.1
Environment: [assembly: AssemblyVersion("1.1.458")]
Reporter: Ron Grabowski
Priority: Trivial
The "else if" statement in the OpenConnection method:
else if (_connection.State != ConnectionState.Open)
{
try
{
_connection.Open();
}
catch(Exception ex)
{
throw new DataMapperException("Unable to open connection.", ex );
}
}
Should have a log message similiar to the "if" statement:
else if (_connection.State != ConnectionState.Open)
{
try
{
if (_logger.IsDebugEnabled)
{
_logger.Debug("Open Connection");
}
_connection.Open();
}
catch(Exception ex)
{
throw new DataMapperException("Unable to open connection.", ex );
}
}
Also, it seems that the "Open Connection" message is being logged differently
across classes that open a connection. Notice that in this issue:
http://issues.apache.org/jira/browse/IBATISNET-33
The log message is written outside of the try/catch block. I think log messages
should be written in a consistant manner across all classes that open
connections.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira