[ 
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 = "[EMAIL PROTECTED]";

   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.

Reply via email to