Broker 10.15 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Coding Messaging Client Applications | C# Messaging Clients | Sender-Receiver Application | Binding Administered Objects in C#
 
Binding Administered Objects in C#
In JMS, administered objects are bound and created in a JNDI namespace. In most cases, you configure a JNDI provider to work with your JMS provider, then bind the objects administratively in the JNDI namespace.
With webMethods C# messaging, you must bind the administered objects in an LDAP namespace by using My webMethods or the jmsadmin command-line tool (version 7.1 and later).
This sample assumes that you have already bound the administered objects to LDAP (you enter the required LDAP information through command-line arguments when starting the sender application). The sample's base class SimpleApplication.cs contains the look-up code needed to return the connection factory bound to LDAP.
class SimpleApplication
{
protected IConnectionFactory connectionFactory;
protected IDestination destination;
protected String ldapURL;
protected String ldapUserName;
protected String ldapPassword;
protected SimpleApplication() { }
public bool InitializeAdminObject(String _ldapURL,
String _ldapUserName,
String _ldapPassword,
String factoryName)
{
this.ldapURL = _ldapURL;
this.ldapUserName = _ldapUserName;
this.ldapPassword = _ldapPassword;
connectionFactory = LookupConnectionFactory(factoryName);
return connectionFactory != null;
}
...