You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Aj Gregory <aj...@u.washington.edu> on 2006/03/01 00:42:47 UTC

ServicePropertyFactory and Collection interface

Hello, I sent this out a while ago in regards to using the 
ServicePropertyFactory with the Colleciton interface... Thought I'd try 
again in case somebody else has run into this...

I can't use ServicePropertyFactory to create a service to get a property 
of type Collection... Anybody know why?

Thanks!
-Aj

-------- Original Message --------
Subject: 	ServicePropertyFactory
Date: 	Wed, 18 Jan 2006 11:12:03 -0800
From: 	Aj Gregory <aj...@u.washington.edu>
Reply-To: 	hivemind-user@jakarta.apache.org
To: 	hivemind-user@jakarta.apache.org



I'm trying to use something similar to the following:

interface ICache {
   Collection getCached()
}

<service-point id="Cache" interface="ICache">
       <invoke-factory model="user">
           ...
       </invoke-factory>
</service-point>

<service-point id="Cached" interface="java.util.Collection">
       <invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
           <construct service-id="Cache" property="cached"/>
       </invoke-factory>
</service-point>

But for some reason this isn't operating as expected and I get 
exceptions like:

org.apache.hivemind.ApplicationRuntimeException: Unable to add method 
java.util.Collection _targetServiceProperty() to class 
$Collection_108ded07d11: [source error] Method getCached not found in 
java.util.Collection

javassist.CannotCompileException: [source error] Method getCached not 
found in java.util.Collection

Am I using ServicePropertyFactory incorrectly?  I thought it would do a 
getCached() call on the Cache service and return that for the Collection...

Thanks,
-Aj




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