I am configuring jacorb to use with SSL. The server/client ports picked are random. I need to specify a range of ports much like PortRangeSocketFactory/PortRangeServerSocketFactory in case of non-SSL configuration.
I am trying to avoid OASSLPort property, as the port becomes fixed (instead of range) and applicable for only server/listening ports. Client ports will still be random.
I have a set of processes, some acting as both server and client- with jacorb.properties shared.
Current jacorb.properties configuration:
jacorb.ssl.socket_factory=org.jacorb.security.ssl.sun_jsse.SSLSocketFactory
jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory
I am using Jacorb 3.9, RHEL 7.3 and Java 1.8.0_171.
Achieved this by writing custom factories:
configure() overridden to also read the min/max port config from jacorb.properties.
createServerSocket() overridden to handle port selection. Logic imported from org.jacorb.orb.factory.PortRangeServerSocketFactory.
Handled multi-homed cases for both via the OAIAddr property.
Pros: Lot of customization possible. Cons: Minimal code usage as many attributes and methods whose logic was implemented were private.