You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2005/04/18 19:18:04 UTC
[jira] Assigned: (IBATISNET-34) SqlMapSession's OpenConnection writes log message in "if" statement but not in "else if" statement
[ http://issues.apache.org/jira/browse/IBATISNET-34?page=all ]
Gilles Bayon reassigned IBATISNET-34:
-------------------------------------
Assign To: Gilles Bayon
> 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
> Assignee: Gilles Bayon
> Priority: Trivial
> Fix For: DataMapper 1.2
>
> 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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira