code: @Override
  	public void connect() {
  		try {
  
  			// Create JMS client and session
  			disconnect();
  			if (factory == null) {
  				try {
  					Context ctx = new InitialContext();
  					factory = (TopicConnectionFactory) ctx.lookup(connectionFactoryJndiName);
  				} catch (Exception cause) {
  					logger.error("TopicConnectionFactory is undefined and \"" + connectionFactoryJndiName
  							+ "\" JNDI value isn't available!");
  					reconnect(cause);
  					return;
  				}
  			}
  			if ((username == null || username.isEmpty()) && (password == null || password.isEmpty())) {
  				client = factory.createTopicConnection();
  			} else {
  				client = factory.createTopicConnection(username, password);
  			}
  			client.setClientID(nodeID);
  			client.start();
  			session = client.createTopicSession(transacted, acknowledgeMode);
  			connected();
  		} catch (Exception cause) {
  			reconnect(cause);
  		}
  	}
docs: --- CONNECT ---