⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sonicmqvendoradapter.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * Copyright 2001, 2002,2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.axis.components.jms;import org.apache.axis.MessageContext;import org.apache.axis.client.Call;import org.apache.axis.transport.jms.JMSConnector;import org.apache.axis.transport.jms.JMSConnectorFactory;import org.apache.axis.transport.jms.JMSURLHelper;import progress.message.client.ENetworkFailure;import progress.message.client.EUserAlreadyConnected;import progress.message.jclient.ErrorCodes;import javax.jms.ConnectionFactory;import javax.jms.JMSException;import javax.jms.QueueConnectionFactory;import javax.jms.TopicConnectionFactory;import java.util.HashMap;import java.util.Iterator;/** * Defines SonicMQ specific constants for connnection factory creation. * Overrides methods in BeanVendorAdapter to fill in MQ classnames * * @author Jaime Meritt (jmeritt@sonicsoftware.com) * @author Ray Chun (rchun@sonicsoftware.com) */public class SonicMQVendorAdapter extends BeanVendorAdapter{    private final static String QCF_CLASS =        "progress.message.jclient.QueueConnectionFactory";    private final static String TCF_CLASS =        "progress.message.jclient.TopicConnectionFactory";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>.     * This is a required property.     * The value must be a <code>java.lang.String</code>     * See the SonicMQ documentation for information on this property     */    public final static String BROKER_URL              = "brokerURL";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domains.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * This is a required property for secure brokers.     * The value must be a <code>java.lang.String</code>     * See the SonicMQ documentation for information on this property     */    public final static String DEFAULT_USERNAME = "defaultUser";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * This is a required property for secure brokers.     * The value must be a <code>java.lang.String</code>     * See the SonicMQ documentation for information on this property     */    public final static String DEFAULT_PASSWORD        = "defaultPassword";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Long</code>     * See the SonicMQ documentation for information on this property     */    public final static String PING_INTERVAL           = "pingIntervalLong";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Integer</code>     * See the SonicMQ documentation for information on this property     */    public final static String RECONNECT_INTERVAL      = "reconnectIntervalInteger";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Integer</code>     * See the SonicMQ documentation for information on this property     */    public final static String RECONNECT_TIMEOUT       = "reconnectTimeoutInteger";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.String</code>     * See the SonicMQ documentation for information on this property     */    public final static String CONNECT_ID              = "connectID";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.String</code>     * See the SonicMQ documentation for information on this property     */    public final static String CONNECTION_URLS         = "connectionURLs";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Boolean</code>     * See the SonicMQ documentation for information on this property     */    public final static String LOAD_BALANCING          = "loadBalancingBoolean";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Long</code>     * See the SonicMQ documentation for information on this property     */    public final static String MONITOR_INTERVAL        = "monitorInterval";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Boolean</code>     * See the SonicMQ documentation for information on this property     */    public final static String PERSISTENT_DELIVERY     = "persistentDeliveryBoolean";    /**     * <code>SonicConnectionFactory</code> parameter valid for either domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Boolean</code>     * See the SonicMQ documentation for information on this property     */    public final static String SEQUENTIAL              = "sequentialBoolean";    /**     * <code>SonicConnectionFactory</code> parameter valid for the PTP domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Integer</code>     * See the SonicMQ documentation for information on this property     */    public final static String PREFETCH_COUNT          = "prefetchCountInteger";    /**     * <code>SonicConnectionFactory</code> parameter valid for the PTP domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Integer</code>     * See the SonicMQ documentation for information on this property     */    public final static String PREFETCH_THRESHOLD      = "prefetchThresholdInteger";    /**     * <code>SonicConnectionFactory</code> parameter valid for the PubSub domain.  This should     * be used as a key in the environment map passed into calls to     * <code>createConnector</code> in <code>JMSConnectorFactory</code>     * The value must be a <code>java.lang.Boolean</code>     * See the SonicMQ documentation for information on this property     */    public final static String SELECTOR_AT_BROKER      = "selectorAtBroker";    public QueueConnectionFactory getQueueConnectionFactory(HashMap cfConfig)        throws Exception    {        cfConfig = (HashMap)cfConfig.clone();        cfConfig.put(CONNECTION_FACTORY_CLASS, QCF_CLASS);        return super.getQueueConnectionFactory(cfConfig);    }    public TopicConnectionFactory getTopicConnectionFactory(HashMap cfConfig)        throws Exception    {        cfConfig = (HashMap)cfConfig.clone();        cfConfig.put(CONNECTION_FACTORY_CLASS, TCF_CLASS);        return super.getTopicConnectionFactory(cfConfig);    }    /**     * Extract Sonic-specific properties from the JMS URL     *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -