/*
(non-Javadoc)
@see javax.jms.Connection#createConnectionConsumer(javax.jms.Destination, java.lang.String, javax.jms.ServerSessionPool, int)
488449
@Override
	public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
    {
        throw new FFMQException("Unsupported feature","UNSUPPORTED_FEATURE");
    }
1225655
@Override
    public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
            throws JMSException {
        throw new JMSException(SQSMessagingClientConstants.UNSUPPORTED_METHOD);
    }
748715
@Override
    protected Object createPoolOrConnection()
    {
        PersistenceUnitMetadata persistenceUnitMetadata = kunderaMetadata.getApplicationMetadata()
                .getPersistenceUnitMetadata(getPersistenceUnit());

        Properties props = persistenceUnitMetadata.getProperties();

        String host = externalProperties != null ? (String) externalProperties.get(PersistenceProperties.KUNDERA_NODES)
                : null;
        String port = externalProperties != null ? (String) externalProperties.get(PersistenceProperties.KUNDERA_PORT)
                : null;

        if (host == null)
        {
            host = props.getProperty(PersistenceProperties.KUNDERA_NODES);
        }

        if (port == null)
        {
            port = props.getProperty(PersistenceProperties.KUNDERA_PORT);
        }

        String[] hosts = getHosts(host);

        Properties properties = ((ESClientPropertyReader) propertyReader).getConnectionProperties();

        Builder builder = Settings.settingsBuilder();

        builder.put("client.transport.sniff", true);

        if (properties != null)
        {
            builder.put(properties);
        }

        Settings settings = builder.build();

        TransportClient client = TransportClient.builder().settings(settings).build();

        for (String h : hosts)
        {
            client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(h, new Integer(port))));
        }

        return client;
    }
241645
public void setAsynchConsumer(AsynchConsumerCallback consumer,
                                 int maxActiveMessages,
                                 long messageLockExpiry,
                                 int maxBatchSize,
                                 OrderingContext orderContext,
                                 int maxSequentialFailures,                                             //SIB0115d.comms
                                 long hiddenMessageDelay,
                                 boolean stoppable)                                                             //472879
      throws SISessionUnavailableException, SISessionDroppedException,
             SIConnectionUnavailableException, SIConnectionDroppedException,
             SIErrorException,
             SIIncorrectCallException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setAsynchConsumer",
                                           new Object[]
                                           {
                                              consumer,
                                              maxActiveMessages,
                                              messageLockExpiry,
                                              maxBatchSize,
                                              orderContext,
                                              maxSequentialFailures,                                    //SIB0115d.comms
                                              hiddenMessageDelay,
                                              stoppable                                                         //472879
                                           });

      if (sessionId == 0)
      {
         // If the session Id = 0, then no one called setSessionId(). As such we are unable to flow
         // to the server as we do not know which session to instruct the server to use.
         SIErrorException e = new SIErrorException(
            nls.getFormattedMessage("SESSION_ID_HAS_NOT_BEEN_SET_SICO1043", null, null)
         );

         FFDCFilter.processException(e, CLASS_NAME + ".setAsyncConsumer",
                                     CommsConstants.CONVERSATIONHELPERIMPL_02, this);

         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Session Id was 0", e);

         throw e;
      }

      CommsByteBuffer request = getCommsByteBuffer();
      // Connection object id
      request.putShort(connectionObjectId);
      // Consumer session id
      request.putShort(sessionId);
      // Now put the message order context id if we have one
      if (orderContext != null)
      {
         request.putShort(((OrderingContextProxy)orderContext).getId());
      }
      else
      {
         request.putShort(CommsConstants.NO_ORDER_CONTEXT);
      }
      // Client session id - this is the proxy queue ID
      request.putShort(proxyQueueId);
      // Max active messages
      request.putInt(maxActiveMessages);
      // Message lock expiry
      request.putLong(messageLockExpiry);
      // Max batch size
      request.putInt(maxBatchSize);

      // If callback is Stoppable then send maxSequentialFailures & hiddenMessageDelay then change the
      // Segment Id to Stoppable  SIB0115d.comms
      int JFapSegmentId = JFapChannelConstants.SEG_REGISTER_ASYNC_CONSUMER;                             //SIB0115d.comms

      if (stoppable) {                                                                           //SIB0115d.comms,472879
        request.putInt(maxSequentialFailures);                                                          //SIB0115d.comms
        request.putLong(hiddenMessageDelay);
        JFapSegmentId = JFapChannelConstants.SEG_REGISTER_STOPPABLE_ASYNC_CONSUMER;                     //SIB0115d.comms
      }                                                                                                 //SIB0115d.comms

      CommsByteBuffer reply = null;
      try
      {
         // Pass on call to server
         reply = jfapExchange(request,
                              JFapSegmentId,                                                            //SIB0115d.comms
                              JFapChannelConstants.PRIORITY_MEDIUM,
                              true);
      }
      catch (SIConnectionLostException e)
      {
         // No FFDC Code needed
         // Converting this to a connection dropped as that is all we can throw
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Connection was lost", e);

         throw new SIConnectionDroppedException(e.getMessage(), e);
      }

      // Confirm appropriate data returned
      try
      {
         short err = reply.getCommandCompletionCode(JFapChannelConstants.SEG_REGISTER_ASYNC_CONSUMER_R);
         if (err != CommsConstants.SI_NO_EXCEPTION)
         {
            checkFor_SISessionUnavailableException(reply, err);
            checkFor_SISessionDroppedException(reply, err);
            checkFor_SIConnectionUnavailableException(reply, err);
            checkFor_SIConnectionDroppedException(reply, err);
            checkFor_SIIncorrectCallException(reply, err);
            checkFor_SIErrorException(reply, err);
            defaultChecker(reply, err);
         }
      }
      finally
      {
         if (reply != null) reply.release();
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setAsynchConsumer");
   }
66066
@Override
    public SICoreConnection createConnection(String userName, String password,
                                             Map connectionProperties) throws SIResourceException,
                    SINotAuthorizedException, SIAuthenticationException {
        if (TraceComponent.isAnyTracingEnabled()
            && CoreSPIConnFactory.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnFactory.tc, "createConnection",
                        new Object[] { userName, connectionProperties });

        // Check that the Messaging Engine is started
        checkStarted();

        // Security context associated with logged-on principal.
        Subject subject = null;

        // Security Code changes for Liberty: Sharath Start
        try {
            subject = _authentication.login(userName, password);
        } catch (MessagingAuthenticationException e) {
            throw new SIAuthenticationException(e.getMessage());
        }
        SICoreConnection connection = createConnection(subject, connectionProperties);
        if (TraceComponent.isAnyTracingEnabled()
            && CoreSPIConnFactory.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnFactory.tc, "createConnection", connection);
        return connection;
        // Security Code changes for Liberty: Sharath End
    }
107480
public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, String destinationTypeClass)
    {
        JmsDestinationType destinationType = JmsDestinationService.getTypeFromClass(destinationTypeClass);

        return this.createUnique(applications, jndiName, destinationType);
    }
1272770
@Override
    public ConnectionFactory createConnectionFactory(JmsJcaConnectionFactory jcaConnectionFactory) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createConnectionFactory", jcaConnectionFactory);
        ConnectionFactory cf = new JmsManagedConnectionFactoryImpl(jcaConnectionFactory);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createConnectionFactory", cf);
        return cf;
    }
432650
private void createDestinations() throws MessagingException {
        try {
            // Create Destinations based on properties
            Enumeration<?> propertyNames = m_connectionProperties.keys();
            while (propertyNames.hasMoreElements()) {
                String propertyName = (String) propertyNames.nextElement();
                if (propertyName.startsWith("topic.")) {
                    String destinationName =
                            m_connectionProperties.getProperty(propertyName);
                    m_jmsManager.createDestination(destinationName,
                                                   DestinationType.Topic);
                } else if (propertyName.startsWith("queue.")) {
                    String destinationName =
                            m_connectionProperties.getProperty(propertyName);
                    m_jmsManager.createDestination(destinationName,
                                                   DestinationType.Queue);
                }
            }

            // Get destination list
            List<Destination> destinations = m_jmsManager.getDestinations();

            // If there are no Destinations, throw an exception
            if (destinations.size() == 0) {
                throw new MessagingException("No destinations available for "
                        + "subscription, make sure that there is at least one topic "
                        + "or queue specified in the connection properties.");
            }

            // Subscribe
            for (Destination destination : destinations) {
                if (m_durable && (destination instanceof Topic)) {
                    m_jmsManager.listenDurable((Topic) destination,
                                               m_messageSelector,
                                               this,
                                               null);
                } else {
                    m_jmsManager.listen(destination, m_messageSelector, this);
                }
            }
        } catch (MessagingException me) {
            logger.error("MessagingException encountered attempting to start "
                    + "Messaging Client: " + m_clientId
                    + ". Exception message: " + me.getMessage(), me);
            throw me;
        }
    }
651105
def create_connector_c_pool(name, server=None, **kwargs):
    '''
    
    '''
    defaults = {
        'connectionDefinitionName': 'javax.jms.ConnectionFactory',
        'resourceAdapterName': 'jmsra',
        'associateWithThread': False,
        'connectionCreationRetryAttempts': 0,
        'connectionCreationRetryIntervalInSeconds': 0,
        'connectionLeakReclaim': False,
        'connectionLeakTimeoutInSeconds': 0,
        'description': '',
        'failAllConnections': False,
        'id': name,
        'idleTimeoutInSeconds': 300,
        'isConnectionValidationRequired': False,
        'lazyConnectionAssociation': False,
        'lazyConnectionEnlistment': False,
        'matchConnections': True,
        'maxConnectionUsageCount': 0,
        'maxPoolSize': 32,
        'maxWaitTimeInMillis': 60000,
        'ping': False,
        'poolResizeQuantity': 2,
        'pooling': True,
        'steadyPoolSize': 8,
        'target': 'server',
        'transactionSupport': '',
        'validateAtmostOncePeriodInSeconds': 0
    }

    # Data = defaults + merge kwargs + remove salt
    data = defaults
    data.update(kwargs)

    # Check TransactionSupport against acceptable values
    if data['transactionSupport'] and data['transactionSupport'] not in (
               'XATransaction',
               'LocalTransaction',
               'NoTransaction'
       ):
        raise CommandExecutionError('Invalid transaction support')

    return _create_element(name, 'resources/connector-connection-pool', data, server)
544279
private MessageConsumer createConsumer(Destination destination, String name, String messageSelector, boolean noLocal,
                                           boolean isSharedNonDurable) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createConsumer", new Object[] { destination, messageSelector, noLocal, isSharedNonDurable });
        JmsMsgConsumer consumer = null;

        checkNotClosed();
        if (destination == null) {
            throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                           "INVALID_VALUE_CWSIA0048",
                                                                           new Object[] { "Destination", "null" },
                                                                           tc
                            );
        }

        if (isSharedNonDurable) {
            if ((name == null) || ("".equals(name))) {
                throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                                "INVALID_VALUE_CWSIA0048",
                                                                new Object[] { "sharedSubscriptionName", name },
                                                                tc
                                );
            }
        }

        // Check that this is not a foreign implementation.
        // Note that in some situations this method call can return a _different_
        // destination than the one passed in as the parameter (e.g. Spring).
        JmsDestinationImpl nativeDest = JmsDestinationImpl.checkNativeInstance(destination);

        // Check that this destination is not blocked from creating consumers
        JmsDestinationImpl.checkBlockedStatus(nativeDest);

        // create the consumer properties object filling in as much information
        // as we have available at the moment.
        ConsumerProperties newProps = new ConsumerProperties(nativeDest,
                        null, // DestType                filled in later
                        messageSelector, // Selector
                        null, // Reliability             filled in later
                        false, // ReadAhead               filled in later
                        true, // RecovExpress            filled in later
                        noLocal, // NoLocal
                        name, // SubName  .. with JMS 2.0, the value is set for all cases
                        connection.getClientID(), // ClientID .. with JMS 2.0, the value is set for all cases
                        isSharedNonDurable, // SupportMultiple .. with JMS 2.0, the value is set for all cases         
                        null // DurableSubscriptionHome n/a for non-durable consumers
        );

        // Hold the state lock while the msg consumer constructor is called to prevent
        // it from reading invalid start/stopped state while start is in progress. This
        // will basically cause and createConsumer calls on this session to wait until
        // session.start is complete.
        synchronized (stateLock) {
            consumer = instantiateConsumer(newProps);
            // newly created consumers must be synchronous
            syncConsumers.add(consumer);

            // d353701 - output a warning message if there are 'lots' of producers active.
            int totalConsumers = syncConsumers.size() + asyncConsumers.size();
            if (totalConsumers % PROD_CONS_WARNING_THRESHOLD == 0) {
                // We wish to tell the user which line of their application created the session,
                // so we must obtain a line of stack trace from their application.
                String errorLocation = JmsErrorUtils.getFirstApplicationStackString();
                SibTr.warning(tc, "MANY_CONSUMERS_WARNING_CWSIA0059", new Object[] { "" + totalConsumers, errorLocation });
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createConsumer", consumer);
        return consumer;
    }
897528
private BrowserSession createBrowserSession(
                                                SIDestinationAddress destinationAddress,
                                                DestinationType destinationType,
                                                SelectionCriteria criteria,
                                                boolean system,
                                                String alternateUser,
                                                boolean gatherMessages)
                    throws SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIErrorException,
                    SITemporaryDestinationNotFoundException,
                    SIResourceException,
                    SINotPossibleInCurrentConfigurationException, SISelectorSyntaxException, SIDiscriminatorSyntaxException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "createBrowserSession",
                        new Object[] { destinationAddress, destinationType, criteria, Boolean.valueOf(gatherMessages) });

        // Finding a destination could take some time so we don't have the
        // connection locked (on closed) when we do this.
        DestinationHandler destination = _destinationManager.getDestination(
                                                                            (JsDestinationAddress) destinationAddress, false);

        // Check that this is the correct destination type
        checkDestinationType(destinationType, destinationAddress, destination, system);

        if (destination.getDestinationType() == DestinationType.SERVICE)
        {
            //Cant browse a service destination
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "createBrowserSession", "cannot browse a service destination");

            throw new SINotPossibleInCurrentConfigurationException(
                            nls.getFormattedMessage(
                                                    "INVALID_DESTINATION_USAGE_ERROR_CWSIP0022",
                                                    new Object[] { destination.getName(),
                                                                  _messageProcessor.getMessagingEngineName() },
                                                    null));
        }

        // Check that this temporary destination was created by this connection.
        checkTemporary(destination, false);

        // Check authority to browse this destination
        // If security is disabled then we'll bypass the check
        checkDestinationAuthority(destination, MessagingSecurityConstants.OPERATION_TYPE_BROWSE, null);

        //if the destination turns out to be pub-sub then that doesn't make sense
        //so we'll just set it back to null
        if (destination.isPubSub())
        {
            destination = null;
        }

        BrowserSession browser = null;

        // Synchronize on the close object, we don't want the connection closing
        // while we try to add the browser.
        synchronized (this)
        {
            // See if this connection has been closed
            checkNotClosed();

            //create a browser session with the given destination
            //if the destination was null - it was pub sub - this will create a browser
            //session which never returns any messages
            browser = new BrowserSessionImpl(destination,
                            criteria,
                            this,
                            destinationAddress,
                            gatherMessages);
            synchronized (_browsers)
            {
                //store a reference
                _browsers.add(browser);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createBrowserSession", browser);

        return browser;
    }
754811
@Override
    public ConsumerSession createConsumerSessionForDurableSubscription(String subscriptionName,
                                                                       boolean enableReadAhead,
                                                                       Reliability unrecoverableReliability,
                                                                       boolean bifurcatable)

                    throws SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIErrorException,
                    SIDurableSubscriptionNotFoundException, SIDurableSubscriptionMismatchException,
                    SIDestinationLockedException, SIIncorrectCallException, SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(
                        CoreSPIConnection.tc,
                        "createConsumerSessionForDurableSubscription",
                        new Object[] {
                                      this,
                                      subscriptionName,
                                      Boolean.valueOf(enableReadAhead),
                                      unrecoverableReliability,
                                      Boolean.valueOf(bifurcatable) });

        // Do not need to check that the destination information is correct.
        // As we are using the subscription data straight from the named subscription

        // Find the ConsumerDispatcher for this subscription
        // Note that it must be homed on this ME
        HashMap durableSubs = _destinationManager.getDurableSubscriptionsTable();

        ConsumerDispatcher cd = null;
        synchronized (durableSubs)
        {
            //Look up the consumer dispatcher for this subId in the system durable subs list
            cd =
                            (ConsumerDispatcher) durableSubs.get(subscriptionName);

            // Check that the durable subscription exists
            if (cd == null)
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "createConsumerSessionForDurableSubscription");

                throw new SIDurableSubscriptionNotFoundException(
                                nls.getFormattedMessage(
                                                        "SUBSCRIPTION_DOESNT_EXIST_ERROR_CWSIP0072",
                                                        new Object[] { subscriptionName,
                                                                      _messageProcessor.getMessagingEngineName() },
                                                        null));
            }
        }

        //Get the destinationHandler from the ConsumerDispatcher
        //Note that we know it is PubSub  
        DestinationHandler destination = cd.getDestination();
        SIDestinationAddress destinationAddress = SIMPUtils.createJsDestinationAddress(
                                                                                       destination.getName(),
                                                                                       _messageProcessor.getMessagingEngineUuid());

        //Get the state object representing the subscription from the ConsumerDispatcher
        ConsumerDispatcherState subState = cd.getConsumerDispatcherState();

        ConsumerSessionImpl consumer = null;

        // Synchronize on the close object, we don't want the connection closing
        // while we try to add the subscription.
        synchronized (this)
        {
            // See if this connection has been closed
            checkNotClosed();

            //create the consumer session for this subscription
            try
            {
                consumer =
                                new ConsumerSessionImpl(destination,
                                                destinationAddress,
                                                subState,
                                                this,
                                                enableReadAhead,
                                                false,
                                                unrecoverableReliability,
                                                bifurcatable,
                                                true,
                                                false);
            } catch (SINotPossibleInCurrentConfigurationException e)
            {
                // No FFDC code needed
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "createConsumerSessionForDurableSubscription", "SIErrorException");
                throw new SIErrorException(e);
            } catch (SISessionUnavailableException e)
            {
                // FFDC
                FFDCFilter
                                .processException(
                                                  e,
                                                  "com.ibm.ws.sib.processor.impl.ConnectionImpl.createConsumerSessionForDurableSubscription",
                                                  "1:2129:1.347.1.25",
                                                  this);

                SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                            new Object[] {
                                          "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                          "1:1809:1.285",
                                          e });

                // This should never be thrown
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "createConsumerSessionForDurableSubscription", "SIErrorException");
                throw new SIErrorException(
                                nls.getFormattedMessage(
                                                        "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                        new Object[] {
                                                                      "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                                                      "1:2146:1.347.1.25",
                                                                      e },
                                                        null),
                                e);
            } catch (SITemporaryDestinationNotFoundException e)
            {
                // FFDC
                FFDCFilter
                                .processException(
                                                  e,
                                                  "com.ibm.ws.sib.processor.impl.ConnectionImpl.createConsumerSessionForDurableSubscription",
                                                  "1:2159:1.347.1.25",
                                                  this);

                SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                            new Object[] {
                                          "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                          "1:2165:1.347.1.25",
                                          e });

                // This should never be thrown
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "createConsumerSessionForDurableSubscription", "SIErrorException");
                throw new SIErrorException(
                                nls.getFormattedMessage(
                                                        "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                        new Object[] {
                                                                      "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                                                      "1:2176:1.347.1.25",
                                                                      e },
                                                        null),
                                e);
            } catch (SINonDurableSubscriptionMismatchException e)
            {
                SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                            new Object[] {
                                          "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                          "1:1953:1.347.1.25",
                                          e });

                // This should never be thrown
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(tc, "createConsumerSessionForDurableSubscription", "SIErrorException");
                throw new SIErrorException(
                                nls.getFormattedMessage(
                                                        "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                        new Object[] {
                                                                      "com.ibm.ws.sib.processor.impl.ConnectionImpl",
                                                                      "1:1964:1.347.1.25",
                                                                      e },
                                                        null),
                                e);
            }

            synchronized (_consumers)
            {
                //store a reference
                _consumers.add(consumer);
            }

            _messageProcessor.addConsumer(consumer);
        }

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "createConsumerSessionForDurableSubscription", consumer);
        return consumer;
    }
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;
    }
507059
public static synchronized void createManagedConnectionPool(String poolName, Object mcp)
   {
      log.tracef("%s", new TraceEvent(poolName,
                                      Integer.toHexString(System.identityHashCode(mcp)),
                                      TraceEvent.MANAGED_CONNECTION_POOL_CREATE,
                                      "NONE"));
   }
1036088
@Override
	public QueueConnection createQueueConnection(String userName, String password) throws JMSException
    {
        URI providerURL = getProviderURI();
        
        String scheme = providerURL.getScheme();
        if (scheme.equals(PacketTransportType.VM))
        {
            String engineName = providerURL.getHost();
            return FFMQEngine.getDeployedInstance(engineName).openQueueConnection(userName, password, clientID);
        }
        else 
        if (scheme.equals(PacketTransportType.TCP) ||
            scheme.equals(PacketTransportType.TCPS) ||
            scheme.equals(PacketTransportType.TCPNIO))
        {
            return new RemoteQueueConnection(providerURL, userName, password, clientID);
        }
        else
            throw new FFMQException("Unknown transport protocol : " + scheme,"INVALID_TRANSPORT_PROTOCOL");
    }
1051840
@Override
    public BifurcatedConsumerSession createBifurcatedConsumerSession(long id)

                    throws SISessionUnavailableException, SISessionDroppedException,
                    SIConnectionUnavailableException, SIConnectionDroppedException,
                    SIErrorException,
                    SINotAuthorizedException,
                    SIIncorrectCallException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConnection.tc, "createBifurcatedConsumerSession",
                        new Object[] { this, Long.valueOf(id) });

        // Check that the connection isn't closed.
        checkNotClosed();

        ConsumerSessionImpl session = findConsumerSession(id);

        // If the consumer session is null, throw a SISessionNotFoundException
        if (session == null)
        {
            // Add correct NLS trace
            SISessionUnavailableException e =
                            new SISessionUnavailableException(
                                            nls.getFormattedMessage(
                                                                    "CREATE_CONSUMER_ERROR_CWSIP0092",
                                                                    new Object[] { Long.valueOf(id),
                                                                                  _messageProcessor.getMessagingEngineName() },
                                                                    null));

            if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
                SibTr.exit(CoreSPIConnection.tc, "createBifurcatedConsumerSession", e);
            throw e;
        }

        if (!session.isBifurcatable())
        {
            SIIncorrectCallException e =
                            new SIIncorrectCallException(
                                            nls.getFormattedMessage(
                                                                    "CONSUMER_NOT_BIFURCATABLE_CWSIP0680",
                                                                    new Object[] { Long.valueOf(id) },
                                                                    null));

            if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
                SibTr.exit(CoreSPIConnection.tc, "createBifurcatedConsumerSession", e);
            throw e;
        }

        // Now we have the ConsumerSession, create a Bifurcated Consumer
        BifurcatedConsumerSessionImpl consumerSession = new BifurcatedConsumerSessionImpl(this, session);

        // Add the new Bifurcated consumer to the list.
        synchronized (_bifurcatedConsumers)
        {
            _bifurcatedConsumers.add(consumerSession);
        }

        // if security is enabled, audit the creation of the new session
        if (_isBusSecure)
        {
            AuthUtils sibAuthUtils = _messageProcessor.getAuthorisationUtils();

            // get the destination name from the session
            String destination = consumerSession.getDestinationAddress().getDestinationName();

            // call through to audit event for successful creation
            sibAuthUtils.createBifurcatedConsumerSessionAuthorizationPassed(_subject, destination, id);
        }

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConnection.tc, "createBifurcatedConsumerSession", consumerSession);

        return consumerSession;
    }
1186632
JmsSessionImpl instantiateSession(boolean transacted, int acknowledgeMode, SICoreConnection coreConnection, JmsJcaSession jcaSession) throws JMSException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "instantiateSession", new Object[]{transacted, acknowledgeMode, coreConnection, jcaSession});
    JmsQueueSessionImpl jmsQueueSession = new JmsQueueSessionImpl(transacted, acknowledgeMode, coreConnection, this, jcaSession);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "instantiateSession",  jmsQueueSession);
    return jmsQueueSession;
  }