You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Igor Laberov <ig...@qlusters.com> on 2005/04/26 13:48:12 UTC

ClassLoader question

Hi all,
Is it possible to load different (group of)components in separate class
loaders?
This is especially important in cases when 2 components are using
different versions of the same third-party library

Thank you,
Igor Laberov
Qlusters, Inc.


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


Re: Multiple implementations for service

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Igor,

You can have two service implementations, just now with the same service  
id.  And the user can then choose which service to use (and retrieve)  
using the different ids.

Johan

On 28 Apr 2005 17:10:49 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> These 2 options don't allow to have more than one service implementation
> in the same time.
> Current Registry interface doesn't allow this, because it have only
> getService() that returns single implementation only.
>
> Is it possible to override Registry service?
>
> Thanks,
> Igor
>
> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
>> Two options - have two service points (same service interface is  
>> allowed,
>> just name the service point will be have to differ) or use the override
>> functionality (http://jakarta.apache.org/hivemind/current/override.html)
>>
>> Cheers,
>>
>> Johan
>>
>> On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> wrote:
>>
>> > Hi again,
>> > In our application we want to have multiple implementation classes for
>> > one service. So .xml file will look like
>> > <service-point id="Part" />
>> >  <implementation service-id="Part">
>> >    <create-instance class="one.PartImpl"/>
>> > </implementation>
>> > <implementation service-id="Part">
>> >    <create-instance class="two.PartImpl"/>
>> > </implementation>
>> >
>> > At startup user will choose implementation that he want to work with
>> > (and its id will be stored), and later user operations will be
>> > associated with selected implementation.
>> >
>> > As I see from RegistryBuilder code, it is not allowed to have 2
>> > implementation.
>> > Can you point me to other way having several service implementation?  
>> Or
>> > may be I can override some system service?
>> >
>> > Thank you,
>> > Igor Laberov
>> > Qlusters, Inc.
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>> >
>> >
>>
>>
>>
>> --
>> you too?
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
you too?

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


Re: Multiple implementations for service

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
That would be better - even better yet would be to return a hint defined  
by the implementation (in addition to the service id) ... But that would  
mean additions to the service schema definitions, which is a bigger job ...

Johan

On Thu, 28 Apr 2005 11:09:08 -0400, James Carman  
<ja...@carmanconsulting.com> wrote:

> Johan,
>
> I imagined that the return values would be serviceIds.  So, the method  
> name
> would be better as...
>
> public List getServiceIds( Class serviceInterface );
>
> That would be quite trivial to do.
>
> James
>
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk]
> Sent: Thursday, April 28, 2005 11:08 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Multiple implementations for service
>
>
> If you got a list of interfaces, which instance would you use in that
> case?  The criteria for the service that you are interested need to be
> specified somehow (as james mentions)
>
> You can solve this to an extent by defining a configuration point that
> collects all service instances and allow you to write a factory that
> provides the implementations that you need:
>
> FooFactory fooFactory = registry.getService(FooFactory.class);
> Foo foo = (Foo)fooFactory.getFoo(<some-criteria>)
>
> Johan
>
> On 28 Apr 2005 17:51:31 +0300, Igor Laberov <ig...@qlusters.com> wrote:
>
>> Now I see your point, it much more clear now :)
>>
>> The only issue that is still opened  - ability to get list of services
>> that implement the same interface, something like that:
>>     public List getServices(Class interfaceClass){
>>         List l = (List) _servicePointsByInterface.get(interfaceClass);
>>         return l;
>>     }
>>
>> Is it possible to add getServices(Class) to Registry interface?
>>
>> On Thu, 2005-04-28 at 17:19, James Carman wrote:
>>> So, you want to allow the users to choose which implementation type
>>> they want, right?  Then, define two different service points with the
>>> same interface, but give them different ids (of course) corresponding
>>> to the different implementations.  Another approach would involve  
>>> writing
> your
>>> own
>>> service model which chooses which implementation type to instantiate
>>> using
>>> some sort of thread-local parameter (which you'd have to set prior to
>>> invoking of course).
>>>
>>> -----Original Message-----
>>> From: Igor Laberov [mailto:igorl@qlusters.com]
>>> Sent: Thursday, April 28, 2005 10:11 AM
>>> To: hivemind-user@jakarta.apache.org
>>> Subject: Re: Multiple implementations for service
>>>
>>>
>>> These 2 options don't allow to have more than one service
>>> implementation in
>>> the same time. Current Registry interface doesn't allow this, because  
>>> it
>>> have only
>>> getService() that returns single implementation only.
>>>
>>> Is it possible to override Registry service?
>>>
>>> Thanks,
>>> Igor
>>>
>>> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
>>> > Two options - have two service points (same service interface is
>>> > allowed, just name the service point will be have to differ) or use
>>> > the
>>> override
>>> > functionality
>>> (http://jakarta.apache.org/hivemind/current/override.html)
>>> >
>>> > Cheers,
>>> >
>>> > Johan
>>> >
>>> > On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com>
>>> > wrote:
>>> >
>>> > > Hi again,
>>> > > In our application we want to have multiple implementation
>>> > > classes for one service. So .xml file will look like
>>> > > <service-point id="Part" />  <implementation service-id="Part">
>>> > >    <create-instance class="one.PartImpl"/> </implementation>
>>> > > <implementation service-id="Part">
>>> > >    <create-instance class="two.PartImpl"/>
>>> > > </implementation>
>>> > >
>>> > > At startup user will choose implementation that he want to work
>>> > > with (and its id will be stored), and later user operations will
>>> > > be associated with selected implementation.
>>> > >
>>> > > As I see from RegistryBuilder code, it is not allowed to have 2
>>> > > implementation. Can you point me to other way having several
>>> > > service implementation? Or may be I can override some system
>>> > > service?
>>> > >
>>> > > Thank you,
>>> > > Igor Laberov
>>> > > Qlusters, Inc.
>>> > >
>>> > >
>>> > >
>>> > > -----------------------------------------------------------------
>>> > > ---
>>> > > -
>>> > > To unsubscribe, e-mail:  
>>> hivemind-user-unsubscribe@jakarta.apache.org
>>> > > For additional commands, e-mail:
>>> hivemind-user-help@jakarta.apache.org
>>> > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > you too?
>>> >
>>> > -------------------------------------------------------------------
>>> > --
>>> > 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
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>



-- 
you too?

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


RE: Multiple implementations for service

Posted by James Carman <ja...@carmanconsulting.com>.
Johan,

I imagined that the return values would be serviceIds.  So, the method name
would be better as...

public List getServiceIds( Class serviceInterface );

That would be quite trivial to do.

James

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Thursday, April 28, 2005 11:08 AM
To: hivemind-user@jakarta.apache.org
Subject: Re: Multiple implementations for service


If you got a list of interfaces, which instance would you use in that  
case?  The criteria for the service that you are interested need to be  
specified somehow (as james mentions)

You can solve this to an extent by defining a configuration point that  
collects all service instances and allow you to write a factory that  
provides the implementations that you need:

FooFactory fooFactory = registry.getService(FooFactory.class);
Foo foo = (Foo)fooFactory.getFoo(<some-criteria>)

Johan

On 28 Apr 2005 17:51:31 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Now I see your point, it much more clear now :)
>
> The only issue that is still opened  - ability to get list of services 
> that implement the same interface, something like that:
>     public List getServices(Class interfaceClass){
>         List l = (List) _servicePointsByInterface.get(interfaceClass);
>         return l;
>     }
>
> Is it possible to add getServices(Class) to Registry interface?
>
> On Thu, 2005-04-28 at 17:19, James Carman wrote:
>> So, you want to allow the users to choose which implementation type 
>> they want, right?  Then, define two different service points with the 
>> same interface, but give them different ids (of course) corresponding 
>> to the different implementations.  Another approach would involve writing
your
>> own
>> service model which chooses which implementation type to instantiate  
>> using
>> some sort of thread-local parameter (which you'd have to set prior to
>> invoking of course).
>>
>> -----Original Message-----
>> From: Igor Laberov [mailto:igorl@qlusters.com]
>> Sent: Thursday, April 28, 2005 10:11 AM
>> To: hivemind-user@jakarta.apache.org
>> Subject: Re: Multiple implementations for service
>>
>>
>> These 2 options don't allow to have more than one service
>> implementation in
>> the same time. Current Registry interface doesn't allow this, because it
>> have only
>> getService() that returns single implementation only.
>>
>> Is it possible to override Registry service?
>>
>> Thanks,
>> Igor
>>
>> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
>> > Two options - have two service points (same service interface is 
>> > allowed, just name the service point will be have to differ) or use 
>> > the
>> override
>> > functionality
>> (http://jakarta.apache.org/hivemind/current/override.html)
>> >
>> > Cheers,
>> >
>> > Johan
>> >
>> > On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com>
>> > wrote:
>> >
>> > > Hi again,
>> > > In our application we want to have multiple implementation 
>> > > classes for one service. So .xml file will look like 
>> > > <service-point id="Part" />  <implementation service-id="Part">
>> > >    <create-instance class="one.PartImpl"/> </implementation>
>> > > <implementation service-id="Part">
>> > >    <create-instance class="two.PartImpl"/>
>> > > </implementation>
>> > >
>> > > At startup user will choose implementation that he want to work 
>> > > with (and its id will be stored), and later user operations will 
>> > > be associated with selected implementation.
>> > >
>> > > As I see from RegistryBuilder code, it is not allowed to have 2 
>> > > implementation. Can you point me to other way having several 
>> > > service implementation? Or may be I can override some system 
>> > > service?
>> > >
>> > > Thank you,
>> > > Igor Laberov
>> > > Qlusters, Inc.
>> > >
>> > >
>> > >
>> > > -----------------------------------------------------------------
>> > > ---
>> > > -
>> > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail:  
>> hivemind-user-help@jakarta.apache.org
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > you too?
>> >
>> > -------------------------------------------------------------------
>> > --
>> > 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
you too?

---------------------------------------------------------------------
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


Re: Multiple implementations for service

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
If you got a list of interfaces, which instance would you use in that  
case?  The criteria for the service that you are interested need to be  
specified somehow (as james mentions)

You can solve this to an extent by defining a configuration point that  
collects all service instances and allow you to write a factory that  
provides the implementations that you need:

FooFactory fooFactory = registry.getService(FooFactory.class);
Foo foo = (Foo)fooFactory.getFoo(<some-criteria>)

Johan

On 28 Apr 2005 17:51:31 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Now I see your point, it much more clear now :)
>
> The only issue that is still opened  - ability to get list of services
> that implement the same interface, something like that:
>     public List getServices(Class interfaceClass){
>         List l = (List) _servicePointsByInterface.get(interfaceClass);
>         return l;
>     }
>
> Is it possible to add getServices(Class) to Registry interface?
>
> On Thu, 2005-04-28 at 17:19, James Carman wrote:
>> So, you want to allow the users to choose which implementation type they
>> want, right?  Then, define two different service points with the same
>> interface, but give them different ids (of course) corresponding to the
>> different implementations.  Another approach would involve writing your  
>> own
>> service model which chooses which implementation type to instantiate  
>> using
>> some sort of thread-local parameter (which you'd have to set prior to
>> invoking of course).
>>
>> -----Original Message-----
>> From: Igor Laberov [mailto:igorl@qlusters.com]
>> Sent: Thursday, April 28, 2005 10:11 AM
>> To: hivemind-user@jakarta.apache.org
>> Subject: Re: Multiple implementations for service
>>
>>
>> These 2 options don't allow to have more than one service  
>> implementation in
>> the same time. Current Registry interface doesn't allow this, because it
>> have only
>> getService() that returns single implementation only.
>>
>> Is it possible to override Registry service?
>>
>> Thanks,
>> Igor
>>
>> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
>> > Two options - have two service points (same service interface is
>> > allowed,
>> > just name the service point will be have to differ) or use the  
>> override
>> > functionality  
>> (http://jakarta.apache.org/hivemind/current/override.html)
>> >
>> > Cheers,
>> >
>> > Johan
>> >
>> > On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com>
>> > wrote:
>> >
>> > > Hi again,
>> > > In our application we want to have multiple implementation classes
>> > > for one service. So .xml file will look like <service-point
>> > > id="Part" />  <implementation service-id="Part">
>> > >    <create-instance class="one.PartImpl"/>
>> > > </implementation>
>> > > <implementation service-id="Part">
>> > >    <create-instance class="two.PartImpl"/>
>> > > </implementation>
>> > >
>> > > At startup user will choose implementation that he want to work with
>> > > (and its id will be stored), and later user operations will be
>> > > associated with selected implementation.
>> > >
>> > > As I see from RegistryBuilder code, it is not allowed to have 2
>> > > implementation. Can you point me to other way having several service
>> > > implementation? Or may be I can override some system service?
>> > >
>> > > Thank you,
>> > > Igor Laberov
>> > > Qlusters, Inc.
>> > >
>> > >
>> > >
>> > > --------------------------------------------------------------------
>> > > -
>> > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail:  
>> hivemind-user-help@jakarta.apache.org
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > you too?
>> >
>> > ---------------------------------------------------------------------
>> > 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
you too?

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


RE: Multiple implementations for service

Posted by James Carman <ja...@carmanconsulting.com>.
Yes, of course it's possible, and it would take all of about 20 mins to
implement (if it's as easy as I think it is).  The question would be whether
the other committers feel that it's worthy of inclusion.  It sounds
reasonable enough to me, since we already added the containsService( Class )
method.  Why don't you fill out a JIRA request and we'll discuss.  You've
got my vote. :-)  If the others agree, I'll implement it myself for you
sometime by EOD today.  Ok?

-----Original Message-----
From: Igor Laberov [mailto:igorl@qlusters.com] 
Sent: Thursday, April 28, 2005 10:52 AM
To: hivemind-user@jakarta.apache.org
Subject: RE: Multiple implementations for service


Now I see your point, it much more clear now :)

