I have come across a strange issue where SSL configuration of embedded jetty is working fine when i use server.join()
but is failing when i remove the join code.
I am using WrapperManager
from tanuki software to make it as a service which needs something to be returned from the Integer start(String[] args)
method and it is not possible as server.join
is a blocking call and it wait till the last thread kills.
I am just using regular SSLConnectionFactory
like below nothing much is added.
httpsConnector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, "http/1.1"),
new HttpConnectionFactory(httpsConf));
Any quick help to resolve the issue is really appreciated.
I am able to resolve the issue by creating new HTTPConfiguration object for HTTPS. i was using only one object and have passed http port as part of the new server() construtor which is actually causing the issue. Now the connector HTTP & HTTPS are working fine without server.join()