Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8217412

deprecate rmic for removal

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None

      Description

      Rmic is the stub compiler for static RMI stubs. The rmic tool should be deprecated for removal, and eventually removed from the JDK.

      Getting rid of static stubs entirely is fairly difficult. There are two versions of static stubs, v1.1 and v1.2. They have corresponding wire protocols, mainly driven by the serialized form of the stubs. These in turn differ from the serialized form of dynamic stubs, which are Proxy objects. Thus, retiring static stubs implies that various wire protocols also be retired.

      For maximum compatibility, the built-in RMI Registry and DGC services use the oldest version of stubs, along with rmic-generated skeletons, which are used only in the v1.1 version. The generated stubs and skeletons for these services are checked into the source repo and are maintained by hand:

       - sun.rmi.registry.RegistryImpl_Stub
       - sun.rmi.transport.DGCImpl_Stub

      Other services in the JDK use static stubs that are generated at build time, using the v1.2 version. These services include the following, along with the Stub APIs, some of which (marked with *) are also part of Java SE:

      RMI Activation (module java.rmi)
       - java.rmi.activation.ActivationGroup_Stub (*)
       - sun.rmi.server.Activation$ActivationSystemImpl_Stub
      JMX (module java.management.rmi)
       - javax.management.remote.rmi.RMIConnectionImpl_Stub (*)
       - javax.management.remote.rmi.RMIServerImpl_Stub (*)
      JNDI (module jdk.naming.rmi)
       - com.sun.jndi.rmi.registry.ReferenceWrapper_Stub

      It is possible to remove static stubs entirely only after these services have been deprecated and removed.

      One possibility is to generate the stub code and check it into the repo for these services as well. This would remove the need for rmic entirely, but static stubs support would need to remain in the JDK runtime.

      A possible intermediate step is to remove rmic from the publicly supported tools, and let it remain as an internal build-only tool. This will require little change to the affected client areas, but it would still reduce the "surface area" of the JDK.

        Attachments

          Activity

            People

            • Assignee:
              smarks Stuart Marks
              Reporter:
              smarks Stuart Marks
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: