Uses the container-specific qualifier to look up a JMS queue.

@param commonName
the vendor-neutral logical queue name
@return javax.jms.Queue
551503
public Queue getQueue(Session session, String commonName) throws ServiceLocatorException {
        Queue queue = (Queue) queueCache.get(commonName);
        if (queue == null) {
            try {
                String name = namingProvider.qualifyJmsQueueName(commonName);
                queue = jmsProvider.getQueue(session, namingProvider, name);
                if (queue != null)
                    queueCache.put(commonName, queue);
            }
            catch (Exception ex) {
                throw new ServiceLocatorException(-1, ex.getMessage(), ex);
            }
        }
        return queue;
    }
955647
protected String getCommonValueFile(HttpServletRequest hq, HttpServletResponse response)
	{
		String common =  base+"/common.var";
		if(gt.getResourceLoader().exist(common)){
			return common;
		}else{
			return null;
		}
	}
1129805
private List<String> getProcessList(String queueName) throws RabbitmqCommunicateException
    {
        List<String> processList = getContextBuilder().getProcessList(queueName);
        if (processList == null || processList.size() == 0)
        {
            String messageFmt = "QueueName's ProcessList is not defined. QueueName={0}";
            String message = MessageFormat.format(messageFmt, queueName);
            throw new RabbitmqCommunicateException(message);
        }
        return processList;
    }
344633
AsteriskQueueImpl getQueueByName(String queueName)
    {
        refreshQueueIfForced(queueName);

        AsteriskQueueImpl queue = getInternalQueueByName(queueName);
        if (queue == null)
        {
            logger.error("Requested queue '" + queueName + "' not found!");
        }

        return queue;
    }
989989
final protected com.ibm.websphere.cache.CacheEntry common_getCacheEntry(Object key) {
        final String methodName = "getCacheEntry(key)";
        ValidateUtility.objectNotNull(key, "key");
        EntryInfo ei = entryInfoPool.allocate(key, NULL_DEPIDs, NULL_ALIASIDs);
        ei.setSharingPolicy(this.sharingPolicy);
        com.ibm.websphere.cache.CacheEntry cacheEntry = cache.getEntry(ei, true);
        ei.returnToPool();
        if (tc.isDebugEnabled()) {
            if (cacheEntry != null) {
                Tr.debug(tc, methodName + " " + cache.getCacheName() + " id=" + cacheEntry.getIdObject());
            }
        }
        return cacheEntry;
    }
