[Top] [All Lists]

Re: Custom Formatter: Initialize and Close methods

Subject: Re: Custom Formatter: Initialize and Close methods
From: "Shyam Pather [MSFT]"
Date: Wed, 22 Jun 2005 11:48:00 -0700
Newsgroups: microsoft.public.sqlserver.notificationsvcs
Initialize and Close on content formatters are called once per notification 
batch per delivery channel i.e. to distribute 1 notification batch over 3 
delivery channels, there will be 3 pairs on Initialize/Close calls.

If you're seeing one Initialize()/Close() sequence per notification, it 
might be that each notification is in a batch by itself. This could happen, 
depending on how you've configured your application, but is probably not 
what you want. If you post your ADF, I can try to take a look.

Your strategy for caching the large text field across many notifications is 
sound - many applications I know of use a similar strategy.

Learn more about SQL-NS:
This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at
"sidgam" <[email protected]> wrote in message 
news:[email protected]
> Hello folks,
> While debuggin my Custom Formatter I noticed that the Initialize and
> Close methods are called for every email (comprised of many
> notificaitons) instead just once for a batch of emails.
> This means that arguments from the ADF are loaded up every time
> instead of just once for a batch.  As I understand it, a batch will
> only have emails that use the same protocol, so the arguements needed
> would be the same for it, so it should just load it once.
> I want to use the Initialize and Close methods to load up and clean
> text which is larger than the 4000 char limit for EMN fields.  The
> idea is to load up the text once, preserve and use it for the
> duration of the batch and then remove it from memory.
> Any suggestions on other mechanisms I can use to accomplish this.
> Thx.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Custom Formatter: Initialize and Close methods, Shyam Pather [MSFT] <=