Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

EmsTemplate.Execute(SessionDelegate, Boolean) Method

Execute the action specified by the given action object within a EMS Session.

[Visual Basic]
Public Overridable Overloads Sub Execute( _
   ByVal action As SessionDelegate, _
   ByVal startConnection As Boolean _
)
[C#]
public virtual object Execute(
   SessionDelegate action,
   bool startConnection
);

Parameters

action
callback object that exposes the session
startConnection
Start the connection before performing callback action.

Return Value

the result object from working with the session

Remarks

Generalized version of

execute(SessionCallback)
, allowing the EMS Connection to be started on the fly.

Use

execute(SessionCallback)
for the general case. Starting the EMS Connection is just necessary for receiving messages, which is preferably achieved through the
receive
methods.

Exceptions

Exception Type Condition
EMSException If there is any problem accessing the EMS API

See Also

EmsTemplate Class | Spring.Messaging.Ems.Core Namespace | EmsTemplate.Execute Overload List