In order to perform any messaging and queueing functions a connection
must be established with a messaging server by creating a SAMConnection
object and calling its "connect" method, with a set of connection
properties, to connect the PHP script to the messaging server. Until
such time as the SAMConnection object is destroyed the connection
will be maintained and available for use. All SAMConnection objects
are destroyed when the PHP script exits.
A set of default properties may be used in connecting to a messaging
server but as a minimum the PHP script must specify a protocol to be
used.
Пример #1 Creating a connection and connecting to a remote WebSphere MQSeries Messaging Server