Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4640520
Votes 25
Synopsis java.util.Service
Category java:classes_util
Reported Against 1.4 , 1.4.2 , tiger
Release Fixed mustang(b57)
State 10-Fix Delivered, request for enhancement
Priority: 4-Low
Related Bugs 6305490 , 6321772 , 4259309 , 4456679 , 4485419 , 4700172 , 5014358 , 5037220
Submit Date 20-FEB-2002
Description
The JAR file format was extended in JDK 1.3 to support a standard way of
specifying pluggable "service providers" in a special META-INF file (see
http://java.sun.com/j2se/1.4/docs/guide/jar/jar.html#Service%20Provider for
details).  Many subsystems in the platform now use this feature, including
sound, security, networking, naming, new I/O, image I/O, printing, input
methods, and XML.  Most (though not all) of these subsystems use the internal
sun.misc.Service class, which defines a simple mechanism for looking up
services and instantiating providers.

We should refine the sun.misc.Service class as needed and then promote it into
the java.util package.  This will make it easier for both internal and external
developers to make use of the META-INF/services feature, which has become very
widely used.
Work Around
JSR 199, the compiler/tool API, provides javax.tools.ToolProvider
which exposes some of the functionality of sun.misc.Service.
Evaluation
Under development for Mustang.
Posted Date : 2005-09-08 19:42:11.0

Integrated for Mustang b57.
Posted Date : 2005-10-11 04:15:35.0
Comments
  
  Include a link with my name & email   

Submitted On 16-AUG-2002
6tr6tr
PLEASE, make this a part of the standard API! It is basically 
useless otherwise, as every implementation of this can have 
whatever interface they wish for FINDING service providers! 
That negates the use of even having this as a part of the 
spec.


Submitted On 03-SEP-2002
bernddutkowski
Why not use this with Swing PLaF?


Submitted On 03-NOV-2002
eide
Perhaps a more orthogonal approach is to group it with the 
java.lang.Package class, or to create a new package of 
clases dealing exclusively with the JAR meta-inf directory.


Submitted On 21-NOV-2003
cpell
javax.imageio.spi.ServiceRegistry can be used to perform
service provider lookups (for any service, not just Image
I/O).  I would consider this RFE satisfied if
ServiceRegistry were simply "moved" to java.util or
java.util.jar (in the same sense KeyStroke was "moved" from
javax.swing to java.awt using backward-compatible inheritance).


Submitted On 13-FEB-2005
MartDesruisseaux
My votes are alread used for other RFE. Hope a positive comments may count be considered as some kind of vote. At the very least, I would like to see sun.misc.ServiceConfigurationError replaced by some kind of Exception documented in javax.imageio.spi.ServiceRegistry.lookupProvider, so we can catch it in a more reliable way (we want a way to avoid stopping the application when a service is not available).


Submitted On 11-OCT-2005
CurtCox
See also:

JSR 277: Java Module System
http://www.jcp.org/en/jsr/detail?id=277

OSGi
http://www.aqute.biz/osgi.html



PLEASE NOTE: JDK6 is formerly known as Project Mustang