BizTalk Server General - (The Transport Batch flush operation failed) + Custom Adapter

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > January 2005 > (The Transport Batch flush operation failed) + Custom Adapter





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author (The Transport Batch flush operation failed) + Custom Adapter
Kamal

2005-01-18, 7:50 am

Hi,

I've developed a custom One-Way Receive Adapter, it works fine but whenever
I stop the Host service, it takes so long to stop and the following error
appear in the Event Viewer:

( The Transport Batch flush operation failed. )

and also the following error:

----------------------------------------------------------------------------
-------------------------------------------------------------
Unhandled exception caught, exception details:
System.Security.SecurityException: Requested registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(String source, String
logName, String machineName, Boolean useMutex)
at System.Diagnostics.EventLog.WriteEntry(String message,
EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID, Int16 category)
at System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type, Int32 eventID)
at System.Diagnostics.EventLog.WriteEntry(String source, String message,
EventLogEntryType type)
at
bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
rEndpoint.PollTask() in
c:\testapp\adapters\trcvadapter\testrcva
dapter\run-time\rcvadapterreceive\rc
vadapterreceiverendpoint.cs:line 165
at
bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
rEndpoint.ProcessWorkItem() in
c:\testapp\adapters\testrcvadapter\testr
cvadapter\run-time\rcvadapterreceive
\rcvadapterreceiverendpoint.cs:line 140
at
Microsoft.Samples.BizTalk.Adapters.BaseAdapter.ThreadPool.WorkerThreadThunk(
Object state).
----------------------------------------------------------------------------
------------------------------------------------------------

If the messages were not transmitted to BizTalk and I stopped the Host,
these messages will get LOST (i.e. don't appear in BizTalk nor in the remote
directory as I delete the files after submitting it to the BatchHandler).

Is there anyway to resolve this problem? Any method from the BaseAdapter
classes to be called when the the service has been terminated (stopped)?. I
need to be able to stop the Host without having to lose any of messages or
cause any delays in stopping the Host.

Any help, suggestions or comments would be very much appreciated.

Thank you and really hope to hear from you very soon.


Kamal


Kamal

2005-01-26, 5:54 pm

Any suggestions please.......... :o(


"Kamal" <kali@bca-group.comNOSPAMPLEASE> wrote in message
news:%23py7uYV$EHA.1084@tk2msftngp13.phx.gbl...
> Hi,
>
> I've developed a custom One-Way Receive Adapter, it works fine but

whenever
> I stop the Host service, it takes so long to stop and the following error
> appear in the Event Viewer:
>
> ( The Transport Batch flush operation failed. )
>
> and also the following error:
>
> --------------------------------------------------------------------------

--
> -------------------------------------------------------------
> Unhandled exception caught, exception details:
> System.Security.SecurityException: Requested registry access is not

allowed.
> at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean

writable)
> at System.Diagnostics.EventLog.CreateEventSource(String source, String
> logName, String machineName, Boolean useMutex)
> at System.Diagnostics.EventLog.WriteEntry(String message,
> EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
> at System.Diagnostics.EventLog.WriteEntry(String source, String

message,
> EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
> at System.Diagnostics.EventLog.WriteEntry(String source, String

message,
> EventLogEntryType type, Int32 eventID, Int16 category)
> at System.Diagnostics.EventLog.WriteEntry(String source, String

message,
> EventLogEntryType type, Int32 eventID)
> at System.Diagnostics.EventLog.WriteEntry(String source, String

message,
> EventLogEntryType type)
> at
>

bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
> rEndpoint.PollTask() in
>

c:\testapp\adapters\trcvadapter\testrcva
dapter\run- time\rcvadapterreceive\rc
> vadapterreceiverendpoint.cs:line 165
> at
>

bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
> rEndpoint.ProcessWorkItem() in
>

c:\testapp\adapters\testrcvadapter\testr
cvadapter\run-time\rcvadapterreceive
> \rcvadapterreceiverendpoint.cs:line 140
> at
>

Microsoft.Samples.BizTalk.Adapters.BaseAdapter.ThreadPool.WorkerThreadThunk(
> Object state).
> --------------------------------------------------------------------------

--
> ------------------------------------------------------------
>
> If the messages were not transmitted to BizTalk and I stopped the Host,
> these messages will get LOST (i.e. don't appear in BizTalk nor in the

remote
> directory as I delete the files after submitting it to the BatchHandler).
>
> Is there anyway to resolve this problem? Any method from the BaseAdapter
> classes to be called when the the service has been terminated (stopped)?.

I
> need to be able to stop the Host without having to lose any of messages or
> cause any delays in stopping the Host.
>
> Any help, suggestions or comments would be very much appreciated.
>
> Thank you and really hope to hear from you very soon.
>
>
> Kamal
>
>



Asbjørn Rygg

2005-01-27, 2:50 am

Ok, I`ll give it a go..

When you shut down your BizTalk host it notifies all in-process adapters
that it is about to be shut down through calling the
IBTTransportControl.Terminate() method. The docs for Terminate() is
saying that the adapter should not start any new processing and block
until it is done processing the remaining work. It may look like it is
not finished processing before it is terminated in this case (impossible
to say for certain without seeing the code).

Now to your exception message: I have seen this SecurityException before
when I tried to write to an EventlogSource that did not exist. The user
that is running the BizTalk process does not usually have permissions to
create this eventlog source (I think you have to be admin to do this).
If this is what the code is trying to do at line 165 in
rcvadapterreceiverendpoint.cs, then try to create the eventsource
manually (The SDK includes a sample on how to do this).

So, I`d check if the Terminate() method is blocking incoming requests
properly and check if the eventlog source exists.

HTH,
Asbjørn

Kamal wrote:[vbcol=seagreen]
> Any suggestions please.......... :o(
>
>
> "Kamal" <kali@bca-group.comNOSPAMPLEASE> wrote in message
> news:%23py7uYV$EHA.1084@tk2msftngp13.phx.gbl...
>
>
> whenever
>
>
> --
>
>
> allowed.
>
>
> writable)
>
>
> message,
>
>
> message,
>
>
> message,
>
>
> message,
>
>
> bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
>
>
> c:\testapp\adapters\trcvadapter\testrcva
dapter\run-time\rcvadapterreceive\rc
>
>
> bcagroup.BizTalk.Adapters.RunTime.RcvAdapterReceiveAdapter.RcvAdapterReceive
>
>
> c:\testapp\adapters\testrcvadapter\testr
cvadapter\run-time\rcvadapterreceive
>
>
> Microsoft.Samples.BizTalk.Adapters.BaseAdapter.ThreadPool.WorkerThreadThunk(
>
>
> --
>
>
> remote
>
>
> I
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com