The only issue that is still opened  - ability to get list of services that
implement the same interface, something like that:
    public List getServices(Class interfaceClass){
        List l = (List) _servicePointsByInterface.get(interfaceClass);
        return l;
    }

Is it possible to add getServices(Class) to Registry interface?

On Thu, 2005-04-28 at 17:19, James Carman wrote:
> So, you want to allow the users to choose which implementation type 
> they want, right?  Then, define two different service points with the 
> same interface, but give them different ids (of course) corresponding 
> to the different implementations.  Another approach would involve 
> writing your own service model which chooses which implementation type 
> to instantiate using some sort of thread-local parameter (which you'd 
> have to set prior to invoking of course).
> 
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com]
> Sent: Thursday, April 28, 2005 10:11 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Multiple implementations for service
> 
> 
> These 2 options don't allow to have more than one service 
> implementation in the same time. Current Registry interface doesn't 
> allow this, because it have only
> getService() that returns single implementation only.
> 
> Is it possible to override Registry service?
> 
> Thanks,
> Igor
> 
> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
> > Two options - have two service points (same service interface is
> > allowed,
> > just name the service point will be have to differ) or use the override

> > functionality (http://jakarta.apache.org/hivemind/current/override.html)
> > 
> > Cheers,
> > 
> > Johan
> > 
> > On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com>
> > wrote:
> > 
> > > Hi again,
> > > In our application we want to have multiple implementation classes
> > > for one service. So .xml file will look like <service-point 
> > > id="Part" />  <implementation service-id="Part">
> > >    <create-instance class="one.PartImpl"/>
> > > </implementation>
> > > <implementation service-id="Part">
> > >    <create-instance class="two.PartImpl"/>
> > > </implementation>
> > >
> > > At startup user will choose implementation that he want to work 
> > > with
> > > (and its id will be stored), and later user operations will be 
> > > associated with selected implementation.
> > >
> > > As I see from RegistryBuilder code, it is not allowed to have 2
> > > implementation. Can you point me to other way having several service 
> > > implementation? Or may be I can override some system service?
> > >
> > > Thank you,
> > > Igor Laberov
> > > Qlusters, Inc.
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > -
> > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> > >
> > >
> > 
> > 
> > 
> > --
> > you too?
> > 
> > --------------------------------------------------------------------
> > -
> > 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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



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


RE: Multiple implementations for service

Posted by Igor Laberov <ig...@qlusters.com>.
Now I see your point, it much more clear now :)

