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 <[EMAIL PROTECTED]>
Reply-To:       [email protected]
To:     [email protected]



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to