AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.08.2009, 10:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
gatesasbait: Logging independently of transaction scope by using a separate thread in Dynamics AX (deux)
Источник: http://gatesasbait.spaces.live.com/B...B9F5!498.entry
==============

 
Good evening
 
Michal Kupczyk from this thread on the Microsoft communities proposes a much better way to log independantly of transaction scope in Dynamics Ax than what I had originally proposed here. Instead of using a separate thread to log, is uses a UserConnection object.
 
In addition to being simpler, it also has the added value of working from within batches. Batches it seems don't support multithreading.
 
void method()
{
    UserConnection conn = new UserConnection();

    yourLogTable = null;
    yourLogTable.setConnection(conn);

    ttsbegin;


    [...]

    yourLogTable.Log = 'This is tts-independent log';
    yourLogTable.insert();

    if (some_error)
    {
        throw Error('Error in processing');
    }

    ttscommit;
}



Источник: http://gatesasbait.spaces.live.com/B...B9F5!498.entry
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07
gatesasbait: Logging independently of transaction scope by using a separate thread in Dynamics AX Blog bot DAX Blogs 0 27.05.2009 23:16
Developer for Microsoft Dynamics AX Certification Roadmap Blog bot DAX Blogs 1 13.05.2009 16:17
axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series Blog bot DAX Blogs 0 06.08.2008 12:05
Inside Dynamics AX 4.0: Transaction Semantics Blog bot DAX Blogs 0 31.10.2007 23:40
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:12.