The only issue that is still opened  - ability to get list of services
that implement the same interface, something like that:
    public List getServices(Class interfaceClass){
        List l = (List) _servicePointsByInterface.get(interfaceClass);
        return l;
    }

Is it possible to add getServices(Class) to Registry interface?

On Thu, 2005-04-28 at 17:19, James Carman wrote:
> So, you want to allow the users to choose which implementation type they
> want, right?  Then, define two different service points with the same
> interface, but give them different ids (of course) corresponding to the
> different implementations.  Another approach would involve writing your own
> service model which chooses which implementation type to instantiate using
> some sort of thread-local parameter (which you'd have to set prior to
> invoking of course).  
> 
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com] 
> Sent: Thursday, April 28, 2005 10:11 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Multiple implementations for service
> 
> 
> These 2 options don't allow to have more than one service implementation in
> the same time. Current Registry interface doesn't allow this, because it
> have only
> getService() that returns single implementation only.
> 
> Is it possible to override Registry service?
> 
> Thanks,
> Igor
> 
> On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
> > Two options - have two service points (same service interface is 
> > allowed,
> > just name the service point will be have to differ) or use the override  
> > functionality (http://jakarta.apache.org/hivemind/current/override.html)
> > 
> > Cheers,
> > 
> > Johan
> > 
> > On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> 
> > wrote:
> > 
> > > Hi again,
> > > In our application we want to have multiple implementation classes 
> > > for one service. So .xml file will look like <service-point 
> > > id="Part" />  <implementation service-id="Part">
> > >    <create-instance class="one.PartImpl"/>
> > > </implementation>
> > > <implementation service-id="Part">
> > >    <create-instance class="two.PartImpl"/>
> > > </implementation>
> > >
> > > At startup user will choose implementation that he want to work with 
> > > (and its id will be stored), and later user operations will be 
> > > associated with selected implementation.
> > >
> > > As I see from RegistryBuilder code, it is not allowed to have 2 
> > > implementation. Can you point me to other way having several service 
> > > implementation? Or may be I can override some system service?
> > >
> > > Thank you,
> > > Igor Laberov
> > > Qlusters, Inc.
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > -
> > > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> > >
> > >
> > 
> > 
> > 
> > --
> > you too?
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Multiple implementations for service

Posted by James Carman <ja...@carmanconsulting.com>.
So, you want to allow the users to choose which implementation type they
want, right?  Then, define two different service points with the same
interface, but give them different ids (of course) corresponding to the
different implementations.  Another approach would involve writing your own
service model which chooses which implementation type to instantiate using
some sort of thread-local parameter (which you'd have to set prior to
invoking of course).  

-----Original Message-----
From: Igor Laberov [mailto:igorl@qlusters.com] 
Sent: Thursday, April 28, 2005 10:11 AM
To: hivemind-user@jakarta.apache.org
Subject: Re: Multiple implementations for service


These 2 options don't allow to have more than one service implementation in
the same time. Current Registry interface doesn't allow this, because it
have only
getService() that returns single implementation only.

Is it possible to override Registry service?

Thanks,
Igor

On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
> Two options - have two service points (same service interface is 
> allowed,
> just name the service point will be have to differ) or use the override  
> functionality (http://jakarta.apache.org/hivemind/current/override.html)
> 
> Cheers,
> 
> Johan
> 
> On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> 
> wrote:
> 
> > Hi again,
> > In our application we want to have multiple implementation classes 
> > for one service. So .xml file will look like <service-point 
> > id="Part" />  <implementation service-id="Part">
> >    <create-instance class="one.PartImpl"/>
> > </implementation>
> > <implementation service-id="Part">
> >    <create-instance class="two.PartImpl"/>
> > </implementation>
> >
> > At startup user will choose implementation that he want to work with 
> > (and its id will be stored), and later user operations will be 
> > associated with selected implementation.
> >
> > As I see from RegistryBuilder code, it is not allowed to have 2 
> > implementation. Can you point me to other way having several service 
> > implementation? Or may be I can override some system service?
> >
> > Thank you,
> > Igor Laberov
> > Qlusters, Inc.
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> --
> you too?
> 
> ---------------------------------------------------------------------
> 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



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


Re: Multiple implementations for service

Posted by Igor Laberov <ig...@qlusters.com>.
These 2 options don't allow to have more than one service implementation
in the same time.
Current Registry interface doesn't allow this, because it have only
getService() that returns single implementation only.

Is it possible to override Registry service?

Thanks,
Igor

On Wed, 2005-04-27 at 14:35, Johan Lindquist wrote:
> Two options - have two service points (same service interface is allowed,  
> just name the service point will be have to differ) or use the override  
> functionality (http://jakarta.apache.org/hivemind/current/override.html)
> 
> Cheers,
> 
> Johan
> 
> On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> wrote:
> 
> > Hi again,
> > In our application we want to have multiple implementation classes for
> > one service. So .xml file will look like
> > <service-point id="Part" />
> >  <implementation service-id="Part">
> >    <create-instance class="one.PartImpl"/>
> > </implementation>
> > <implementation service-id="Part">
> >    <create-instance class="two.PartImpl"/>
> > </implementation>
> >
> > At startup user will choose implementation that he want to work with
> > (and its id will be stored), and later user operations will be
> > associated with selected implementation.
> >
> > As I see from RegistryBuilder code, it is not allowed to have 2
> > implementation.
> > Can you point me to other way having several service implementation? Or
> > may be I can override some system service?
> >
> > Thank you,
> > Igor Laberov
> > Qlusters, Inc.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> -- 
> you too?
> 
> ---------------------------------------------------------------------
> 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


Re: Multiple implementations for service

Posted by Knut Wannheden <kn...@gmail.com>.
Igor,

If you're using HiveMind 1.1 there is yet another option. You can make
the <implementation> elements conditional using an "if" attribute. The
value of this attribute is a conditional expression which basically is
a boolean expression in which you reference class names and system
properties. Check here for more information and examples:
http://jakarta.apache.org/hivemind/current/conditional.html.

HTH,

--knut

On 4/27/05, Johan Lindquist <jo...@kawoo.co.uk> wrote:
> Two options - have two service points (same service interface is allowed,
> just name the service point will be have to differ) or use the override
> functionality (http://jakarta.apache.org/hivemind/current/override.html)
> 
> Cheers,
> 
> Johan
> 
> On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> wrote:
> 
> > Hi again,
> > In our application we want to have multiple implementation classes for
> > one service. So .xml file will look like
> > <service-point id="Part" />
> >  <implementation service-id="Part">
> >    <create-instance class="one.PartImpl"/>
> > </implementation>
> > <implementation service-id="Part">
> >    <create-instance class="two.PartImpl"/>
> > </implementation>
> >
> > At startup user will choose implementation that he want to work with
> > (and its id will be stored), and later user operations will be
> > associated with selected implementation.
> >
> > As I see from RegistryBuilder code, it is not allowed to have 2
> > implementation.
> > Can you point me to other way having several service implementation? Or
> > may be I can override some system service?
> >
> > Thank you,
> > Igor Laberov
> > Qlusters, Inc.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> --
> you too?
> 
> ---------------------------------------------------------------------
> 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


Re: Multiple implementations for service

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Two options - have two service points (same service interface is allowed,  
just name the service point will be have to differ) or use the override  
functionality (http://jakarta.apache.org/hivemind/current/override.html)

Cheers,

Johan

On 27 Apr 2005 14:33:46 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Hi again,
> In our application we want to have multiple implementation classes for
> one service. So .xml file will look like
> <service-point id="Part" />
>  <implementation service-id="Part">
>    <create-instance class="one.PartImpl"/>
> </implementation>
> <implementation service-id="Part">
>    <create-instance class="two.PartImpl"/>
> </implementation>
>
> At startup user will choose implementation that he want to work with
> (and its id will be stored), and later user operations will be
> associated with selected implementation.
>
> As I see from RegistryBuilder code, it is not allowed to have 2
> implementation.
> Can you point me to other way having several service implementation? Or
> may be I can override some system service?
>
> Thank you,
> Igor Laberov
> Qlusters, Inc.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>



-- 
you too?

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


Multiple implementations for service

Posted by Igor Laberov <ig...@qlusters.com>.
Hi again,
In our application we want to have multiple implementation classes for
one service. So .xml file will look like 
<service-point id="Part" />
 <implementation service-id="Part">
   <create-instance class="one.PartImpl"/>
</implementation>  
<implementation service-id="Part">
   <create-instance class="two.PartImpl"/>
</implementation> 

At startup user will choose implementation that he want to work with
(and its id will be stored), and later user operations will be
associated with selected implementation.

As I see from RegistryBuilder code, it is not allowed to have 2
implementation.
Can you point me to other way having several service implementation? Or
may be I can override some system service?

Thank you,
Igor Laberov
Qlusters, Inc.



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


Re: Loading descriptor

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Sounds perfect to me :)

Cheers,

Johan

On Wed, 27 Apr 2005 16:17:42 +0200, James Carman  
<ja...@carmanconsulting.com> wrote:

> I've enhanced it to do exactly what you asked.  So, if you ask for  
> serviceId
> "foo"...
>
> The service id specified ("foo") is not fully qualified.  Perhaps you  
> meant
> one of "module1.foo", "module2.foo".
>
> How does that sound?
>
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk]
> Sent: Wednesday, April 27, 2005 7:33 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
>
>
> You may be there already, but in any case ;)
>
> You should be able to resolve all service points for the interface being
> passed into getService - RegistryInfrastructureImpl keeps a map of them
> ... The get the service id from there ... If more than one - list all?
>
> Johan
>
> On Wed, 27 Apr 2005 07:21:37 -0400, James Carman
> <ja...@carmanconsulting.com> wrote:
>
>> It kind of goes along with the idea of "line precise error reporting"
>> in that it does kind of nudge you in the right direction, as you said.
>> I'll see what I can do.
>>
>> -----Original Message-----
>> From: Johan Lindquist [mailto:johan@kawoo.co.uk]
>> Sent: Wednesday, April 27, 2005 7:17 AM
>> To: hivemind-user@jakarta.apache.org
>> Subject: Re: Loading descriptor
>>
>>
>> The prefix message would probably be a good idea - would definately
>> point you in the right direction ...
>>
>> Johan
>>
>> On Wed, 27 Apr 2005 06:38:09 -0400, James Carman
>> <ja...@carmanconsulting.com> wrote:
>>
>>> This is probably one of the most frequently asked questions.  I know
>>> I've answered this question before.  Perhaps we should come up with a
>>> troubleshooting guide?  Or, maybe the error message should say
>>> something like "you need to prefix your service id with the module
>>> id"
>> when you
>>> give a
>>> service id with no '.' character in it?  Maybe the registry could
>>> even
>>> be
>>> smart enough to say "The service id 'Part' is not prefixed with a  
>>> module
>>> id.
>>> Did you mean 'test.Part'?"
>>>
>>> -----Original Message-----
>>> From: Igor Laberov [mailto:igorl@qlusters.com]
>>> Sent: Wednesday, April 27, 2005 5:24 AM
>>> To: hivemind-user@jakarta.apache.org
>>> Subject: Re: Loading descriptor
>>>
>>>
>>> Thanks, Johan, it works now :)
>>>
>>>
>>> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
>>>> You need to prefix the service id with the module id (i.e.
>>>> "test.Part"), then it should load it.  If your service is the only
>>>> service defined using
>>>
>>>> the interface one.PartitionService, then you can simply do:
>>>>
>>>> PartitionService c =
>>>> (PartitionService)registry.getService(PartitionService.class);
>>>>
>>>> Cheers,
>>>>
>>>> Johan
>>>>
>>>> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com>
>>>> wrote:
>>>>
>>>> > Yes, I put it before.
>>>> > May be I make wrong call to service:
>>>> >    PartitionService c = (PartitionService)
>>>> > registry.getService("Part",PartitionService.class);
>>>> > while XML contains:
>>>> > <module id="test" version="1.0.0">
>>>> >   <service-point id="Part" interface="one.PartitionService">
>>>> >     <create-instance class="one.PartitionServiceImpl"/>
>>>> >   </service-point>
>>>> > </module>
>>>> >
>>>> >
>>>> > Igor
>>>> >
>>>> >
>>>> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>>>> >> Igor,
>>>> >>
>>>> >> Perhaps a stupid question, but did you put the descriptor in
>>>> >> META-INF/hivemodule.xml on the classpath?
>>>> >>
>>>> >> Johan
>>>> >>
>>>> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com>
>>>> >> wrote:
>>>> >>
>>>> >> > Hi all,
>>>> >> > I'm trying to build simple application with HiveMind, but it
>>>> >> > seems
>>>> >> that
>>>> >> > registry doesn't load my descriptor (I've added descriptor
>>>> >> > location to the classpath). I also checked Registry content in
>>>> >> > debugger, and I saw that descriptor wasn't loaded. Should I
>>>> >> > make definitions in another places?
>>>> >> >
>>>> >> > Thank you,
>>>> >> > Igor Laberov
>>>> >> > Qlusters, Inc.
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > ---------------------------------------------------------------
>>>> >> > -
>>>> >> > -
>>>> >> > ----
>>>> >> > To unsubscribe, e-mail:
>>>> hivemind-user-unsubscribe@jakarta.apache.org
>>>> >> > For additional commands, e-mail:
>>> hivemind-user-help@jakarta.apache.org
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> you too?
>>>> >>
>>>> >> -----------------------------------------------------------------
>>>> >> -
>>>> >> -
>>>> >> --
>>>> >> 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
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> you too?
>>>>
>>>> --------------------------------------------------------------------
>>>> -
>>>> 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
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> hivemind-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
>>
>>
>
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

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


