Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.qpid.jms.jndi;
import static org.apache.qpid.jms.JmsConnectionFactory.REMOTE_URI_PROP;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Collections;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import jakarta.jms.Queue;
import jakarta.jms.Topic;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.spi.InitialContextFactory;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.apache.qpid.jms.JmsQueue;
import org.apache.qpid.jms.JmsTopic;
import org.apache.qpid.jms.provider.ProviderFactory;
import org.apache.qpid.jms.util.VariableExpansion;
public class JmsInitialContextFactory implements InitialContextFactory {
static final String[] DEFAULT_CONNECTION_FACTORY_NAMES = {
"ConnectionFactory", "QueueConnectionFactory", "TopicConnectionFactory" };
static final String CONNECTION_FACTORY_KEY_PREFIX = "connectionfactory.";
static final String QUEUE_KEY_PREFIX = "queue.";
static final String TOPIC_KEY_PREFIX = "topic.";
static final String CONNECTION_FACTORY_DEFAULT_KEY_PREFIX = "default." + CONNECTION_FACTORY_KEY_PREFIX;
static final String CONNECTION_FACTORY_PROPERTY_KEY_PREFIX = "property." + CONNECTION_FACTORY_KEY_PREFIX;
static final String DYNAMIC_QUEUES = "dynamicQueues";
static final String DYNAMIC_TOPICS = "dynamicTopics";
@Override
public Context getInitialContext(Hashtable, ?> environment) throws NamingException {
// Copy the environment to ensure we don't modify/reference it, it belongs to the caller.
Hashtable