1061840
private CFEndPoint[] commonGetEndPoints(CFEndPoint[] endPointList, CFEndPointCriteria criteria, boolean getBestOnly) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "commonGetEndPoints");
        }
        if (null == endPointList || 0 == endPointList.length || null == criteria) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                Tr.exit(tc, "commonGetEndPoints", null);
            }
            return null;
        }
        String chainName = criteria.getChainName();
        List<CFEndPoint> chosenEndPoints = new LinkedList<CFEndPoint>();
        if (null != chainName) {
            for (int i = 0; i < endPointList.length; i++) {
                if (null == endPointList[i]) {
                    continue;
                }
                if (chainName.equals(endPointList[i].getName())) {
                    chosenEndPoints.add(endPointList[i]);
                    if (getBestOnly) {
                        break;
                    }
                }
            }
        } else {
            // Chain name was not provided in criteria.
            // Take special steps if the vhost is specified in the criteria.
            String vhost = criteria.getVirtualHost();
            if (null != vhost) {
                // If a match is found with an endpoint, then chosenEndPoints should
                // only include
                // a list of endPoints with matching vhost. If no matches are found,
                // then filter
                // out all endPoints that have the unmatching vhost ... leaving all with
                // null vhosts.
                //
                // Special Note:
                // The case of not finding a match should only happen if no vhost was
                // found to match
                // the inbound chain's host and port that lead to the creation of the
                // CFEndPoint. This
                // could result from a customer changing the port number on the server,
                // but not
                // putting the port into an appropriate virtual host. If precise
                // selection of a
                // CFEndPoint is needed, then that extra step is required by the
                // customer.
                List<CFEndPoint> vhostMatchingEndPoints = new ArrayList<CFEndPoint>();
                List<CFEndPoint> vhostNullEndPoints = new ArrayList<CFEndPoint>();
                for (CFEndPoint tempEndPoint : endPointList) {
                    if (tempEndPoint == null) {
                        continue;
                    }
                    List<String> vhostList = tempEndPoint.getVirtualHosts();
                    if (vhostList.isEmpty()) {
                        vhostNullEndPoints.add(tempEndPoint);
                    } else {
                        for (String value : vhostList) {
                            if (vhost.equalsIgnoreCase(value)) {
                                // Found a match. Add it to the matching array list.
                                vhostMatchingEndPoints.add(tempEndPoint);
                                break;
                            }
                        }
                    }
                }
                // Check to see if any matches were found for the vhost.
                if (0 != vhostMatchingEndPoints.size()) {
                    // A match was found. The endPointList should only include these
                    // endPoints.
                    // Update the array to the correct length. Then fill it with the new
                    // contents.
                    endPointList = new CFEndPoint[vhostMatchingEndPoints.size()];
                    vhostMatchingEndPoints.toArray(endPointList);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Found matching vhost in " + vhostMatchingEndPoints.size() + " CFEndPoints.");
                    }
                } else {
                    // No match was found. The endPointList should only include endPoints
                    // with no vhost.
                    // Update the array to the correct length. Then fill it with the new
                    // contents.
                    endPointList = new CFEndPoint[vhostNullEndPoints.size()];
                    vhostNullEndPoints.toArray(endPointList);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "No matching vhost found.  New CFEndPoint list size " + vhostNullEndPoints.size());
                    }
                }
            }

            // Decision may be based on isSSLRequired and isLocal
            boolean sslRequired = criteria.isSSLRequired();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Criteria specification if SSL is required: " + sslRequired);
            }

            // Decision may be based on a list of required channel factories.
            Class<?>[] requiredFactories = criteria.getOptionalChannelFactories();

            // Iterate the endPoints and compare them to the criteria.
            for (CFEndPoint tempEndPoint : endPointList) {
                if (tempEndPoint == null) {
                    continue;
                }
                // Double check that the channel accessor is not null.
                if (tempEndPoint.getChannelAccessor() == null) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Skipping over end point with null channel accessor, " + tempEndPoint.getName());
                    }
                    continue;
                }

                // Check for inclusion of the required factories.
                if (requiredFactories != null) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Found required factories to match");
                    }
                    boolean foundFactory = true;
                    Class<?> ocdFactory = null;
                    List<OutboundChannelDefinition> ocdList = tempEndPoint.getOutboundChannelDefs();
                    // Iterate the list of required factories to ensure each is in the end
                    // point.
                    for (Class<?> requiredFactory : requiredFactories) {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "RequiredFactory: " + requiredFactory);
                        }
                        // Note that we haven't found a match yet.
                        foundFactory = false;
                        // Iterate the list of outbound channel definitions in search for
                        // the required factory class.
                        for (OutboundChannelDefinition def : ocdList) {
                            ocdFactory = def.getOutboundFactory();
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                Tr.debug(tc, "OCD Factory: " + ocdFactory);
                            }
                            // Try to match the required factory class to this outbound
                            // channel definition.
                            if (requiredFactory.isAssignableFrom(ocdFactory) || ocdFactory.isAssignableFrom(requiredFactory)) {
                                // Found a match. This endpoint is good so far.
                                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                                    Tr.debug(tc, "Found a match");
                                }
                                foundFactory = true;
                                break;
                            }
                        }
                        // Verify that the required factory was in the endpoint.
                        if (!foundFactory) {
                            // Did NOT find a match. This endpoint is no good. Break out of
                            // this loop.
                            break;
                        }
                    }
                    if (!foundFactory) {
                        // Did NOT find a match for a required factory. This endpoint is no
                        // good. Move on to next endpoint.
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Skipping over endpoint with missing required factory.");
                        }
                        continue;
                    }
                }

                // Check that the channel accessor matches the endPoint.
                if (tempEndPoint.getChannelAccessor().equals(criteria.getChannelAccessor())) {
                    // Found matching channel accessor. Check if SSL is required in the
                    // criteria
                    if (sslRequired) {
                        // The criteria requires an SSL enabled endpoint.
                        if (tempEndPoint.isSSLEnabled()) {
                            // Check to see if an endpoint was already found.
                            if (chosenEndPoints.size() == 0) {
                                // No endpoint found yet. Found a matching endpoint.
                                chosenEndPoints.add(tempEndPoint);
                                // Searching can stop if the endpoint is local
                                if (tempEndPoint.isLocal()) {
                                    // The matching endpoint is local and getBestOnly. Stop
                                    // search.
                                    if (getBestOnly) {
                                        break;
                                    }
                                }
                            } else {
                                if (getBestOnly) {
                                    // Endpoint was already found. We are searching for a better
                                    // local one.
                                    if (tempEndPoint.isLocal()) {
                                        // This endpoint is local and the former endPoint wasn't and
                                        // getBestOnly. Stop search.
                                        chosenEndPoints.add(tempEndPoint);
                                        break;
                                    }
                                } else {
                                    chosenEndPoints.add(tempEndPoint);
                                }
                            }
                        }
                    } else {
                        // The criteria requires a non SSL enabled endpoint.
                        if (!tempEndPoint.isSSLEnabled()) {
                            // Found a matching non SSL enabled endpoint.
                            chosenEndPoints.add(tempEndPoint);
                            // Still need to get a local one if available.
                            if (tempEndPoint.isLocal()) {
                                // Found a matching local endpoint. Stop search.
                                if (getBestOnly) {
                                    break;
                                }
                            }
                        }
                    } // end check sslRequired
                } // end check channelAccessor
            } // end loop through end points
        } // end check chainName

        // convert the list to array or null if no match is found.
        int rtnSize = chosenEndPoints.size();
        CFEndPoint rtnEPs[] = null;
        if (rtnSize > 0) {
            rtnEPs = new CFEndPoint[rtnSize];
            chosenEndPoints.toArray(rtnEPs);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "commonGetEndPoints " + rtnSize);
        }
        return rtnEPs;
    }