RE: Loading descriptor

Posted by James Carman <ja...@carmanconsulting.com>.
I've enhanced it to do exactly what you asked.  So, if you ask for serviceId
"foo"...

The service id specified ("foo") is not fully qualified.  Perhaps you meant
one of "module1.foo", "module2.foo".

How does that sound?

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, April 27, 2005 7:33 AM
To: hivemind-user@jakarta.apache.org
Subject: Re: Loading descriptor


You may be there already, but in any case ;)

You should be able to resolve all service points for the interface being  
passed into getService - RegistryInfrastructureImpl keeps a map of them  
... The get the service id from there ... If more than one - list all?

Johan

On Wed, 27 Apr 2005 07:21:37 -0400, James Carman  
<ja...@carmanconsulting.com> wrote:

> It kind of goes along with the idea of "line precise error reporting" 
> in that it does kind of nudge you in the right direction, as you said.  
> I'll see what I can do.
>
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk]
> Sent: Wednesday, April 27, 2005 7:17 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
>
>
> The prefix message would probably be a good idea - would definately 
> point you in the right direction ...
>
> Johan
>
> On Wed, 27 Apr 2005 06:38:09 -0400, James Carman 
> <ja...@carmanconsulting.com> wrote:
>
>> This is probably one of the most frequently asked questions.  I know 
>> I've answered this question before.  Perhaps we should come up with a 
>> troubleshooting guide?  Or, maybe the error message should say 
>> something like "you need to prefix your service id with the module 
>> id"
> when you
>> give a
>> service id with no '.' character in it?  Maybe the registry could 
>> even
>> be
>> smart enough to say "The service id 'Part' is not prefixed with a module
>> id.
>> Did you mean 'test.Part'?"
>>
>> -----Original Message-----
>> From: Igor Laberov [mailto:igorl@qlusters.com]
>> Sent: Wednesday, April 27, 2005 5:24 AM
>> To: hivemind-user@jakarta.apache.org
>> Subject: Re: Loading descriptor
>>
>>
>> Thanks, Johan, it works now :)
>>
>>
>> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
>>> You need to prefix the service id with the module id (i.e. 
>>> "test.Part"), then it should load it.  If your service is the only 
>>> service defined using
>>
>>> the interface one.PartitionService, then you can simply do:
>>>
>>> PartitionService c = 
>>> (PartitionService)registry.getService(PartitionService.class);
>>>
>>> Cheers,
>>>
>>> Johan
>>>
>>> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com>
>>> wrote:
>>>
>>> > Yes, I put it before.
>>> > May be I make wrong call to service:
>>> >    PartitionService c = (PartitionService) 
>>> > registry.getService("Part",PartitionService.class);
>>> > while XML contains:
>>> > <module id="test" version="1.0.0">
>>> >   <service-point id="Part" interface="one.PartitionService">
>>> >     <create-instance class="one.PartitionServiceImpl"/>
>>> >   </service-point>
>>> > </module>
>>> >
>>> >
>>> > Igor
>>> >
>>> >
>>> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>>> >> Igor,
>>> >>
>>> >> Perhaps a stupid question, but did you put the descriptor in 
>>> >> META-INF/hivemodule.xml on the classpath?
>>> >>
>>> >> Johan
>>> >>
>>> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com>
>>> >> wrote:
>>> >>
>>> >> > Hi all,
>>> >> > I'm trying to build simple application with HiveMind, but it 
>>> >> > seems
>>> >> that
>>> >> > registry doesn't load my descriptor (I've added descriptor 
>>> >> > location to the classpath). I also checked Registry content in 
>>> >> > debugger, and I saw that descriptor wasn't loaded. Should I 
>>> >> > make definitions in another places?
>>> >> >
>>> >> > Thank you,
>>> >> > Igor Laberov
>>> >> > Qlusters, Inc.
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > ---------------------------------------------------------------
>>> >> > -
>>> >> > -
>>> >> > ----
>>> >> > To unsubscribe, e-mail:
>>> hivemind-user-unsubscribe@jakarta.apache.org
>>> >> > For additional commands, e-mail:
>> hivemind-user-help@jakarta.apache.org
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> you too?
>>> >>
>>> >> -----------------------------------------------------------------
>>> >> -
>>> >> -
>>> >> --
>>> >> 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
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> you too?
>>>
>>> --------------------------------------------------------------------
>>> -
>>> 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: 
>> hivemind-user-help@jakarta.apache.org
>>
>>
>>
>
>
>



