Creates a new connection with the given userName and password credentials.

Namespace:  Apache.NMS
Assembly:  Apache.NMS (in Apache.NMS.dll)

Syntax

Visual Basic
Public Function CreateConnection ( _
	userName As String, _
	password As String _
) As IConnection
C#
public IConnection CreateConnection(
	string userName,
	string password
)
Visual C++
public:
virtual IConnection^ CreateConnection(
	String^ userName, 
	String^ password
) sealed
JavaScript
function createConnection(userName, password);

Parameters

userName
Type: System..::..String
The username to use when establishing the connection.
password
Type: System..::..String
The password to use when establishing the connection.

Return Value

An IConnection created by the requested ConnectionFactory.

Implements

IConnectionFactory..::..CreateConnection(String, String)

See Also