From hivemind-user-return-389-apmail-jakarta-hivemind-user-archive=jakarta.apache.org@jakarta.apache.org Mon Nov 01 23:44:18 2004 Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 76987 invoked from network); 1 Nov 2004 23:44:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Nov 2004 23:44:18 -0000 Received: (qmail 58324 invoked by uid 500); 1 Nov 2004 23:44:18 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 58185 invoked by uid 500); 1 Nov 2004 23:44:16 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: hivemind-user@jakarta.apache.org Delivered-To: mailing list hivemind-user@jakarta.apache.org Delivered-To: moderator for hivemind-user@jakarta.apache.org Received: (qmail 74232 invoked by uid 99); 1 Nov 2004 21:44:04 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of david@davidkarlsen.com designates 217.13.8.30 as permitted sender) Message-ID: <4186AE18.9000301@davidkarlsen.com> Date: Mon, 01 Nov 2004 22:43:52 +0100 From: "David J. M. Karlsen" User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hivemind-user@jakarta.apache.org Subject: service+configuration - how? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi! I currently use hivemind to retreive instances of interface-implementations. (instanciation of a class for the service-interface). I'd like to combine this with some specific properties for configuring the implementation. I find the examples on configuration-points and contributions somewhat hard to understand. (It seems that I have to create a separate class for the config - and call this from the implementation - instead of declaring it all in the Hivemind config-file). What I would like is some private static variables in the implementation-class to be set when instanciated. Lets's say this is the iface: interface IMyService { public void methodA(); } and the implementation: public class MyService implements IMyService{ final static private String aStringProp; final static private Integer anIntegerProp; public void methodA(){ //do something } } how could I do this the easiest way through the use of HiveMind, such that when I retrieve the service through the registry, the constructed object would automatically have it's properties set? I'd rather avoid having a separate class for configuration as I find this too fine-grained. Thanks in advance - and thanks for a great API! Kind regards, David Karlsen --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org