-- 
you too?

---------------------------------------------------------------------
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


Re: Loading descriptor

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
You may be there already, but in any case ;)

You should be able to resolve all service points for the interface being  
passed into getService - RegistryInfrastructureImpl keeps a map of them  
... The get the service id from there ... If more than one - list all?

Johan

On Wed, 27 Apr 2005 07:21:37 -0400, James Carman  
<ja...@carmanconsulting.com> wrote:

> It kind of goes along with the idea of "line precise error reporting" in
> that it does kind of nudge you in the right direction, as you said.  I'll
> see what I can do.
>
> -----Original Message-----
> From: Johan Lindquist [mailto:johan@kawoo.co.uk]
> Sent: Wednesday, April 27, 2005 7:17 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
>
>
> The prefix message would probably be a good idea - would definately point
> you in the right direction ...
>
> Johan
>
> On Wed, 27 Apr 2005 06:38:09 -0400, James Carman
> <ja...@carmanconsulting.com> wrote:
>
>> This is probably one of the most frequently asked questions.  I know
>> I've answered this question before.  Perhaps we should come up with a
>> troubleshooting guide?  Or, maybe the error message should say
>> something like "you need to prefix your service id with the module id"
> when you
>> give a
>> service id with no '.' character in it?  Maybe the registry could even  
>> be
>> smart enough to say "The service id 'Part' is not prefixed with a module
>> id.
>> Did you mean 'test.Part'?"
>>
>> -----Original Message-----
>> From: Igor Laberov [mailto:igorl@qlusters.com]
>> Sent: Wednesday, April 27, 2005 5:24 AM
>> To: hivemind-user@jakarta.apache.org
>> Subject: Re: Loading descriptor
>>
>>
>> Thanks, Johan, it works now :)
>>
>>
>> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
>>> You need to prefix the service id with the module id (i.e.
>>> "test.Part"), then it should load it.  If your service is the only
>>> service defined
>>> using
>>
>>> the interface one.PartitionService, then you can simply do:
>>>
>>> PartitionService c =
>>> (PartitionService)registry.getService(PartitionService.class);
>>>
>>> Cheers,
>>>
>>> Johan
>>>
>>> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com>
>>> wrote:
>>>
>>> > Yes, I put it before.
>>> > May be I make wrong call to service:
>>> >    PartitionService c = (PartitionService)
>>> > registry.getService("Part",PartitionService.class);
>>> > while XML contains:
>>> > <module id="test" version="1.0.0">
>>> >   <service-point id="Part" interface="one.PartitionService">
>>> >     <create-instance class="one.PartitionServiceImpl"/>
>>> >   </service-point>
>>> > </module>
>>> >
>>> >
>>> > Igor
>>> >
>>> >
>>> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>>> >> Igor,
>>> >>
>>> >> Perhaps a stupid question, but did you put the descriptor in
>>> >> META-INF/hivemodule.xml on the classpath?
>>> >>
>>> >> Johan
>>> >>
>>> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com>
>>> >> wrote:
>>> >>
>>> >> > Hi all,
>>> >> > I'm trying to build simple application with HiveMind, but it
>>> >> > seems
>>> >> that
>>> >> > registry doesn't load my descriptor (I've added descriptor
>>> >> > location to the classpath). I also checked Registry content in
>>> >> > debugger, and I saw that descriptor wasn't loaded. Should I make
>>> >> > definitions in another places?
>>> >> >
>>> >> > Thank you,
>>> >> > Igor Laberov
>>> >> > Qlusters, Inc.
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > ----------------------------------------------------------------
>>> >> > -
>>> >> > ----
>>> >> > To unsubscribe, e-mail:
>>> hivemind-user-unsubscribe@jakarta.apache.org
>>> >> > For additional commands, e-mail:
>> hivemind-user-help@jakarta.apache.org
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> you too?
>>> >>
>>> >> ------------------------------------------------------------------
>>> >> -
>>> >> --
>>> >> 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
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> you too?
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>>
>>
>>
>
>
>



