JDK-6661448 : Make the SNMP agent optional when OPENJDK=true and IMPORT_BINARY_PLUGS=false
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: OpenJDK6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-02-11
  • Updated: 2010-07-29
  • Resolved: 2008-02-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
OpenJDK6 b06Fixed
Description
Make the SNMP agent optional when OPENJDK=true and IMPORT_BINARY_PLUGS=false
in order to avoid build breaks if the closed SNMP files are not availaible.

At runtime, the SNMP agent is activated only if -Dcom.sun.management.snmp.port=<port> is
present. The goal of this change is to allow to build a JDK that doesn't contain the
SNMP agent, and throws an UnsupportedOperationException if the 
-Dcom.sun.management.snmp.port=<port> is present.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/tl/jdk/rev/fa87de6b1ac3
18-03-2009

EVALUATION see: http://amos.france/jmgt/master/webrev/6open/webrev_6661448 The jdk/src/share/classes/sun/management/snmp packages depend on jdk/src/share/classes/com/sun/jmx/snmp and jdk/src/closed/share/classes/com/sun/jmx/snmp. However these packages are only referenced through the sun/management/Agent.java class which calls sun.management.snmp.AdaptorBootstrap.initialize(). The idea here is to: 1) use reflection to call sun.management.snmp.AdaptorBootstrap.initialize() 2) skip compilation of sun.management.snmp and com.sun.jmx.snmp when OPENJDK=true and IMPORT_BINARY_PLUGS=false This should produce a JDK with an rt.jar that doesn't contain the SNMP classes.
11-02-2008