05-22-05 10:48 PM
Raghu,
>I have set up an orhcestration that calls a .net component with scope block
> that also has exception handler. I don't care about transactions so I set
> the transaction type equal to none (on scope block), which required the
> component to be flagged with [Serializable] attribute. I was able to
> compile, deploy and test successfully.
>
> Later I moved the .net component into a COM+ server application with a
> different security identity. I expclitey stamped this component with com+
> transactions not supported. The .net component is then deployed into com+
> successfully and the assembly is directly bound to orchestration project.
> The orchestration now fails with following:
>
> C:\FilePickUP\Logic.odx(347): a non-serializable object type
> 'QCustom2.CSimulate varCustomComp' can only be declared within an atomic
> scope or service
>
> The funny part is that the .net component (though it derives from
> ServicedComponent) is already marked with [Serializable] attribute. I
> still
> don't care about transactions.
ServicedComponent's are never serializable, doesn't matter that you marked
them with the Serializable attribute (they are MarshalByRef objects, which
have different mechanics here).
You will have to put it into a Atomic Transaction scope, since that's the
only thing that can prevent the BizTalk Orchestration engine from
dehydrating the orchestration instance at runtime (which is what requires
serialization).
You could certainly do something like creating a generic .NET class and use
static methods that call the COM+ component underneath, and call that from
the orchestration, though...
--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/
[ Post a follow-up to this message ]
|