-- 
you too?

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


RE: Loading descriptor

Posted by James Carman <ja...@carmanconsulting.com>.
It kind of goes along with the idea of "line precise error reporting" in
that it does kind of nudge you in the right direction, as you said.  I'll
see what I can do.

-----Original Message-----
From: Johan Lindquist [mailto:johan@kawoo.co.uk] 
Sent: Wednesday, April 27, 2005 7:17 AM
To: hivemind-user@jakarta.apache.org
Subject: Re: Loading descriptor


The prefix message would probably be a good idea - would definately point  
you in the right direction ...

Johan

On Wed, 27 Apr 2005 06:38:09 -0400, James Carman  
<ja...@carmanconsulting.com> wrote:

> This is probably one of the most frequently asked questions.  I know 
> I've answered this question before.  Perhaps we should come up with a 
> troubleshooting guide?  Or, maybe the error message should say 
> something like "you need to prefix your service id with the module id"
when you
> give a
> service id with no '.' character in it?  Maybe the registry could even be
> smart enough to say "The service id 'Part' is not prefixed with a module  
> id.
> Did you mean 'test.Part'?"
>
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com]
> Sent: Wednesday, April 27, 2005 5:24 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
>
>
> Thanks, Johan, it works now :)
>
>
> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
>> You need to prefix the service id with the module id (i.e. 
>> "test.Part"), then it should load it.  If your service is the only 
>> service defined
>> using
>
>> the interface one.PartitionService, then you can simply do:
>>
>> PartitionService c = 
>> (PartitionService)registry.getService(PartitionService.class);
>>
>> Cheers,
>>
>> Johan
>>
>> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com>
>> wrote:
>>
>> > Yes, I put it before.
>> > May be I make wrong call to service:
>> >    PartitionService c = (PartitionService) 
>> > registry.getService("Part",PartitionService.class);
>> > while XML contains:
>> > <module id="test" version="1.0.0">
>> >   <service-point id="Part" interface="one.PartitionService">
>> >     <create-instance class="one.PartitionServiceImpl"/>
>> >   </service-point>
>> > </module>
>> >
>> >
>> > Igor
>> >
>> >
>> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>> >> Igor,
>> >>
>> >> Perhaps a stupid question, but did you put the descriptor in 
>> >> META-INF/hivemodule.xml on the classpath?
>> >>
>> >> Johan
>> >>
>> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com>
>> >> wrote:
>> >>
>> >> > Hi all,
>> >> > I'm trying to build simple application with HiveMind, but it 
>> >> > seems
>> >> that
>> >> > registry doesn't load my descriptor (I've added descriptor 
>> >> > location to the classpath). I also checked Registry content in 
>> >> > debugger, and I saw that descriptor wasn't loaded. Should I make 
>> >> > definitions in another places?
>> >> >
>> >> > Thank you,
>> >> > Igor Laberov
>> >> > Qlusters, Inc.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ----------------------------------------------------------------
>> >> > -
>> >> > ----
>> >> > To unsubscribe, e-mail:  
>> hivemind-user-unsubscribe@jakarta.apache.org
>> >> > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> you too?
>> >>
>> >> ------------------------------------------------------------------
>> >> -
>> >> --
>> >> 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
>> >
>> >
>>
>>
>>
>> --
>> you too?
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
>



-- 
you too?

---------------------------------------------------------------------
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


Re: Loading descriptor

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
The prefix message would probably be a good idea - would definately point  
you in the right direction ...

Johan

On Wed, 27 Apr 2005 06:38:09 -0400, James Carman  
<ja...@carmanconsulting.com> wrote:

> This is probably one of the most frequently asked questions.  I know I've
> answered this question before.  Perhaps we should come up with a
> troubleshooting guide?  Or, maybe the error message should say something
> like "you need to prefix your service id with the module id" when you  
> give a
> service id with no '.' character in it?  Maybe the registry could even be
> smart enough to say "The service id 'Part' is not prefixed with a module  
> id.
> Did you mean 'test.Part'?"
>
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com]
> Sent: Wednesday, April 27, 2005 5:24 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
>
>
> Thanks, Johan, it works now :)
>
>
> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
>> You need to prefix the service id with the module id (i.e.
>> "test.Part"),
>> then it should load it.  If your service is the only service defined  
>> using
>
>> the interface one.PartitionService, then you can simply do:
>>
>> PartitionService c =
>> (PartitionService)registry.getService(PartitionService.class);
>>
>> Cheers,
>>
>> Johan
>>
>> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com>
>> wrote:
>>
>> > Yes, I put it before.
>> > May be I make wrong call to service:
>> >    PartitionService c = (PartitionService)
>> > registry.getService("Part",PartitionService.class);
>> > while XML contains:
>> > <module id="test" version="1.0.0">
>> >   <service-point id="Part" interface="one.PartitionService">
>> >     <create-instance class="one.PartitionServiceImpl"/>
>> >   </service-point>
>> > </module>
>> >
>> >
>> > Igor
>> >
>> >
>> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>> >> Igor,
>> >>
>> >> Perhaps a stupid question, but did you put the descriptor in
>> >> META-INF/hivemodule.xml on the classpath?
>> >>
>> >> Johan
>> >>
>> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com>
>> >> wrote:
>> >>
>> >> > Hi all,
>> >> > I'm trying to build simple application with HiveMind, but it
>> >> > seems
>> >> that
>> >> > registry doesn't load my descriptor (I've added descriptor
>> >> > location to the classpath). I also checked Registry content in
>> >> > debugger, and I saw that descriptor wasn't loaded. Should I make
>> >> > definitions in another places?
>> >> >
>> >> > Thank you,
>> >> > Igor Laberov
>> >> > Qlusters, Inc.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > -----------------------------------------------------------------
>> >> > ----
>> >> > To unsubscribe, e-mail:  
>> hivemind-user-unsubscribe@jakarta.apache.org
>> >> > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> you too?
>> >>
>> >> -------------------------------------------------------------------
>> >> --
>> >> 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
>> >
>> >
>>
>>
>>
>> --
>> you too?
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
>



