You may want to publish a REST or a SOAP provider on a node other than the Connect GUI node. You may have this requirement in both single node and multiple nodes (clustered) environment. To achieve this, Adeptia Connect equips you with a feature to define a custom port and then publish the provider on that port. Doing this, you can have different web service providers running on different nodes.
The following section explains how to add a custom port and publish a provider on that port.
Defining custom port in Server.xml file
Follow the steps below to publish a web service provider to a custom port:
- Go to ...<ConnectPortalInstallfolder>/<conf> location.
- Open Server.xml file.
Define a custom port by adding and updating the following section:
Code Block <!-- <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="5000" scheme="https" secure="true" compressionMinSize="128" connectionTimeout="20000" maxConnections="10000" clientAuth="false" sslProtocol="TLSv1.2" sslEnabledProtocols="TLSv1.2" keystoreFile="./keystore/adeptiaBPM.keystore" keystoreType="JKS" keystorePass="password" compression="on" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,text/css,application/javascript,application/json" useSendfile="false" server="Adeptia" xpoweredby="false" />
In the code block, update the following parameters:
Parameter Value Connector Port Set the port number. Protocol Sets the protocol to handle incoming traffic. The default value is , the APR/native connector will be used. If the native library cannot be found or the attribute is not configured, the Java NIO based connector will be used HTTP/1.1
which uses an auto-switching mechanism to select either a Java NIO based connector or an APR/native based connector. If thePATH
(Windows) orLD_LIBRARY_PATH
(on most unix systems) environment variables contain the Tomcat native library, and theAprLifecycleListener
that is used to initialize APR has itsuseAprConnector
attribute set totrue
.
Note that the APR/native connector has different settings for HTTPS than the Java connectors.Max thread The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 200. If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool. Note that if an executor is configured any value set for this attribute will be recorded correctly but it will be reported (e.g. via JMX) as -1
to make clear that it is not used.SSLEnabled Use this attribute to enable SSL traffic on a connector. To turn on SSL handshake/encryption/decryption on a connector set this value to
true
. The default value isfalse
. When turning this valuetrue
you will want to set thescheme
and thesecure
attributes as well to pass the correctrequest.getScheme()
andrequest.isSecure()
values to the servlets See SSL Support for more information.Scheme Set this attribute to the name of the protocol you wish to have returned by calls to request. getScheme(). For example, you would set this attribute to " https
" for an SSL Connector. The default value is "http
".Secure Set this attribute to true
if you wish to have calls torequest.isSecure()
to to returntrue
for requests received by this Connector. You would want this on an SSL Connector or a non SSL connector that is receiving data from a SSL accelerator, like a crypto card, an SSL appliance or even a webserver. The default value isfalse
.ClientAuth This is an alias for the certificateVerification
attribute of the SSLHostConfig element with thehostName
of_default_
. If this SSLHostConfig element is not explicitly defined, it will be createdPut the value as true or false.SSLProtocol JSSE only.
The SSL protocol(s) to use (a single value may enable multiple protocols - see the JVM documentation for details). If not specified, the default is
TLS
. The permitted values may be obtained from the JVM documentation for the allowed values for algorithm when creating anSSLContext
instance e.g. Oracle Java 7. Note: There is overlap between this attribute andprotocols
.
Info You can add multiple ports by adding the code block in the respective SoapService and RestService sections.
In case of the clustered environment, you need to define the custom ports on every node.
Save the file.
Restart the Connect Portal.
Once you have added the ports in the Server.xml file, they will be visible in the Select Port drop-down list while creating or editing the REST and SOAP Provider.Select the port number other than the default port (Connect GUI port) while creating or editing a provider.
You can publish only on one port at a time.- Click Yes, Publish it to confirm.
Once published, a confirmation message is displayed.