United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6661448 Make the SNMP agent optional when OPENJDK=true and IMPORT_BINARY_PLUGS=false
JDK-6661448 : Make the SNMP agent optional when OPENJDK=true and IMPORT_BINARY_PLUGS=false

Details
Type:
Enhancement
Submit Date:
2008-02-11
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2008-02-14
Component:
core-svc
OS:
generic
Sub-Component:
javax.management
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
OpenJDK6
Fixed Versions:
OpenJDK6 (b06)

Related Reports
Relates:
Relates:

Sub Tasks

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

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.
                                     
2008-02-11
EVALUATION

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



Hardware and Software, Engineered to Work Together