-- 
you too?

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


RE: Loading descriptor

Posted by Igor Laberov <ig...@qlusters.com>.
May it worse to add to javadoc of getService() some example? Because I
didn't understand at the beginning what "fully qualified" means

On Wed, 2005-04-27 at 13:38, James Carman wrote:
> This is probably one of the most frequently asked questions.  I know I've
> answered this question before.  Perhaps we should come up with a
> troubleshooting guide?  Or, maybe the error message should say something
> like "you need to prefix your service id with the module id" when you give a
> service id with no '.' character in it?  Maybe the registry could even be
> smart enough to say "The service id 'Part' is not prefixed with a module id.
> Did you mean 'test.Part'?"
> 
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com] 
> Sent: Wednesday, April 27, 2005 5:24 AM
> To: hivemind-user@jakarta.apache.org
> Subject: Re: Loading descriptor
> 
> 
> Thanks, Johan, it works now :)
> 
> 
> On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
> > You need to prefix the service id with the module id (i.e. 
> > "test.Part"),
> > then it should load it.  If your service is the only service defined using
> 
> > the interface one.PartitionService, then you can simply do:
> > 
> > PartitionService c =
> > (PartitionService)registry.getService(PartitionService.class);
> > 
> > Cheers,
> > 
> > Johan
> > 
> > On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com> 
> > wrote:
> > 
> > > Yes, I put it before.
> > > May be I make wrong call to service:
> > >    PartitionService c = (PartitionService) 
> > > registry.getService("Part",PartitionService.class);
> > > while XML contains:
> > > <module id="test" version="1.0.0">
> > >   <service-point id="Part" interface="one.PartitionService">
> > >     <create-instance class="one.PartitionServiceImpl"/>
> > >   </service-point>
> > > </module>
> > >
> > >
> > > Igor
> > >
> > >
> > > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
> > >> Igor,
> > >>
> > >> Perhaps a stupid question, but did you put the descriptor in 
> > >> META-INF/hivemodule.xml on the classpath?
> > >>
> > >> Johan
> > >>
> > >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> 
> > >> wrote:
> > >>
> > >> > Hi all,
> > >> > I'm trying to build simple application with HiveMind, but it 
> > >> > seems
> > >> that
> > >> > registry doesn't load my descriptor (I've added descriptor 
> > >> > location to the classpath). I also checked Registry content in 
> > >> > debugger, and I saw that descriptor wasn't loaded. Should I make 
> > >> > definitions in another places?
> > >> >
> > >> > Thank you,
> > >> > Igor Laberov
> > >> > Qlusters, Inc.
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > -----------------------------------------------------------------
> > >> > ----
> > >> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > >> > For additional commands, e-mail:
> hivemind-user-help@jakarta.apache.org
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> you too?
> > >>
> > >> -------------------------------------------------------------------
> > >> --
> > >> 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
> > >
> > >
> > 
> > 
> > 
> > --
> > you too?
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: Loading descriptor

Posted by James Carman <ja...@carmanconsulting.com>.
This is probably one of the most frequently asked questions.  I know I've
answered this question before.  Perhaps we should come up with a
troubleshooting guide?  Or, maybe the error message should say something
like "you need to prefix your service id with the module id" when you give a
service id with no '.' character in it?  Maybe the registry could even be
smart enough to say "The service id 'Part' is not prefixed with a module id.
Did you mean 'test.Part'?"

-----Original Message-----
From: Igor Laberov [mailto:igorl@qlusters.com] 
Sent: Wednesday, April 27, 2005 5:24 AM
To: hivemind-user@jakarta.apache.org
Subject: Re: Loading descriptor


Thanks, Johan, it works now :)


On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
> You need to prefix the service id with the module id (i.e. 
> "test.Part"),
> then it should load it.  If your service is the only service defined using

> the interface one.PartitionService, then you can simply do:
> 
> PartitionService c =
> (PartitionService)registry.getService(PartitionService.class);
> 
> Cheers,
> 
> Johan
> 
> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com> 
> wrote:
> 
> > Yes, I put it before.
> > May be I make wrong call to service:
> >    PartitionService c = (PartitionService) 
> > registry.getService("Part",PartitionService.class);
> > while XML contains:
> > <module id="test" version="1.0.0">
> >   <service-point id="Part" interface="one.PartitionService">
> >     <create-instance class="one.PartitionServiceImpl"/>
> >   </service-point>
> > </module>
> >
> >
> > Igor
> >
> >
> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
> >> Igor,
> >>
> >> Perhaps a stupid question, but did you put the descriptor in 
> >> META-INF/hivemodule.xml on the classpath?
> >>
> >> Johan
> >>
> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> 
> >> wrote:
> >>
> >> > Hi all,
> >> > I'm trying to build simple application with HiveMind, but it 
> >> > seems
> >> that
> >> > registry doesn't load my descriptor (I've added descriptor 
> >> > location to the classpath). I also checked Registry content in 
> >> > debugger, and I saw that descriptor wasn't loaded. Should I make 
> >> > definitions in another places?
> >> >
> >> > Thank you,
> >> > Igor Laberov
> >> > Qlusters, Inc.
> >> >
> >> >
> >> >
> >> >
> >> > -----------------------------------------------------------------
> >> > ----
> >> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail:
hivemind-user-help@jakarta.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> you too?
> >>
> >> -------------------------------------------------------------------
> >> --
> >> 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
> >
> >
> 
> 
> 
> --
> you too?
> 
> ---------------------------------------------------------------------
> 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



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


Re: Loading descriptor

Posted by Igor Laberov <ig...@qlusters.com>.
Thanks, Johan, it works now :)


On Wed, 2005-04-27 at 11:41, Johan Lindquist wrote:
> You need to prefix the service id with the module id (i.e. "test.Part"),  
> then it should load it.  If your service is the only service defined using  
> the interface one.PartitionService, then you can simply do:
> 
> PartitionService c =  
> (PartitionService)registry.getService(PartitionService.class);
> 
> Cheers,
> 
> Johan
> 
> On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:
> 
> > Yes, I put it before.
> > May be I make wrong call to service:
> >    PartitionService c = (PartitionService)
> > registry.getService("Part",PartitionService.class);
> > while XML contains:
> > <module id="test" version="1.0.0">
> >   <service-point id="Part" interface="one.PartitionService">
> >     <create-instance class="one.PartitionServiceImpl"/>
> >   </service-point>
> > </module>
> >
> >
> > Igor
> >
> >
> > On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
> >> Igor,
> >>
> >> Perhaps a stupid question, but did you put the descriptor in
> >> META-INF/hivemodule.xml on the classpath?
> >>
> >> Johan
> >>
> >> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:
> >>
> >> > Hi all,
> >> > I'm trying to build simple application with HiveMind, but it seems  
> >> that
> >> > registry doesn't load my descriptor (I've added descriptor location to
> >> > the classpath). I also checked Registry content in debugger, and I saw
> >> > that descriptor wasn't loaded.
> >> > Should I make definitions in another places?
> >> >
> >> > Thank you,
> >> > Igor Laberov
> >> > Qlusters, Inc.
> >> >
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> you too?
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> 
> 
> 
> -- 
> you too?
> 
> ---------------------------------------------------------------------
> 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


