Examples of QueueConnectionFactoryAdmin


Examples of com.wm.broker.jms.QueueConnectionFactoryAdmin

    /* (non-Javadoc)
     * @see hermes.ext.HermesAdminFactory#createSession(hermes.Hermes, javax.jms.ConnectionFactory)
     */
    public HermesAdmin createSession(Hermes hermes, ConnectionFactory connectionFactory) throws JMSException, NamingException
    {
        QueueConnectionFactoryAdmin cfAdmin = null;

        if (connectionFactory instanceof JNDIQueueConnectionFactory)
        {
            JNDIQueueConnectionFactory jndiCF = (JNDIQueueConnectionFactory) connectionFactory;

            return createSession(hermes, jndiCF._getConnectionFactory());
        }
        if (connectionFactory instanceof QueueConnectionFactoryAdmin)
        {
            try
            {
                cfAdmin = (QueueConnectionFactoryAdmin) connectionFactory;
                final BrokerConnectionDescriptor bcd = new BrokerConnectionDescriptor();

                bcd.setConnectionShare(true);
               
                try
                {
                    bcd.setConnectionShareLimit(100); // some arbitary number to handle concurrent connection.
                }
                catch (NoSuchMethodError ex)
                {
                    // Old version of WebMethods
                }    

                final BrokerAdminClient adminClient = BrokerAdminClient.newOrReconnectAdmin(cfAdmin.getBrokerHost(), cfAdmin.getBrokerName(), "admin"
                        + System.currentTimeMillis(), "admin", WMEAdminFactory.class.getName(), bcd);

                return new WMEAdmin(hermes, adminClient);
            }
            catch (BrokerException e)
View Full Code Here

Examples of com.wm.broker.jms.QueueConnectionFactoryAdmin

            final String[] clientGroups = adminClient.getClientGroupNames() ;
           
            for (int i = 0 ; i < clientGroups.length ; i++)
            {
                final String clientGroup = (String) clientGroups[i] ;
                final QueueConnectionFactoryAdmin cfAdmin = AdminFactory.newQueueConnectionFactory();

                cfAdmin.setBrokerHost(hostName + ":" + port);
                cfAdmin.setBrokerName(brokerName);
                cfAdmin.setConnectionClientGroup(clientGroup);
                cfAdmin.setConnectionClientId("hermes-" + System.currentTimeMillis());
             
                ctx.bind(clientGroup, cfAdmin);
            }

            adminClient.destroy();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.