atg.dms.patchbay
Interface JMSInitialContextFactory


public interface JMSInitialContextFactory

In JMS, Topic/QueueConnectionFactories and Destinations (Topics and Queues) are obtained by resolving JNDI names. The JNDI names are resolved against an InitialContext. Each JMS Provider has a different way of creating that InitialContext, so when integrating a new JMS Provider into Patch Bay, the code for creating an InitialContext must also be supplied. The code for creating the InitialContext must reside in a nucleus component that implements this interface. The name of that nucleus component must then be specified in the patch bay definition file for the provider using the "initial-context-factory" field. Whenever patch bay needs an InitialContext for resolving any of the above JNDI names, it will call "createInitialContext" on the nucleus component. If a provider does not specify an initial-context-factory, then all JNDI names for that provider will be resolved using a "vanilla" InitialContext (i.e., "new InitialContext ()").


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 javax.naming.Context createInitialContext(java.lang.String pProviderName, java.lang.String pUsername, java.lang.String pPassword, java.lang.String pClientId)
          Creates and returns the InitialContext that should be used to resolve JNDI names of ConnectionFactories and Destinations for a particular JMS Provider.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

createInitialContext

javax.naming.Context createInitialContext(java.lang.String pProviderName,
                                          java.lang.String pUsername,
                                          java.lang.String pPassword,
                                          java.lang.String pClientId)
                                          throws javax.naming.NamingException
Creates and returns the InitialContext that should be used to resolve JNDI names of ConnectionFactories and Destinations for a particular JMS Provider. The pProviderName, pUsername, pPassword, and pClientId are all taken from the values supplied for the provider in the patch bay definition file. If these values were not specified in the file, they will be null. The factory may or may not need these values to create the InitialContext.

Throws:
javax.naming.NamingException