Re: Loading descriptor

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
You need to prefix the service id with the module id (i.e. "test.Part"),  
then it should load it.  If your service is the only service defined using  
the interface one.PartitionService, then you can simply do:

PartitionService c =  
(PartitionService)registry.getService(PartitionService.class);

Cheers,

Johan

On 27 Apr 2005 11:36:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Yes, I put it before.
> May be I make wrong call to service:
>    PartitionService c = (PartitionService)
> registry.getService("Part",PartitionService.class);
> while XML contains:
> <module id="test" version="1.0.0">
>   <service-point id="Part" interface="one.PartitionService">
>     <create-instance class="one.PartitionServiceImpl"/>
>   </service-point>
> </module>
>
>
> Igor
>
>
> On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
>> Igor,
>>
>> Perhaps a stupid question, but did you put the descriptor in
>> META-INF/hivemodule.xml on the classpath?
>>
>> Johan
>>
>> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:
>>
>> > Hi all,
>> > I'm trying to build simple application with HiveMind, but it seems  
>> that
>> > registry doesn't load my descriptor (I've added descriptor location to
>> > the classpath). I also checked Registry content in debugger, and I saw
>> > that descriptor wasn't loaded.
>> > Should I make definitions in another places?
>> >
>> > Thank you,
>> > Igor Laberov
>> > Qlusters, Inc.
>> >
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>> >
>> >
>>
>>
>>
>> --
>> you too?
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
you too?

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


Re: Loading descriptor

Posted by Igor Laberov <ig...@qlusters.com>.
Yes, I put it before.
May be I make wrong call to service:
   PartitionService c = (PartitionService)
registry.getService("Part",PartitionService.class);
  
while XML contains:
<module id="test" version="1.0.0">
  <service-point id="Part" interface="one.PartitionService">
    <create-instance class="one.PartitionServiceImpl"/>
  </service-point>
</module>


Igor


On Wed, 2005-04-27 at 11:08, Johan Lindquist wrote:
> Igor,
> 
> Perhaps a stupid question, but did you put the descriptor in  
> META-INF/hivemodule.xml on the classpath?
> 
> Johan
> 
> On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:
> 
> > Hi all,
> > I'm trying to build simple application with HiveMind, but it seems that
> > registry doesn't load my descriptor (I've added descriptor location to
> > the classpath). I also checked Registry content in debugger, and I saw
> > that descriptor wasn't loaded.
> > Should I make definitions in another places?
> >
> > Thank you,
> > Igor Laberov
> > Qlusters, Inc.
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> -- 
> you too?
> 
> ---------------------------------------------------------------------
> 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


Re: Loading descriptor

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
Igor,

Perhaps a stupid question, but did you put the descriptor in  
META-INF/hivemodule.xml on the classpath?

Johan

On 27 Apr 2005 11:02:20 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Hi all,
> I'm trying to build simple application with HiveMind, but it seems that
> registry doesn't load my descriptor (I've added descriptor location to
> the classpath). I also checked Registry content in debugger, and I saw
> that descriptor wasn't loaded.
> Should I make definitions in another places?
>
> Thank you,
> Igor Laberov
> Qlusters, Inc.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>



-- 
you too?

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


Loading descriptor

Posted by Igor Laberov <ig...@qlusters.com>.
Hi all,
I'm trying to build simple application with HiveMind, but it seems that
registry doesn't load my descriptor (I've added descriptor location to
the classpath). I also checked Registry content in debugger, and I saw
that descriptor wasn't loaded.
Should I make definitions in another places?

Thank you,
Igor Laberov
Qlusters, Inc.




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


Re: ClassLoader question

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
I believe that if you specify the class resolver to use for resolving  
modules, that resolver will also be used to locate the classes.  You can  
do this per instance (class-resolver property of the builder factory).

http://jakarta.apache.org/hivemind/current/hivemind/BuilderFactory.html

Cheers,

Johan

On 26 Apr 2005 15:39:26 +0300, Igor Laberov <ig...@qlusters.com> wrote:

> Thanks Jens,
> This is interesting article, but I don't think that it helps me when I
> work with HiveMind, because component instantiation is done by
> framework, and not by me.
> The question is it is possible to define some jar as component to be
> loaded in separate class loader?
>
> On Tue, 2005-04-26 at 15:08, Jens X Augustsson wrote:
>> Not without overriding the system class loader, to my my knowledge.
>>
>> But Don Schwarz has written an excellent article on how to fairly easy
>> archieve this with your own class loader, His goal was, just as your  
>> is, to
>> be able to use different versions of the same third party library:
>> http://www.onjava.com/pub/a/onjava/2005/04/13/dependencies.html?page=2
>>
>> cheers,
>> Jens
>>
>> -----Original Message-----
>> From: Igor Laberov [mailto:igorl@qlusters.com]
>> Sent: den 26 april 2005 13:48
>> To: hivemind-user@jakarta.apache.org
>> Subject: ClassLoader question
>>
>> Hi all,
>> Is it possible to load different (group of)components in separate class
>> loaders?
>> This is especially important in cases when 2 components are using  
>> different
>> versions of the same third-party library
>>
>> Thank you,
>> Igor Laberov
>> Qlusters, Inc.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
you too?

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


RE: ClassLoader question

Posted by Igor Laberov <ig...@qlusters.com>.
Thanks Jens,
This is interesting article, but I don't think that it helps me when I
work with HiveMind, because component instantiation is done by
framework, and not by me. 
The question is it is possible to define some jar as component to be
loaded in separate class loader?

On Tue, 2005-04-26 at 15:08, Jens X Augustsson wrote:
> Not without overriding the system class loader, to my my knowledge.
> 
> But Don Schwarz has written an excellent article on how to fairly easy
> archieve this with your own class loader, His goal was, just as your is, to
> be able to use different versions of the same third party library:
> http://www.onjava.com/pub/a/onjava/2005/04/13/dependencies.html?page=2
> 
> cheers,
> Jens
> 
> -----Original Message-----
> From: Igor Laberov [mailto:igorl@qlusters.com] 
> Sent: den 26 april 2005 13:48
> To: hivemind-user@jakarta.apache.org
> Subject: ClassLoader question
> 
> Hi all,
> Is it possible to load different (group of)components in separate class
> loaders?
> This is especially important in cases when 2 components are using different
> versions of the same third-party library
> 
> Thank you,
> Igor Laberov
> Qlusters, Inc.
> 
> 
> ---------------------------------------------------------------------
> 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


RE: ClassLoader question

Posted by Jens X Augustsson <je...@lbsoft.se>.
Not without overriding the system class loader, to my my knowledge.

But Don Schwarz has written an excellent article on how to fairly easy
archieve this with your own class loader, His goal was, just as your is, to
be able to use different versions of the same third party library:
http://www.onjava.com/pub/a/onjava/2005/04/13/dependencies.html?page=2

cheers,
Jens

-----Original Message-----
From: Igor Laberov [mailto:igorl@qlusters.com] 
Sent: den 26 april 2005 13:48
To: hivemind-user@jakarta.apache.org
Subject: ClassLoader question

Hi all,
Is it possible to load different (group of)components in separate class
loaders?
This is especially important in cases when 2 components are using different
versions of the same third-party library

Thank you,
Igor Laberov
Qlusters, Inc.


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