docs: private TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal, boolean isSharedDurable, boolean isNonSharedDurable) throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "createDurableSubscriber", new Object[] { topic, name, messageSelector, noLocal, isSharedDurable, isNonSharedDurable });
  
          checkNotClosed();
          if (topic == null) {
              throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                             "INVALID_VALUE_CWSIA0048",
                                                                             new Object[] { "Topic", "null" },
                                                                             tc
                              );
          }
  
          if ((name == null) || ("".equals(name))) {
              throw (InvalidDestinationException) JmsErrorUtils.newThrowable(InvalidDestinationException.class,
                                                                             "INVALID_VALUE_CWSIA0048",
                                                                             new Object[] { "name", 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(topic);
  
          // Check that this destination is not blocked
          JmsDestinationImpl.checkBlockedStatus(nativeDest);
  
          //client ID check should be there for only for non-shared. For shared client ID should be optional
          String clientID = connection.getClientID();
          if (isNonSharedDurable) {
              if ((clientID == null) || ("".equals(clientID))) {
                  throw (IllegalStateException) JmsErrorUtils.newThrowable(IllegalStateException.class,
                                                                           "INVALID_VALUE_CWSIA0048",
                                                                           new Object[] { "clientID", clientID },
                                                                           tc
                                  );
              }
          }
  
          // Look up the subscription home that was set on the ConnectionFactory
          // at the point when the Connection was created.
          String durSubHome = (String) passThruProps.get(JmsraConstants.DURABLE_SUB_HOME);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              SibTr.debug(this, tc, "DurableSubHome : " + durSubHome);
  
          // We demand that if durable subscriptions are being used then the user
          // must have specified a durable subscription home on the ConnectionFactory
          // before they create the connection.
          if ((durSubHome == null) || ("".equals(durSubHome))) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(this, tc, "User Error - No durableSubscriptionHome was specified.");
              throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                                 "DURABLE_SUB_HOME_NOT_SPECIFIED_CWSIA0056",
                                                                                 null,
                                                                                 tc
                              );
          }
  
          // Now determine whether or not we are running in a cloned environment.
          String sharedSubs = (String) passThruProps.get(JmsInternalConstants.SHARE_DSUBS);
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              SibTr.debug(this, tc, "shareDurableSubs: " + sharedSubs);
          boolean supportsMultiple = false;
          if ((sharedSubs == null)
              || ("".equals(sharedSubs))
              || (ApiJmsConstants.SHARED_DSUBS_IN_CLUSTER.equals(sharedSubs))) {
              // The application asked us to work it out for ourselves (default)
              boolean isCloned = JmsConnectionImpl.isClonedServer();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(this, tc, "isClonedServer: " + isCloned);
              // Pass the cloned state in as the instruction to support
              // multiple consumers on this durable subscription.
              supportsMultiple = isCloned;
          }
          else if (ApiJmsConstants.SHARED_DSUBS_ALWAYS.equals(sharedSubs)) {
              // The application stated explicitly it wants to share.
              supportsMultiple = true;
          }
          else {
              // The safe behaviour is to not support multiple consumers.
              supportsMultiple = false;
          }
  
          //if the call is made from createSharedDurableConsumer, set supportsMultiple to true
          //otherwise leaving the property as it is
          if (isSharedDurable)
              supportsMultiple = true;
  
          //if the call is made from CreateSharedConsumer i.e non-shared durable then
          //set supportsMultiple to false, otherwise leaving the property as it is
          if (isNonSharedDurable)
              supportsMultiple = false;
  
          // 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
                          clientID, // ClientID
                          supportsMultiple,// SupportMultiple
                          durSubHome // DurableSubscriptionHome
          );
  
          TopicSubscriber durableSubscriber = new JmsDurableSubscriberImpl(coreConnection, this, newProps);
          // newly created consumer is synchronous
          syncConsumers.add(durableSubscriber);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "createDurableSubscriber", durableSubscriber);
          return durableSubscriber;
      }