You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by "David J. M. Karlsen" <da...@davidkarlsen.com> on 2005/03/10 15:08:50 UTC

BUG/problem with nested services?

I have services which use services, which use services...

child-services are set in the constructor for the user-class, something 
like this:

<service-point ...A...>
	<invoke-factory>
		<create class="some.impl.class>
			<service>someOtherService</service>
		</create>
	</invoke-factory>
</service-point>

<service-point ... someOtherservice...>
	<invoke-factory>
		<create class="some.impl2.class">
			<service>someBservice</service>
		</create>
	</invoke-factory>
</service-point>

someBservice is a servicepoint with a concrete class that implements the 
interface, and without any other services set in the constructor. (the 
nesting stops here).


some.impl.class extends a class which has a constructor that takes 
someOtherService as argument.

all factory models are declared as pooled.




but I get this error:


org.apache.hivemind.ApplicationRuntimeException: Unable to create class
$PooledProxy_1028cb74aa9_20: $PooledProxy_1028cb74aa9_20 (Repeative
method name/signature)
	at
org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource
.java:83)
	at
org.apache.hivemind.service.impl.ClassFabImpl.createClass(ClassFabImpl.j
ava:170)
	at
org.apache.hivemind.impl.ProxyUtils.createDelegatingProxy(ProxyUtils.jav
a:82)
	at
org.apache.hivemind.impl.servicemodel.PooledServiceModel.constructServic
eProxy(PooledServiceModel.java:146)
	at
org.apache.hivemind.impl.servicemodel.PooledServiceModel.getService(Pool
edServiceModel.java:126)
	at Main.main(Main.java:107)
Exception in thread "main"



A bug??
-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

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


Re: BUG/problem with nested services?

Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Howard Lewis Ship wrote:

>This is a bug in HiveMind 1.0 that's fixed in 1.1.
>
>Basically, your "B" service extends an interface that extends other
>interface(s).  The same method signature shows up in multiple
>interfaces (possibly with minor differences w.r.t. thrown exceptions).
> HiveMind 1.0 trips over this, HiveMind 1.1 does not.
>
>I ran into this same problem creating services around Kodo's JDO
>implementation.  The KodoPersistenceManager extended all sorts of
>interfaces with conflicting methods. The rules for this are somewhat
>arcane.
>  
>
A little googling found your earlier conclusions/mail - but thank's for 
the answer :-)
Yes - the superclass that is extended by the services implements an 
interface that again extends another interface (and the implementing 
classes implement some abstract methods inherited from these 
interfaces/the abstract superclass).

When is 1.1 ready for release? :-)



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


Re: BUG/problem with nested services?

Posted by Howard Lewis Ship <hl...@gmail.com>.
This is a bug in HiveMind 1.0 that's fixed in 1.1.

Basically, your "B" service extends an interface that extends other
interface(s).  The same method signature shows up in multiple
interfaces (possibly with minor differences w.r.t. thrown exceptions).
 HiveMind 1.0 trips over this, HiveMind 1.1 does not.

I ran into this same problem creating services around Kodo's JDO
implementation.  The KodoPersistenceManager extended all sorts of
interfaces with conflicting methods. The rules for this are somewhat
arcane.


On Thu, 10 Mar 2005 15:08:50 +0100, David J. M. Karlsen
<da...@davidkarlsen.com> wrote:
> I have services which use services, which use services...
> 
> child-services are set in the constructor for the user-class, something
> like this:
> 
> <service-point ...A...>
>         <invoke-factory>
>                 <create class="some.impl.class>
>                         <service>someOtherService</service>
>                 </create>
>         </invoke-factory>
> </service-point>
> 
> <service-point ... someOtherservice...>
>         <invoke-factory>
>                 <create class="some.impl2.class">
>                         <service>someBservice</service>
>                 </create>
>         </invoke-factory>
> </service-point>
> 
> someBservice is a servicepoint with a concrete class that implements the
> interface, and without any other services set in the constructor. (the
> nesting stops here).
> 
> some.impl.class extends a class which has a constructor that takes
> someOtherService as argument.
> 
> all factory models are declared as pooled.
> 
> but I get this error:
> 
> org.apache.hivemind.ApplicationRuntimeException: Unable to create class
> $PooledProxy_1028cb74aa9_20: $PooledProxy_1028cb74aa9_20 (Repeative
> method name/signature)
>         at
> org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource
> .java:83)
>         at
> org.apache.hivemind.service.impl.ClassFabImpl.createClass(ClassFabImpl.j
> ava:170)
>         at
> org.apache.hivemind.impl.ProxyUtils.createDelegatingProxy(ProxyUtils.jav
> a:82)
>         at
> org.apache.hivemind.impl.servicemodel.PooledServiceModel.constructServic
> eProxy(PooledServiceModel.java:146)
>         at
> org.apache.hivemind.impl.servicemodel.PooledServiceModel.getService(Pool
> edServiceModel.java:126)
>         at Main.main(Main.java:107)
> Exception in thread "main"
> 
> A bug??
> --
> David J. M. Karlsen - +47 90 68 22 43
> http://www.davidkarlsen.com
> http://mp3.davidkarlsen.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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