BizTalk Server Orchestration - Problems with calling COM+ components from BizTalk 2004 Orchestration

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > August 2004 > Problems with calling COM+ components from BizTalk 2004 Orchestration





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 Problems with calling COM+ components from BizTalk 2004 Orchestration
Detlef Hahn

2004-08-27, 6:06 pm

Hi,

I want to call a method in a COM+ component.
Even though I mark the class as Serializable I still get the following
error:

TxOrchestration1.odx(256): a non-serializable object type
'ComPlusLib.ComPlus ComPlusVar' can only be declared within an atomic scope
or service

How do I call a managed COM+ component (ServicedComponent) from a BizTalk
2004 orchestration ?

TIA
Detlef Hahn

Here is the code snippet for the COM+ component:
namespace ComPlusLib
{

[Guid("0C885210-ED4C-48aa-BF11-266FE56FF7BE")]
public interface IMyInt
{
void Test(XmlDocument doc);
}

[Guid("8F72A130-75A0-4512-A55B-292587150FC4")]
[JustInTimeActivation(true)]
[Transaction(TransactionOption.Required)]
[Serializable]
public class ComPlus : ServicedComponent , IMyInt
{

public void Test(XmlDocument doc)
{
//...
}

}
}


Todd Sussman

2004-08-27, 6:06 pm

If you reference any other .dll's that are not serializable, the assembly
you created, will not be seralizable either. If you use a long running
transaction for your orchestration, you can then use an atomic scope for
declaring and calling your .dll.

Todd

"Detlef Hahn" <Detlef.Hahn@ComputerGarden.se> wrote in message
news:%23uTZf77iEHA.596@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I want to call a method in a COM+ component.
> Even though I mark the class as Serializable I still get the following
> error:
>
> TxOrchestration1.odx(256): a non-serializable object type
> 'ComPlusLib.ComPlus ComPlusVar' can only be declared within an atomic
> scope
> or service
>
> How do I call a managed COM+ component (ServicedComponent) from a BizTalk
> 2004 orchestration ?
>
> TIA
> Detlef Hahn
>
> Here is the code snippet for the COM+ component:
> namespace ComPlusLib
> {
>
> [Guid("0C885210-ED4C-48aa-BF11-266FE56FF7BE")]
> public interface IMyInt
> {
> void Test(XmlDocument doc);
> }
>
> [Guid("8F72A130-75A0-4512-A55B-292587150FC4")]
> [JustInTimeActivation(true)]
> [Transaction(TransactionOption.Required)]
> [Serializable]
> public class ComPlus : ServicedComponent , IMyInt
> {
>
> public void Test(XmlDocument doc)
> {
> //...
> }
>
> }
> }
>
>



Devdutt Patnaik

2004-08-27, 6:06 pm

You are using a non-serializable class XmlDocument in your component.
Is there any particular reason why the method call can't be done in an
atomic scope? Is it a very time-consuming method?

"Detlef Hahn" <Detlef.Hahn@ComputerGarden.se> wrote in message
news:%23uTZf77iEHA.596@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I want to call a method in a COM+ component.
> Even though I mark the class as Serializable I still get the following
> error:
>
> TxOrchestration1.odx(256): a non-serializable object type
> 'ComPlusLib.ComPlus ComPlusVar' can only be declared within an atomic

scope
> or service
>
> How do I call a managed COM+ component (ServicedComponent) from a BizTalk
> 2004 orchestration ?
>
> TIA
> Detlef Hahn
>
> Here is the code snippet for the COM+ component:
> namespace ComPlusLib
> {
>
> [Guid("0C885210-ED4C-48aa-BF11-266FE56FF7BE")]
> public interface IMyInt
> {
> void Test(XmlDocument doc);
> }
>
> [Guid("8F72A130-75A0-4512-A55B-292587150FC4")]
> [JustInTimeActivation(true)]
> [Transaction(TransactionOption.Required)]
> [Serializable]
> public class ComPlus : ServicedComponent , IMyInt
> {
>
> public void Test(XmlDocument doc)
> {
> //...
> }
>
> }
> }
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com