Class Publisher

    • Constructor Detail

      • Publisher

        public Publisher​(boolean useProps,
                         String initialContextFactory,
                         String providerUrl,
                         String connfactory,
                         String destinationName,
                         boolean useAuth,
                         String securityPrincipal,
                         String securityCredentials)
                  throws JMSException,
                         NamingException
        Create a publisher using either the jndi.properties file or the provided parameters. Uses a static destination and persistent messages(for backward compatibility)
        Parameters:
        useProps - true if a jndi.properties file is to be used
        initialContextFactory - the (ignored if useProps is true)
        providerUrl - (ignored if useProps is true)
        connfactory - name of the object factory to look up in context
        destinationName - name of the destination to use
        useAuth - (ignored if useProps is true)
        securityPrincipal - (ignored if useProps is true)
        securityCredentials - (ignored if useProps is true)
        Throws:
        JMSException - if the context could not be initialised, or there was some other error
        NamingException - when creation of the publisher fails
      • Publisher

        public Publisher​(boolean useProps,
                         String initialContextFactory,
                         String providerUrl,
                         String connfactory,
                         String destinationName,
                         boolean useAuth,
                         String securityPrincipal,
                         String securityCredentials,
                         boolean staticDestination)
                  throws JMSException,
                         NamingException
        Create a publisher using either the jndi.properties file or the provided parameters
        Parameters:
        useProps - true if a jndi.properties file is to be used
        initialContextFactory - the (ignored if useProps is true)
        providerUrl - (ignored if useProps is true)
        connfactory - name of the object factory to lookup in context
        destinationName - name of the destination to use
        useAuth - (ignored if useProps is true)
        securityPrincipal - (ignored if useProps is true)
        securityCredentials - (ignored if useProps is true)
        staticDestination - true if the destination is not to change between loops
        Throws:
        JMSException - if the context could not be initialised, or there was some other error
        NamingException - when creation of the publisher fails