[JAVA-4005] Remove hard dependency on jdk.net.ExtendedSocketOptions Created: 09/Feb/21  Updated: 28/Oct/23  Resolved: 25/Feb/21

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

Type: Bug Priority: Major - P3
Reporter: Ross Lawley Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It may not be available.

Alternatively document for JNDI users that they may need to add it to their deployment dependencies:

 
<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="deployment.war" services="import"/>
      <system export="true">
        <paths>
          <path name="jdk/net"/>
        </paths>
      </system>
    </dependencies>
  </deployment>
</jboss-deployment-structure>



 Comments   
Comment by Githook User [ 25/Feb/21 ]

Author:

{'name': 'jyemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove assumption that jdk.net package is available

This commit removes any assumptions that jdk.net.ExtendedSocketOptions
is available at all at runtime, since the jdk.net package is not actually
part of the standard library (though in practice it is usually available).
If it's not available, no TCP keep-alive options will be set, but socket
creation will proceed instead of failing with a ClassNotFoundException.

JAVA-4005
Branch: 4.2.x
https://github.com/mongodb/mongo-java-driver/commit/a75be45711c08bfe761d1dcec5530d1196806701

Comment by Githook User [ 25/Feb/21 ]

Author:

{'name': 'jyemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove assumption that jdk.net package is available

This commit removes any assumptions that jdk.net.ExtendedSocketOptions
is available at all at runtime, since the jdk.net package is not actually
part of the standard library (though in practice it is usually available).
If it's not available, no TCP keep-alive options will be set, but socket
creation will proceed instead of failing with a ClassNotFoundException.

JAVA-4005
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/86d806476c6fa13bacd1934c2ec4466ac5c0f5b9

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