hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <Richard.Hens...@McKesson.com>
Subject RE: Configuration Question
Date Wed, 24 Nov 2004 22:41:45 GMT
Assuming you are running two different instances of the application. I would
make an interface jar, customer a and customer b jar. The interface jar
would contain the service-point declarations, and the customer jars would
contains the implementation declarations.

Kind of like this

interfaces.jar!META-INF/hivemodule.xml

    <service-point id="ObjectFactory"
    interface="my.package.ObjectFactory">
    </service-point>

customera.jar!META-INF/hivemodule.xml

    <implementation service-id="my.package.ObjectFactory">
        <invoke-factory model="singleton"
service-id="hivemind.BuilderFactory">
            <construct
            class="my.package.customera.ObjectFactoryImpl">
            </construct>
        </invoke-factory>
    </implementation>

customerb.jar!META-INF/hivemodule.xml

    <implementation service-id="my.package.ObjectFactory">
        <invoke-factory model="singleton"
service-id="hivemind.BuilderFactory">
            <construct
            class="my.package.customerb.ObjectFactoryImpl">
            </construct>
        </invoke-factory>
    </implementation>

Depending on which customer you are configuring, you throw the correct jar
of implementations in the class path and away you go. We use it quite
sucessfully.

Richard

-----Original Message-----
From: Glen Stampoultzis [mailto:glens@ibsglobalweb.com] 
Sent: Wednesday, November 24, 2004 2:34 PM
To: hivemind-user@jakarta.apache.org
Subject: Configuration Question

I have the following situation.

We have one application code base that is configured differently for two 
(or more in the future) different customers.

Say I have interface Foo and two implementations that implement that 
interface - one for each customer.  What's the best way of configuring 
these sorts of differences?

Is there any way of saying in hivemind that I prefer one service 
implementation over another in HM?

Regards,

Glen Stampoultzis


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message