JDK-4485419 : There should be easier pluggability for Java extensions
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.module
  • Affected Version: 1.3.1
  • Priority: P5
  • Status: Resolved
  • Resolution: Other
  • OS: generic
  • CPU: generic
  • Submitted: 2001-07-27
  • Updated: 2015-01-06
  • Resolved: 2015-01-06
Related Reports
Relates :  
Description

Name: bsC130419			Date: 07/27/2001


java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)


You should work harder to achive better pluggability for Java extensions and
3rd party drivers and implementations. The goal should be that it is enough
with adding one (or a couple) JAR files to the CLASSPATH (or drop them in the
jre/lib/ext/ directory), the user shouldn't have to edit any property files, or
use any system properties. And the application shouldn't have to do something
with the implementation classes directly.

One way to acheive this can be to use the JAR Services API.

Some example of bad pluggability:

* JSSE 1.0.2 reference implementation requires you to edit the
jre/lib/security/java.security property file.

* To use an JDBC driver, you have to either set some system property or have
the application to explicitly load an implemenation class. It should be enough
with an JDBC URL with an unique scheme name.

* Handlers for URL schemes requires a property to be set (e.g. the "https"
handler in JSSE).

* You have to specify a bunch of properties in order to use 3rd party JNDI
implementations. It should be enough with an URL. And in this case, there
should be a constructor to javax.naming.InitialContext taking an URL.
(Review ID: 128580) 
======================================================================

Comments
This issue is >13 years old and pre-dates ServiceLoader (in Java SE 6) and a multitude of service provider interfaces that have been added to the platform since the issue was submitted.
06-01-2015

I think most of the issues outlined here have been addressed, and the remaining would be addressed by jigsaw. Could you please update and close this as required.
06-06-2013

WORK AROUND Name: bsC130419 Date: 07/27/2001 There is no general workaround for this, you have to deal with each case individually. ======================================================================
11-06-2004

EVALUATION Yes, J2SE could do better at this. We are, in fact, looking at providing an explicit API for the jar service-provider convention (4640520). Configuring and using JSSE is less of a problem in 1.4 and later releases since JSSE is now part of the platform. -- ###@###.### 2003/1/31
01-11-0197