1309889
@Override
    public JmsQueueConnectionFactory createQueueConnectionFactory() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createQueueConnectionFactory");
        JmsQueueConnectionFactory jmsqcf = null;

        // get a jca managed queue connection factory, which is used to construct
        // the jms queue connection factory.
        JmsJcaManagedQueueConnectionFactory jcamqcf = JmsJcaFactory.getInstance().createManagedQueueConnectionFactory();

        // invoke the construction of a jms queue connection factory - the jca
        // managed queue connection factory will call back into the jms api code
        // by getting a JmsRAFactoryFactory, and calling a create jms queue
        // connection factory method on it with jca connection factory and jca
        // managed queue connection factory objects as parameters (the jms qcf
        // will keep references to the jca cf and jca mqcf).
        try {
            jmsqcf = (JmsQueueConnectionFactory) jcamqcf.createConnectionFactory();
        } catch (ResourceException re) {
            // No FFDC code needed
            // d222942 review - no documentation for when a RE will be thrown, so
            // default exception ok. (A quick look at the RA suggests the exception isn't
            // ever thrown).
            // d238447 FFDC review. Comment above suggests an FFDC ok for this case.
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "EXCEPTION_RECEIVED_CWSIA0007",
                                                            new Object[] { re, "JmsFactoryFactoryImpl.createQueueConnectionFactory (#1)" },
                                                            re,
                                                            "JmsFactoryFactoryImpl.createQueueConnectionFactory#1",
                                                            this,
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createQueueConnectionFactory", jmsqcf);
        return jmsqcf;
    }
285620
public BlockingQueue<CollectionDocument> getQueue(String queueName) {
		Preconditions.checkArgument(registry.containsKey(queueName), "Queue %s does not exist", queueName);
		return registry.get(queueName);
	}
644546
public static String createQueue(String name) {
		if (StringUtils.isBlank(name)) {
			return null;
		}
		String queueURL = getQueueURL(name);
		if (queueURL == null) {
			try {
				queueURL = getClient().createQueue(new CreateQueueRequest(name)).getQueueUrl();
			} catch (AmazonServiceException ase) {
				logException(ase);
			} catch (AmazonClientException ace) {
				logger.error("Could not reach SQS. {0}", ace.toString());
			}
		}
		return queueURL;
	}
712665
@Override
    public java.util.concurrent.Future<CreateQueueResult> createQueueAsync(String queueName) {

        return createQueueAsync(new CreateQueueRequest().withQueueName(queueName));
    }
1342494
@Override
    public JmsQueue createQueue(String name) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createQueue", name);
        JmsQueue queue = null;

        // if name string is null, empty or just "queue://", throw exception
        if ((name == null) || ("".equals(name)) || (JmsQueueImpl.QUEUE_PREFIX.equals(name))) {
            throw (InvalidDestinationException) JmsErrorUtils.newThrowable(
                                                                           InvalidDestinationException.class,
                                                                           "INVALID_VALUE_CWSIA0003",
                                                                           new Object[] { "Queue name", name },
                                                                           tc
                            );
        }

        // if name is "topic://" throw exception
        if (name.startsWith(JmsTopicImpl.TOPIC_PREFIX)) {
            throw (InvalidDestinationException) JmsErrorUtils.newThrowable(
                                                                           InvalidDestinationException.class,
                                                                           "MALFORMED_DESCRIPTOR_CWSIA0047",
                                                                           new Object[] { "Queue", name },
                                                                           tc
                            );
        }

        name = name.trim();
        queue = (JmsQueue) destCreator.createDestinationFromString(name, URIDestinationCreator.DestType.QUEUE);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createQueue", queue);
        return queue;
    }
925627
public List<String> getProcessList(String queueName)
    {
        // このメソッドを呼び出す前に、
        // this#initProcessLists()を利用してprocessListsを初期しておくこと。 
        if (this.processLists == null)
        {
            return null;
        }
        return getProcessLists().get(queueName);
    }
327392
public QueueProducer<String> createQueueTextMessageProducer(final String topic)
    {
        Preconditions.checkState(connectionFactory != null, "connection factory was never injected!");
        return new QueueProducer<String>(connectionFactory, jmsConfig, topic, new TextMessageProducerCallback());
    }
75134
public function getQueue(string $queueName): QueueInterface
    {
        if (isset($this->queues[$queueName])) {
            return $this->queues[$queueName];
        }

        $queueSettings = $this->getQueueSettings($queueName);

        if (!isset($queueSettings['className'])) {
            throw new JobQueueException(sprintf('Option className for queue "%s" is not configured', $queueName), 1334147126);
        }

        $queueObjectName = $queueSettings['className'];
        if (!class_exists($queueObjectName)) {
            throw new JobQueueException(sprintf('Configured class "%s" for queue "%s" does not exist', $queueObjectName, $queueName), 1445611607);
        }


        if (isset($queueSettings['queueNamePrefix'])) {
            $queueNameWithPrefix = $queueSettings['queueNamePrefix'] . $queueName;
        } else {
            $queueNameWithPrefix = $queueName;
        }
        $options = isset($queueSettings['options']) ? $queueSettings['options'] : [];
        $queue = new $queueObjectName($queueNameWithPrefix, $options);
        $this->queues[$queueName] = $queue;

        return $queue;
    }
970898
public static <T extends NamedElement> ElementMatcher.Junction<T> named(String name) {
        return new NameMatcher<T>(new StringMatcher(name, StringMatcher.Mode.EQUALS_FULLY));
    }
129794
@Override
    public QueueConnectionFactory createQueueConnectionFactory(JmsJcaConnectionFactory jcaConnectionFactory, JmsJcaManagedQueueConnectionFactory jcaManagedQueueConnectionFactory) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createQueueConnectionFactory", new Object[] { jcaConnectionFactory, jcaManagedQueueConnectionFactory });
        QueueConnectionFactory qcf = new JmsQueueConnectionFactoryImpl(jcaConnectionFactory, jcaManagedQueueConnectionFactory);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createQueueConnectionFactory", qcf);
        return qcf;
    }
743688
@Override
    public Queue getQueue() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getQueue");
        Queue q = (Queue) theDestination;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getQueue", q);
        return q;
    }