You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Dan Goetz (JIRA)" <ib...@incubator.apache.org> on 2007/09/06 19:42:33 UTC

[jira] Created: (IBATISNET-237) Log in a nd log out ever time the database is accessed

Log in a nd log out ever time the database is accessed
------------------------------------------------------

                 Key: IBATISNET-237
                 URL: https://issues.apache.org/jira/browse/IBATISNET-237
             Project: iBatis for .NET
          Issue Type: Improvement
          Components: DataMapper
    Affects Versions: DataMapper 1.6.1
         Environment: Windows XP professional, Microsoft Visual C# 2005
            Reporter: Dan Goetz


When accessing the database, with SQL Server profile, I noticed the mapper logs in and out  for every database access. This seems to be an issue with the performance. I tried to open the connection after creating the mapper but I ran into several problems. It would improve the performance of our application if the mapper could log in once instead of continually logging in and out. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (IBATISNET-237) Log in a nd log out ever time the database is accessed

Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/IBATISNET-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Bayon closed IBATISNET-237.
----------------------------------

    Resolution: Invalid

use block to delimiter your connection/transaction block such as

using ( IDalSession session = daoManager.OpenConnection() )
{
   Account account = NewAccount();
   accountDao.Create(account);
}

using ( IDalSession session = daoManager.BeginTransaction() )
{
   Account account = NewAccount();
   Account account2 = accountDao.GetAccountById(1);
   account2.EmailAddress = "someotherAddress@somewhere.com";

   accountDao.Create(account);
   accountDao.Update(account2);

   session.Complete(); // Commit
}

> Log in a nd log out ever time the database is accessed
> ------------------------------------------------------
>
>                 Key: IBATISNET-237
>                 URL: https://issues.apache.org/jira/browse/IBATISNET-237
>             Project: iBatis for .NET
>          Issue Type: Improvement
>          Components: DataMapper
>    Affects Versions: DataMapper 1.6.1
>         Environment: Windows XP professional, Microsoft Visual C# 2005
>            Reporter: Dan Goetz
>
> When accessing the database, with SQL Server profile, I noticed the mapper logs in and out  for every database access. This seems to be an issue with the performance. I tried to open the connection after creating the mapper but I ran into several problems. It would improve the performance of our application if the mapper could log in once instead of continually logging in and out. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.