[JAVA-3656] Support Keep alive probes in Java 11+ Created: 10/Mar/20  Updated: 28/Oct/23  Resolved: 12/May/20

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: None
Fix Version/s: 4.1.0

Type: Improvement Priority: Major - P3
Reporter: Ross Lawley Assignee: John Stewart (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File mongo failure.png    
Issue Links:
Related
is related to JAVA-3829 Connection failure on OSGi environment Closed

 Description   

Investigate the possibility of adding ExtendedSocketOptions for users of java 11+

Similar to how the C driver handles additional connection options.

import java.net.Socket;
import jdk.net.ExtendedSocketOptions;
 
Socket socket = new Socket();
socket.setOption(ExtendedSocketOptions.TCP_KEEPIDLE, 300);
socket.setOption(ExtendedSocketOptions.TCP_KEEPCOUNT, 9);
socket.setOption(ExtendedSocketOptions.TCP_KEEPINTERVAL, 10);



 Comments   
Comment by Jeffrey Yemin [ 01/Sep/20 ]

Never mind, looks like you did already.  Thanks!

Comment by Jeffrey Yemin [ 01/Sep/20 ]

gawen57@gmail.com would you mind opening a new Jira ticket for this problem? 

Comment by Pierre-Louis JAEGER [ 01/Sep/20 ]

The build script seems to miss an Import-Package entry for jdk.net, which causes startup failure on OSGI environment.

Comment by Githook User [ 12/May/20 ]

Author:

{'name': 'John Stewart', 'email': 'john.stewart@mongodb.com', 'username': 'jstewart-mongo'}

Message: Support Keep alive probes in Java 11+

JAVA-3656
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/1db5680c00469332f24e5349ac75caad729995d8

Comment by Jeffrey Yemin [ 16/Mar/20 ]

One thing to determine is whether the driver should depend on anything in the jdk.net package, which is where ExtendedSocketOptions is.

Generated at Thu Feb 08 09:00:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.