Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

NmsTemplate.Execute(ISessionCallback, Boolean) Method

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

[Visual Basic]
Public Overridable Overloads Sub Execute( _
   ByVal action As ISessionCallback, _
   ByVal startConnection As Boolean _
)
[C#]
public virtual object Execute(
   ISessionCallback 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(ISessionCallback)
, allowing the NMS Connection to be started on the fly.

Use

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

See Also

NmsTemplate Class | Spring.Messaging.Nms.Core Namespace | NmsTemplate.Execute Overload List