You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Dave Smith <di...@gmail.com> on 2004/12/28 01:11:21 UTC

Service Point Aliasing

Greetings,

I'm interested in creating an alias from one service point to another.
Consider the following scenario:

* Interfaces (A,B) exist where B is an extension of A.
* Some parts of the code only know about interface A, so they ask for
A by that name.
* "Advanced" pieces of code know that B exists and ask for that
interface accordingly.
* Only one implementation of A,B should exist (in the runtime) at any
given time.

The closest I've been able to come in implementing this scenario is to
use <invoke-factory> and define a custom ServiceImplementationFactory
that calls module.getService() to get the handle on the service I
want. Unfortunately I'm not sure what impact/strangness this
introduces with different service models -- ideally the alias forcibly
uses the servicemodel  from the target.

Put another way, I'd like to get something along the following lines:

service point B == instance of B_Impl
service point A == alias to B 

Can anyone provide some guidance on the "right" way to solve this problem? 

Thanks,

D.

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