Search

ESB Toolkit 2.0 Alert Service race condition retreiving email address from cache or AD by Thomas F. Abraham

Active

2
0
Sign in
to vote
Type: Bug
ID: 573935
Opened: 7/8/2010 1:01:31 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
ActiveDirectoryHelper.GetEmailAddress() contains a race condition. The code calls CacheMgr.Contains(name), then runs a Trace.WriteLine(), then calls CacheMgr.GetData(). Between the two calls the data may expire and drop out of the cache, resulting in GetData() returning null. We sometimes see NULL values in the database in AlertEmail.To. The corrected code is:

string cachedEmail = (string)CacheMgr.GetData(name);

if (!string.IsNullOrEmpty(cachedEmail))
{
    System.Diagnostics.Trace.WriteLine("Reusing email address for " + name + " from cache.");
    return cachedEmail;
}
Details (expand)

Product Language

English

Version

BizTalk 2009

Category

ESBT

Repro Steps

See description
File Attachments
0 attachments
Sign in to post a comment.
Posted by QuintonV on 7/7/2011 at 1:42 AM
I am getting the exact same issue, however I am using BT 2010 and ESB 2.1

Every once in a while I get the Null value error and when I look inside the table in the ESBException DB I see that the To is really null
Sign in to post a workaround.