Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 20832 invoked from network); 18 Feb 2004 10:00:21 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 18 Feb 2004 10:00:21 -0000 Received: (qmail 64951 invoked by uid 500); 18 Feb 2004 09:59:54 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 64825 invoked by uid 500); 18 Feb 2004 09:59:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 64812 invoked by uid 500); 18 Feb 2004 09:59:52 -0000 Received: (qmail 64809 invoked from network); 18 Feb 2004 09:59:52 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 18 Feb 2004 09:59:52 -0000 Received: (qmail 20813 invoked by uid 1360); 18 Feb 2004 10:00:17 -0000 Date: 18 Feb 2004 10:00:17 -0000 Message-ID: <20040218100017.20812.qmail@minotaur.apache.org> From: bayard@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/discovery/xdocs proposal.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bayard 2004/02/18 02:00:17 Added: discovery/xdocs proposal.xml Log: proposal.html converted to xml via script Revision Changes Path 1.1 jakarta-commons/discovery/xdocs/proposal.xml Index: proposal.xml =================================================================== Proposal for Service Discovery

The Discovery Component is about discovering, or finding, implementations for pluggable interfaces. It provides facilities intantiating classes in general, and for lifecycle management of singleton (factory) classes.

Fundamentally, Discovery locates classes that implement a given Java interface. The discovery pattern, though not necessarily this package, is used in many projects including JAXP (SaxParserFactory and others) and commons-logging (LogFactory). By extracting this pattern, other projects can (re)use it and take advantage of improvements to the pattern as Discovery evolves.

Discovery improves over previous implementations by establishing facilities for working within managed environments. These allow configuration and property overrides without appealing to the global System properties (which are scoped across an entire JVM).

This is not indended to be a replacement to be used strictly by the user, but rather a replacement to be used directly by projects. Use by the user is also reasonable, but limited due to 'keeping this simple'. In particular, there is no configuration for this discovery service, it relies soley on usage patterns.

Given a java.lang.Class parameter 'package.Class' that represents a fundamental service as either an interface, an abstract class (or even a regular class), find an implementation of that class:

  • Look for system property named 'package.Class', the value of which is the name of an implementation.
  • Look for a 'local' property named 'package.Class'...
  • Attempt JDK 1.3+ style discovery
  • Attempt to load a default implementation
In all cases, verify that the discovered implementation implements 'package.Class'.

The package should :

  • Have an API which should be as simple to use as possible
  • Be based on usage patterns, not specific configuration file
  • Represent proper discovery & class-loading principles
  • Be reasonably portable across JDK levels (1.1.8+?)

Services relies on:

  • Java Development Kit (Version 1.1 or later)
  • [by design] Nothing Else, particularly anything that would be classified as a 'service'.
  • CVS Repository - New directory discovery in the jakarta-commons-sandbox CVS repository.
  • Initial Committers - The list is provided below.
  • Mailing List - Discussions will take place on the general commons-dev@jakarta.apache.org mailing list. To help list subscribers identify messages of interest, it is suggested that the message subject of messages about this component be prefixed with [discovery].
  • Bugzilla - New component "discovery" under the "Commons" product category, with appropriate version identifiers as needed.
  • Jyve FAQ - New category "discovery" (when available).

The initial committers on the Service Discovery component shall be:

  • Richard A. Sitze
  • Costin Manoloche
  • Craig R. McClanahan
--------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org